Skip to content

Commit c27df86

Browse files
committed
allow self destruction
1 parent e4e404a commit c27df86

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

phpwpinfo.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,16 @@ public function __construct( ) {
4848
exit( );
4949
}
5050

51+
// Check GET for self-destruction
52+
if ( isset( $_GET ) && isset( $_GET['self-destruction'] ) && $_GET['self-destruction'] == 'true' ) {
53+
@unlink( __FILE__ );
54+
clearstatcache();
55+
if ( is_file(__FILE__) ) {
56+
die( 'Self-destruction KO ! Sorry, but you must remove me manually !' );
57+
}
58+
die( 'Self-destruction OK !' );
59+
}
60+
5161
$this->_check_request_mysql( );
5262
$this->_check_request_adminer( );
5363
$this->_check_request_phpsecinfo( );
@@ -493,6 +503,7 @@ public function get_header( ) {
493503
$output .= '<li><a href="wordpress/">WordPress</a></li>' . "\n";
494504
}
495505

506+
$output .= '<li><a href="?self-destruction=true">Self-destruction</a></li>' . "\n";
496507
$output .= '</ul>' . "\n";
497508
$output .= '</li>' . "\n";
498509

0 commit comments

Comments
 (0)