This repository was archived by the owner on Aug 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgrab.php
138 lines (138 loc) · 3.44 KB
/
grab.php
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<?php
//
// Coded by Zeerx7
// XploitSec ID
///
// mau record ya? izin gan :v
// zeerx7@gmail.com <> 0895320325423
//
$G = "\e[92m";
$R = "\e[91m";
$Y = "\e[93m";
$B = "\e[94m";
$P = "\e[35m";
$C = "\e[36m";
$end = $P."\n\n-----------$R End $P-----------\n";
$preg = [
"archive" => "#\"><td>(.+?)<td>#",
"special" => "#3;<td>(.+?)<td>#",
"attacker1" => "#3;<td>(.+?)<td>#",
"attacker2" => "#\"><td>(.+?)<td>#"
];
pausi();
echo $B."\nOption:\n$Y"."1. Grab From Archive \n2. Grab From Special \n3. Grab From attacker ID\n$G"."Pilih-> ";
$pilih = trim(fgets(STDIN));
$mirror = "https://zone-d.org/mirror";
if($pilih == 1){
$pausi = $preg['archive'];
$n = "archive";
}elseif($pilih == 2){
$pausi = $preg['special'];
$n = "special";
}elseif($pilih == 3){
attacker();
}else{
echo $R."Error Input !!\n\n";
exit;
}
$q = curl("$mirror/$n");
preg_match("#<span>Page 1 of (.+?): </span>#",$q,$z);
echo "Total ".$z[1]." Page \nGrab berapa page?\n=>";
$pa = trim(fgets(STDIN));
$simpan = "result/$n.txt";
echo $C."List web akan tersimpan di $simpan\n";
$sep = fopen($simpan,"w");
$i = 1;
while ($i <= $pa){
echo $G."\n\n-------$R Grab Page $i $G-------\n";
$f = curl("$mirror/$n/$i");
preg_match_all($pausi,$f,$p);
foreach ($p[1] as $ganteng){
$ganteng = parse($ganteng);
echo $B.$ganteng."\n";
fwrite($sep,$ganteng."\n");
}
$i=$i+1;
}
echo $end;
echo $C."Result tersimpan di $simpan\n";
fclose($sep);
//echo $f;
function curl($url){
$agent = "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0";
$header = array('Content-Type: application/x-www-form-urlencoded');
$timeout = 10;
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
curl_setopt($ch, CURLOPT_ENCODING, '');
$_ = curl_exec($ch);
// echo $_;
curl_close($ch);
return $_;
}function parse($url){
if(!preg_match("%^http://|^https://%",$url)){
$gans = "http://".$url;
}
$wow = parse_url($gans);
$wow = $wow['host'];
return $wow;
}function attacker(){
global $C;
global $R;
global $B;
global $G;
global $P;
global $end;
global $preg;
echo "\nMasukan ID Attacker\nEx:https://zone-d.org/attacker/id/573\n\nId=>> ";
$idatt = trim(fgets(STDIN));
$mirror = "https://zone-d.org/attacker/id";
$pausi = $preg['attacker1'];
$pausi2= $preg['attacker2'];
$n = $idatt;
$q = curl("$mirror/$n");
preg_match("#<span>Page 1 of (.+?): </span>#",$q,$z);
echo "Total ".$z[1]." Page \nGrab berapa page?\n=>";
$pa = trim(fgets(STDIN));
$simpan = "result/$n.txt";
echo "List web akan tersimpan di $simpan\n";
$sep = fopen($simpan,"w");
$i = 1;
while ($i <= $pa){
echo $G."\n\n-------$R Grab Page $i $G-------\n";
$f = curl("$mirror/$n/$i");
preg_match_all($pausi,$f,$p);
preg_match_all($pausi2,$f,$e);
foreach ($p[1] as $ganteng){
$ganteng = parse($ganteng);
echo $B.$ganteng."\n";
fwrite($sep,$ganteng."\n");
}
foreach ($e[1] as $ganteng){
$ganteng = parse($ganteng);
echo $B.$ganteng."\n";
fwrite($sep,$ganteng."\n");
}
$i=$i+1;
}
echo $end;
echo $C."Result tersimpan di $simpan\n";
fclose($sep);
exit;
}function pausi(){
global $R;
global $Y;
global $G;
echo "$R
/! -- $G Zone-D Grabber$R -- !/
--$Y Coded by Zeerx7(pausi)$R --
-- $Y XploitSec-ID $R --
/! -- /-/-/-/-/-/-/-/- -- !/
";
}
?>