Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- ** Coded by Tr3v0r & constantine in 19/03/2015.
- ** Site: constantine.sourceforge.net
- ** Domain sintaxe: www.host.com
- */
- error_reporting(0);
- function main () {
- if ($_SERVER['argc'] == 3) {
- $list_of_domains = $_SERVER['argv'][1];
- $list_of_output = $_SERVER['argv'][2];
- $counter = 0;
- show_banner();
- print "\n -> Drupal Search started...\n\n";
- if (($p = fopen($list_of_domains, 'r')) != null) {
- while(!feof($p)) {
- $domain = fgets($p);
- $domain = str_replace(array("\n", "\r"), '', $domain);
- $response = send_http_request($domain);
- $array = explode("\n\r", $response);
- $array = trim($array[0]);
- if (strstr($array, " 200 OK")) {
- print (" [". $counter ."] -> http://". $domain ."/user/login/index.php -> 200 OK!\n");
- save_domain ("http://". $domain . "/user/login/index.php", $list_of_output);
- }
- else
- print (" [". $counter ."] -> http://". $domain ."/user/login/index.php -> 404 Not Found!\n");
- $counter ++;
- }
- fclose($p);
- }
- }
- else {
- show_banner();
- print ("\n Use: php ". $_SERVER['argv'][0] ." list_of_domains.txt output.txt\n");
- }
- }
- function send_http_request ($host) {
- $path = "/user/login/index.php";
- $port = 80;
- $response = "";
- $header = "GET ". $path ." HTTP/1.1\r\n";
- $header .= "Host: ". $host ."\r\n";
- $header .= "User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:33.0) Gecko/20100101 Firefox/33.0\r\n";
- $header .= "Connection: close\r\n\r\n";;
- if (($fp = fsockopen($host, $port, $e, $err, 3)) != false) {
- socket_set_timeout ($fp, 3);
- fwrite($fp, $header);
- while (!feof($fp)) {
- $response .= fgets($fp, 200);
- if (strstr($response, "\r\n\r\n")) {
- $response = explode("\r\n\r\n", $response);
- $response = $response[0];
- break;
- }
- }
- fclose($fp);
- }
- return $response;
- }
- function save_domain ($domain, $list_of_output) {
- if (($fp = fopen($list_of_output, "a+")) != null) {
- fprintf($fp, $domain . "\n");
- fclose($fp);
- }
- }
- function show_banner () {
- print "\n `s-\n";
- print " /:y+`\n";
- print " .o oyy/`\n";
- print " `-/``oyyyy/.\n";
- print " .::..-oyyyyyyys/-`\n";
- print " .-::.` `::yyyyyyyyyyyys+:.\n";
- print " `.-:.` `-:oyyyyyyyyyyyyyyyys/-\n";
- print " .::.` `.:+syyyyyyyyyyyyyyyyyyyys/`\n";
- print " -:.` `-:+syyyyyyyyyyyyyyyyyyyyyyyyy/`\n";
- print " -:. `.-/+syyyyyyyyyyyyyyyyyyyyyyyyyyyyy/`\n";
- print " ./- `.-:+oyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyys-\n";
- print " -+-```.-:/+oyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyhh/\n";
- print " :y::::/+osyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyhhh+\n";
- print " :yyssssyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyhhhh/\n";
- print " .yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyhhhhhh:\n";
- print " syyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyhhhhhhy`\n";
- print " -hyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyhhhhhhhh/\n";
- print " +yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyhhhhhhhhhhy\n";
- print " syyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyhhhhhhhhhhhhh`\n";
- print " yyyyyyyyyyyyyyyyyyyyssoo++osyyyyyyyyyyyyyyyyhhhhhhhhhhhhhhh`\n";
- print " syyyyyyyyyyyyyyyyo:. .-+syyyyyyyyyyhhhhhhhs/-.-:shhh`\n";
- print " +yyyyyyyyyyyyyy+. ./syyyyyhhhhhhs/. ohy\n";
- print " -hyyyyyyyyyyyy: ./shhhhhs/. .h+\n";
- print " syyyyyyyyyyy/ .::-` .h`\n";
- print " .hyyyyyyyyyy. `-//-` //\n";
- print " :hyyyyyyyyy- ./shhhhhho. `+\n";
- print " :hyyyyyyyys` `:+yhhhsssshhhho. `+\n";
- print " -yhhyyyyyys/. `-/shhhy+.`---.`/hhhho. :/\n";
- print " `ohhhhhhhhhhyo+++++oyhhhhhhy`:shhhhhs.shhhhhyooo-\n";
- print " -shhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhy/`\n";
- print " -ohhhhhhhhhhhhhhhy/+yhhhhhhhhhhhhs//hhhs/`\n";
- print " ./shhhhhhhhhhhhy:.``-::://::-..:+yy+-`\n";
- print " .:oyhhhhhhhhhhhyo+++++++osyso/-`\n";
- print " ``-/+ssyhhhhhhhhhyyso+:.`\n";
- print " ````......````\n";
- print " Drupal search - By Tr3v0r.\n\n";
- print " Contact: @MatheusTDashh\n";
- print " https://github.com/Tr3v0r\n";
- }
- main();
- /* EOF. */
- ?>
Advertisement
Add Comment
Please, Sign In to add comment