Advertisement
Lulz-Tigre

wpdeface

Jul 7th, 2016
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.99 KB | None | 0 0
  1. <?php
  2.   /*
  3.   ** Coded by tigre / constatine in 19/03/2015.
  4.   ** Site: ///////////////
  5.   ** Domain sintaxe: www.host.com
  6.   */
  7.   error_reporting(0);
  8.   function main () {
  9.     if ($_SERVER['argc'] == 3) {
  10.       $list_of_domains = $_SERVER['argv'][1];
  11.       $list_of_output = $_SERVER['argv'][2];
  12.       $counter = 0;
  13.       show_banner();
  14.       print "\n -> WP Search started...\n\n";
  15.       if (($p = fopen($list_of_domains, 'r')) != null) {
  16.         while(!feof($p)) {
  17.           $domain = fgets($p);
  18.           $domain = str_replace(array("\n", "\r"), '', $domain);
  19.           $response = send_http_request($domain);
  20.           $array = explode("\n\r", $response);
  21.           $array = trim($array[0]);
  22.           if (strstr($array, " 200 OK")) {
  23.             print (" [". $counter ."] -> http://". $domain ."/wp-login.php -> 200 OK!\n");
  24.             save_domain ("http://". $domain . "/wp-login.php", $list_of_output);
  25.           }
  26.           else
  27.             print (" [". $counter ."] -> http://". $domain ."/wp-login.php -> 404 Not Found!\n");
  28.           $counter ++;
  29.         }
  30.         fclose($p);
  31.       }
  32.     }
  33.     else {
  34.       show_banner();
  35.       print ("\n Use: php ". $_SERVER['argv'][0] ." list_of_domains.txt output.txt\n");
  36.     }
  37.   }
  38.   function send_http_request ($host) {
  39.     $path = "/wp-login.php";
  40.     $port = 80;
  41.     $response = "";
  42.     $header  = "GET ". $path ." HTTP/1.1\r\n";
  43.     $header .= "Host: ". $host ."\r\n";
  44.     $header .= "User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:33.0) Gecko/20100101 Firefox/33.0\r\n";
  45.     $header .= "Connection: close\r\n\r\n";;
  46.     if (($fp = fsockopen($host, $port, $e, $err, 3)) != false) {
  47.       socket_set_timeout ($fp, 3);
  48.       fwrite($fp, $header);
  49.       while (!feof($fp)) {
  50.         $response .= fgets($fp, 200);
  51.         if (strstr($response, "\r\n\r\n")) {
  52.           $response = explode("\r\n\r\n", $response);
  53.           $response = $response[0];
  54.           break;
  55.         }
  56.       }
  57.       fclose($fp);
  58.     }
  59.     return $response;
  60.   }
  61.   function save_domain ($domain, $list_of_output) {
  62.     if (($fp = fopen($list_of_output, "a+")) != null) {
  63.       fprintf($fp, $domain . "\n");
  64.       fclose($fp);
  65.     }
  66.   }
  67.   function show_banner () {
  68.     print "\n                             `-/+osssssssssssso+/-`\n";
  69.     print "                         ./oys+:.`            `.:+syo/.\n";
  70.     print "                      .+ys:.   .:/osyyhhhhyyso/:.   ./sy+.\n";
  71.     print "                    /ys:   -+ydmmmmmmmmmmmmmmmmmmdy+-   :sy/\n";
  72.     print "                  /h+`  -odmmmmmmmmmmmmmmmmmmmmmmmmmmdo-  `+h/\n";
  73.     print "                :ho`  /hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmds/   `oh:\n";
  74.     print "              `sy.  /hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmd+        .ys`\n";
  75.     print "             .ho  `sdddhhhyhmmmdyyhhhdddddhhhyydmmmmy           oh.\n";
  76.     print "            .h+          ``-dmmy.``         ``.ymmmmh            +h.\n";
  77.     print "           `ho  `       /mmmmmmmmmmo       .dmmmmmmmms        ~~  oh`\n";
  78.     print "           oy  .h`       ymmmmmmmmmm:       /mmmmmmmmmy`      -d.  yo\n";
  79.     print "          .d-  ymy       `dmmmmmmmmmd.       ymmmmmmmmmh`     /my  -d.\n";
  80.     print "          oy  -mmm+       /mmmmmmmmmmy       .dmmmmmmmmmy     ymm-  yo\n";
  81.     print "          h+  +mmmd-       smmmmmmmmmm+       /mmmmmmmmmm-   :mmm+  +h\n";
  82.     print "          d/  smmmmh`      `dmmmmmmmmmd`       smmmmmmmmm:  `dmmms  /d\n";
  83.     print "          d/  smmmmms       :mmmmmmmmm+        `dmmmmmmmd.  smmmms  /d\n";
  84.     print "          h+  +mmmmmm/       smmmmmmmh  +       /mmmmmmmy  /mmmmm+  +h\n";
  85.     print "          oy  -mmmmmmd.      `dmmmmmd- +m/       smmmmmd. .dmmmmm-  yo\n";
  86.     print "          .d-  ymmmmmmh       :mmmmm+ .dmd-      `dmmmm/  ymmmmmy  -d.\n";
  87.     print "           oy  .dmmmmmmo       smmmh  hmmmh`      :mmmy  +mmmmmd.  yo\n";
  88.     print "           `ho  -dmmmmmd:      `dmd- ommmmms       smd- .dmmmmd-  oh`\n";
  89.     print "            .h+  -dmmmmmd`      :m+ -dmmmmmm:      `do  hmmmmd-  +h.\n";
  90.     pr
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement