gnopaste

Sorry for this ugly message. We are searching for some translators.
Please take a look here
Thanks to all translators, you're doing a great job!

Name
MP Blog
Scriptlanguage
PHP
Tabwidth
4
Date
02/14/2010 07:25:45 pm
IP
84.222.166.181

PHP Shell Scanner

  1. <?php
  2.     /*                             
  3.             ___    / __      ___    // //
  4.           ((  ) ) //  ) ) //___) ) // // 
  5.           \ \    //  / / //      // // 
  6.         //  ) ) //  / / ((____  // //   
  7.                                                                                                                                    
  8.                                                                      
  9.             ___      ___      ___      __      __      ___      __ 
  10.           ((  ) ) //  ) ) //  ) ) //  ) ) //  ) ) //___) ) //  ) )
  11.           \ \    //      //  / / //  / / //  / / //      //     
  12.         //  ) ) ((____  ((___( ( //  / / //  / / ((____  //     
  13.  
  14.         Author    : DarKnight
  15.         Last Update: 03/07/07 17.57
  16.         Version    : 0.2alpha
  17.     */
  18.  
  19.     /*
  20.     ||  CHANGE SETTINGS BEFORE USING THE SCRIPT
  21.     */
  22.  
  23.     @set_time_limit( 0 );
  24.  
  25.     $settings = array
  26.     (
  27.         'BASE_DIR' => '.',
  28.         'USE_DEFINITIONS' => true,
  29.         'SIZE_LIMIT' => ( 1024 * 1024 ) //size limit set to 1mb
  30.     );
  31.  
  32.     $shell_definitions = array
  33.     (
  34.         array( 'id' => 'c99', 'def1' => 'Yzk5c2g=', 'def2' => 'T0RoVDJDOU43YkJmYm5uRE50bXYwVURsdjVZRDltdmFHWEk4WFl4bg==' ),
  35.         array( 'id' => 'r57', 'def1' => 'cjU3c2g=', 'def2' => 'SXlFdmRYTnlMMkpwYmk5d1pYSnNEUXAxYzJVZw==' ),
  36.         array( 'id' => 'Root Shell', 'def1' => 'Um9vdFNo', 'def2' => 'PHA+PGZvbnQgZmFjZT0iV2ViZGluZ3MiIHNpemU9IjYiIGNvbG9yPSIjMDBGRjAwIj4hPC9mb250Pjxicj4=' ),
  37.         array( 'id' => 'Fatal_Shell', 'def1' => 'RmFUYUwgU2hlbGw=', 'def2' => 'RmFUYUxTaGVMTA==' ),
  38.         array( 'id' => 'KA-uShell', 'def1' => 'S0FfdVNoZWxs', 'def2' => 'QXV0aG9yOiBLQWRvdA==' ),
  39.         array( 'id' => 'GFS Shell', 'def1' => 'R0ZTIFdlYi1TaGVsbA==', 'def2' => 'STJsdVkyeDFaR1VnUEhOMFpHbHZMbWcrRFFvamFXNWpiSFZrWlNBOGMzUnlhVzVuTG1nK0RRb2phVzVqYkhWa1o=', 'def3' => 'WENJN0RRb05Dbk4xWWlCd2NtVm1hWGdnZXcwS0lHMTVJQ1J1YjNjZ1BTQnNiMk5oYkhScGI=' ),
  40.         array( 'id' => 'Defacing Tool Pro', 'def1' => 'cjN2M25nNG5zIDpQ', 'def2' => 'RFRvb2wgUHJv' ),
  41.         array( 'id' => 'Private Arabic Shell', 'def1' => 'aHR0cDovL3dXdy50cnlhZy5jT20=', 'def2' => 'dHJ5YWdAdHJ5YWcuY29t', 'def3' => '0JfQsdCe0L3Ql9Ch0JfQmg==' ),
  42.         array( 'id' => 'Bk-Code Shell', 'def1' => 'QmstQ29kZSBzaGVsbA==', 'def2' => 'QXJhYi1TZWNyZXRzLVRlYW0=' ),
  43.         array( 'id' => 'SnIpEr_SA Shell', 'def1' => 'U25JcEVyX1NB', 'def2' => 'M2FzZmgubmU=' ),
  44.         array( 'id' => 'Fileman', 'def1' => 'RmlsM21hbg==' )
  45.     );
  46.  
  47.     $generic = 'shell';
  48.  
  49.     $tpl = new page_template( );
  50.  
  51.     function parse_dir( $dir )
  52.     {
  53.         global $shell_definitions;
  54.         global $generic;
  55.         global $settings;
  56.         global $tpl;
  57.  
  58.         $dh = dir( $dir );
  59.      
  60.         while( $entry = $dh -> read( ) )
  61.         {
  62.             if( $entry == '.' ||
  63.                 $entry == '..' ||
  64.                 @filesize( $dir . '/' . $entry ) > $settings[ 'SIZE_LIMIT' ] ||
  65.                 $entry === basename( $_SERVER[ 'PHP_SELF' ] ) )
  66.                 continue;
  67.  
  68.             if( @is_dir( $dir . '/' . $entry ) )
  69.                 $dirs[] = $dir . '/' . $entry;
  70.          
  71.             if( @filesize( $dir . '/' . $entry ) > 0 )
  72.             {
  73.                 $h  = fopen( $dir . '/' . $entry, 'r' );
  74.                 $cnt = fread( $h, @filesize( $dir . '/' . $entry ) );
  75.                 fclose( $h );
  76.              
  77.                 if( $settings[ 'USE_DEFINITIONS' ] )
  78.                 {
  79.                     for( $i = 0; $i < count( $shell_definitions ); $i++ )
  80.                     {
  81.                         foreach( $shell_definitions[ $i ] as $key => $el )
  82.                         {
  83.                             if( $key == 'id' )
  84.                             {
  85.                                 $id = $el;
  86.                                 continue;
  87.                             }
  88.                             if( strpos( strtolower( $cnt ), strtolower( base64_decode( $el ) ) ) !== FALSE )
  89.                             {
  90.                                 $shfound .= 'Probabile shell [' . $id . ']: <b>' . $dir . '/' . $entry . '</b><br>';
  91.                                 $end = true;
  92.                                 break;
  93.                             }
  94.                         }
  95.                         if( $end )
  96.                         {
  97.                             $end = false;
  98.                             break;
  99.                         }
  100.                     }
  101.                 }
  102.                 else
  103.                     if( strpos( strtolower( $cnt ), $generic ) !== FALSE )
  104.                         $shfound .= 'Probabile shell [generica]: <b>' . $dir . '/' . $entry . '</b><br>';
  105.             }
  106.         }
  107.         $dh -> close( );
  108.      
  109.         if( strlen( $shfound ) > 0 )
  110.         {
  111.             $tpl -> print_table_head( 'Directory: ' . $dir );
  112.             $tpl -> print_table_content( $shfound );
  113.             $tpl -> print_table_foot( );
  114.         }
  115.      
  116.         if( count( $dirs ) <= 0 ) return;
  117.      
  118.         foreach( $dirs as $dir )
  119.             parse_dir( $dir );
  120.     }
  121.  
  122.     $tpl -> print_header( );
  123.     parse_dir( $settings[ 'BASE_DIR' ] );
  124.     $tpl -> print_footer( );
  125.  
  126.     class page_template
  127.     {
  128.         function print_table_head( $file )
  129.         {
  130.             echo '<table width="50%" class="table">';echo "\n";
  131.             echo '<tr><td class="table_header">';echo "\n";
  132.             echo $file;echo "\n";
  133.             echo '</td></tr>';echo "\n";
  134.         }
  135.      
  136.         function print_table_content( $cnt )
  137.         {
  138.             echo '<tr><td>';echo "\n";
  139.             if( strlen( $cnt ) > 0 )
  140.             {
  141.                 echo '<span class="shell">'.$cnt.'</span>';echo "\n";
  142.             }
  143.             else
  144.             {
  145.                 echo 'Niente da segnalare';echo "\n";
  146.             }
  147.             echo '</td></tr>';echo "\n";
  148.         }
  149.  
  150.         function print_table_foot( )
  151.         {
  152.             echo '</table><br />';echo "\n";
  153.         }
  154.  
  155.         function print_header( )
  156.         {
  157.             echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"';echo "\n";
  158.             echo '"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">';echo "\n";
  159.             echo '<html>';echo "\n";
  160.             echo '<head>';echo "\n";
  161.             echo '<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>';echo "\n";
  162.             echo '<style type="text/css">';echo "\n";
  163.             echo '<!--';echo "\n";
  164.             echo 'html {min-height: 100%;}';echo "\n";
  165.  
  166.             echo '* {';echo "\n";
  167.             echo '    margin: 0;';echo "\n";
  168.             echo '    padding: 0;';echo "\n";
  169.             echo '}';echo "\n";
  170.  
  171.             echo 'a {color: #CC3; cursor: pointer; cursor: hand;}';echo "\n";
  172.             echo 'a:hover {color: #FF3; cursor: pointer; cursor: hand;}';echo "\n";
  173.  
  174.             echo 'body {';echo "\n";
  175.             echo 'background: #000;';echo "\n";
  176.             echo 'color: #DDD;';echo "\n";
  177.             echo 'font: normal 11px "Trebuchet MS",Verdana,sans-serif;';echo "\n";
  178.             echo 'padding-left: 90px;';echo "\n";
  179.             echo '}';echo "\n";
  180.             echo '.table {';echo "\n";
  181.             echo 'border: 1px solid #DDD;';echo "\n";
  182.             echo '}';echo "\n";
  183.             echo '.table_header {';echo "\n";
  184.             echo 'border: #fff; border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom-style: solid; border-bottom-width: 1px';echo "\n";
  185.             echo 'color: #000;';echo "\n";
  186.             echo '}';echo "\n";
  187.             echo '.shell {';echo "\n";
  188.             echo 'font-family: Verdana,sans-serif;';echo "\n";
  189.             echo 'font-weight: bold;';echo "\n";
  190.             echo 'color: #8DCA3F;';echo "\n";
  191.             echo '}';echo "\n";
  192.             echo '-->';echo "\n";
  193.             echo '</style>';echo "\n";
  194.             echo '<title>Shell Scanner 0.2alpha</title>';echo "\n";
  195.             echo '</head>';echo "\n";
  196.             echo '<body><br /><center>';echo "\n";
  197.         }
  198.  
  199.         function print_footer( )
  200.         {
  201.             echo '</center></body>';echo "\n";
  202.             echo '</html>';
  203.         }
  204.     }
  205. ?>
submitter » gnopaster | imprint « imprint     
» Terms of use «


Donate via Bitcoin:
1KCq5UvwuTMwgSAHUsd7eqkBWTHZau1ydN