Tr3v0r

[PHP] Wordpress Checker coded by Tr3v0r & constantine

Apr 12th, 2016
275
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.43 KB | None | 0 0
  1. <?php
  2.  
  3.   /*
  4.   ** Coded by constantine in 19/03/2015.
  5.   ** Site: constantine.sourceforge.net
  6.   ** Domain sintaxe: www.host.com
  7.   */
  8.  
  9.   error_reporting(0);
  10.  
  11.   function main () {
  12.     if ($_SERVER['argc'] == 3) {
  13.      
  14.       $list_of_domains = $_SERVER['argv'][1];
  15.       $list_of_output = $_SERVER['argv'][2];
  16.       $counter = 0;
  17.      
  18.       show_banner();
  19.       print "\n -> WP Search started...\n\n";
  20.      
  21.       if (($p = fopen($list_of_domains, 'r')) != null) {
  22.         while(!feof($p)) {
  23.           $domain = fgets($p);
  24.           $domain = str_replace(array("\n", "\r"), '', $domain);  
  25.           $response = send_http_request($domain);
  26.           $array = explode("\n\r", $response);
  27.           $array = trim($array[0]);
  28.          
  29.           if (strstr($array, " 200 OK")) {
  30.             print (" [". $counter ."] -> http://". $domain ."/wp-login.php -> 200 OK!\n");
  31.             save_domain ("http://". $domain . "/wp-login.php", $list_of_output);
  32.           }
  33.           else
  34.             print (" [". $counter ."] -> http://". $domain ."/wp-login.php -> 404 Not Found!\n");
  35.          
  36.           $counter ++;
  37.         }
  38.         fclose($p);
  39.       }
  40.     }
  41.     else {
  42.       show_banner();
  43.       print ("\n Use: php ". $_SERVER['argv'][0] ." list_of_domains.txt output.txt\n");
  44.     }
  45.   }
  46.  
  47.   function send_http_request ($host) {
  48.     $path = "/wp-login.php";
  49.     $port = 80;
  50.     $response = "";
  51.    
  52.     $header  = "GET ". $path ." HTTP/1.1\r\n";
  53.     $header .= "Host: ". $host ."\r\n";
  54.     $header .= "User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:33.0) Gecko/20100101 Firefox/33.0\r\n";
  55.     $header .= "Connection: close\r\n\r\n";;
  56.    
  57.     if (($fp = fsockopen($host, $port, $e, $err, 3)) != false) {
  58.       socket_set_timeout ($fp, 3);
  59.       fwrite($fp, $header);
  60.      
  61.       while (!feof($fp)) {
  62.         $response .= fgets($fp, 200);
  63.         if (strstr($response, "\r\n\r\n")) {
  64.           $response = explode("\r\n\r\n", $response);
  65.           $response = $response[0];
  66.           break;
  67.         }
  68.       }
  69.       fclose($fp);
  70.     }
  71.    
  72.     return $response;
  73.   }
  74.  
  75.   function save_domain ($domain, $list_of_output) {
  76.     if (($fp = fopen($list_of_output, "a+")) != null) {
  77.       fprintf($fp, $domain . "\n");
  78.       fclose($fp);
  79.     }
  80.   }
  81.  
  82.   function show_banner () {
  83.     print "\n                             `-/+osssssssssssso+/-`\n";
  84.     print "                         ./oys+:.`            `.:+syo/.\n";
  85.     print "                      .+ys:.   .:/osyyhhhhyyso/:.   ./sy+.\n";
  86.     print "                    /ys:   -+ydmmmmmmmmmmmmmmmmmmdy+-   :sy/\n";
  87.     print "                  /h+`  -odmmmmmmmmmmmmmmmmmmmmmmmmmmdo-  `+h/\n";
  88.     print "                :ho`  /hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmds/   `oh:\n";
  89.     print "              `sy.  /hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmd+        .ys`\n";
  90.     print "             .ho  `sdddhhhyhmmmdyyhhhdddddhhhyydmmmmy           oh.\n";
  91.     print "            .h+          ``-dmmy.``         ``.ymmmmh            +h.\n";
  92.     print "           `ho  `       /mmmmmmmmmmo       .dmmmmmmmms        ~~  oh`\n";
  93.     print "           oy  .h`       ymmmmmmmmmm:       /mmmmmmmmmy`      -d.  yo\n";
  94.     print "          .d-  ymy       `dmmmmmmmmmd.       ymmmmmmmmmh`     /my  -d.\n";
  95.     print "          oy  -mmm+       /mmmmmmmmmmy       .dmmmmmmmmmy     ymm-  yo\n";
  96.     print "          h+  +mmmd-       smmmmmmmmmm+       /mmmmmmmmmm-   :mmm+  +h\n";
  97.     print "          d/  smmmmh`      `dmmmmmmmmmd`       smmmmmmmmm:  `dmmms  /d\n";
  98.     print "          d/  smmmmms       :mmmmmmmmm+        `dmmmmmmmd.  smmmms  /d\n";
  99.     print "          h+  +mmmmmm/       smmmmmmmh  +       /mmmmmmmy  /mmmmm+  +h\n";
  100.     print "          oy  -mmmmmmd.      `dmmmmmd- +m/       smmmmmd. .dmmmmm-  yo\n";
  101.     print "          .d-  ymmmmmmh       :mmmmm+ .dmd-      `dmmmm/  ymmmmmy  -d.\n";
  102.     print "           oy  .dmmmmmmo       smmmh  hmmmh`      :mmmy  +mmmmmd.  yo\n";
  103.     print "           `ho  -dmmmmmd:      `dmd- ommmmms       smd- .dmmmmd-  oh`\n";
  104.     print "            .h+  -dmmmmmd`      :m+ -dmmmmmm:      `do  hmmmmd-  +h.\n";
  105.     print "             .ho  .ymmmmmy       + `hmmmmmmmd.      :` ommmmy.  oh.\n";
  106.     print "              `sy.  /hmmmm+        ommmmmmmmmy        -dmmh/  .ys`\n";
  107.     print "                :ho`  /hmmd-      :mmmmmmmmmmmo      `hmh/  `oh:\n";
  108.     print "                  /h+`  -odh`    `dmmmmmmmmmmmd:     oo-  `+h/\n";
  109.     print "                    /ys:   ~~    smmmmmmmmmmmmmd`       :sy/\n";
  110.     print "                      .+ys/.    `/osyyhhhhyyso/:`   ./sy+.\n";
  111.     print "                         ./oys+:.`            `.:+syo/.\n";
  112.     print "                             `-/+osssssssssssso+/-`\n\n";
  113.     print "                           WP search - By Constantine & Tr3v0r.\n\n";
  114.     print "                        Greatz for P0cl4bs and my friends...\n";
  115.     print "                            https://github.com/P0cL4bs\n\n";
  116.     print "      L1sbeth, foreach, 0x29a, xstpl, sup3rman, j0shua3w, Mmxm, Anonymous_\n";
  117.     print "  lpax, c00ler, m0nad, sigsegv, enygmata, eremitah, Otacon, KvN, Al3xG0, Erick \n";
  118.     print " H3LLS1ng, Eletronico, l4rg4d0, mvrech, DarkCrypter, nbdu1nder, Orc, Snow, Nosomy\n";
  119.     print "    Arion, LiFux, Zeus, Chainksain, shadow, _mlk_, sexpistol, Haxixe, shadow \n";
  120.     print " 0fx66, ecx, ph4ck3r, bl4de, DarkCrypter, Depois, K4r4t3k1d... and all friends.\n";
  121.   }
  122.  
  123.   main();
  124.  
  125.   /* EOF. */
  126.  
  127. ?>
Advertisement
Add Comment
Please, Sign In to add comment