-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfind.php
More file actions
58 lines (56 loc) · 1.62 KB
/
find.php
File metadata and controls
58 lines (56 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
/*
Coded by Zeerx7
*/
echo "
Coded by Zeerx7 (XploitSec-ID)
Input List-> ";
$i = readline();
$a = "https://tools.hack.co.id/subdomain/";
if(file_exists($i)){
$d = trim(file_get_contents($i));
$p = explode("\n",$d);
foreach($p as $s){
$s = preg_replace("~http://|https://|/|www\.~","",$s);
$post = "domain=$s";
echo ">>> $s\n";
$data = curl($a,$post);
if($data){
sub($data);
}
}
}
function sub($data){
$x = $data; //file_get_contents('ex.html');
$z = str_replace("\n",'~_|_~',$x);
preg_match_all("`<tr>(.+?)</tr>`i",$z,$r);
//print_r($r[1]);
foreach($r[1] as $w){
$w = str_replace("~_|_~","\n",$w);
//echo $w;
preg_match_all("`\">(.+?)</a></td>`",$w,$f); preg_match_all("`<td>(.+?)</td>`",$w,$h);
$dom = $f[1][0];
$ip = $h[1][2];
if(!empty($dom) and $ip !== '<span></span>'){
if($dom){
echo $dom." [$ip]\n";
fwrite(fopen("sub.txt","a+"),$dom."\n");
}
}else{
echo "(Ip Empty) ".$dom."\n";
}
}
}
function curl($url,$post){
$curlHandle = curl_init();
curl_setopt($curlHandle, CURLOPT_USERAGENT, "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.13.1 Chrome/73.0.3683.105 Safari/537.36"); // UA mein browser
curl_setopt($curlHandle, CURLOPT_URL, $url);
curl_setopt($curlHandle, CURLOPT_POSTFIELDS, $post);
curl_setopt($curlHandle, CURLOPT_HEADER, 0);
curl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curlHandle, CURLOPT_TIMEOUT,30);
curl_setopt($curlHandle, CURLOPT_POST, 1);
$output = curl_exec($curlHandle);
curl_close($curlHandle);
return $output;
}