Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
R00tS3c
GitHub Repository: R00tS3c/DDOS-RootSec
Path: blob/master/DDOS Scripts/L7/CF-Bypasser.php
4607 views
1
<?php
2
3
# CloudFlare Bypasser
4
# Coded By OmidKiller.
5
# For Your Projects...
6
function is_ipv4($ip)
7
{
8
return filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) ? $ip : '(Null)';
9
}
10
11
$me = $argv[0];
12
$url = @$argv[1];
13
14
if(!isset($url))
15
die("\n[+] Usage: php {$me} <url>\n[+] Example: php {$me} http://www.omid-killer.info\n");
16
17
if(!preg_match('/^(https?):\/\/(w{3}|w3)\./i', $url))
18
die("\nURL is invalid.\nURL must be formatted as: http(s)://www." . preg_replace('/^(https?):\/\//', '', $url) . "\n(for compatibility reasons)\n");
19
20
$headers = get_headers($url, 1);
21
$server = $headers['Server'];
22
23
$sdom = array('cpanel.', 'ftp.', 'mail.', 'webmail.', 'direct.', 'direct-connect.', 'record.', 'ssl.', 'dns.', 'help.', 'blog.', 'forum.');
24
$count = count($sdom);
25
26
if(preg_match('/^(https?):\/\/(w{3}|w3)\./i', $url, $matches))
27
{
28
if($matches[2] != 'www')
29
{
30
$url = preg_replace('/^(https?):\/\//', '', $url);
31
}
32
else
33
{
34
$url = explode($matches[0], $url);
35
$url = $url[1];
36
}
37
}
38
39
if(is_array($server))
40
$server = $server[0];
41
42
if(preg_match('/cloudflare/i', $server))
43
echo "\n[+] CloudFlare detected: {$server}\n";
44
else
45
echo "\n[+] CloudFlare wasn't detected, proceeding anyway.\n";
46
47
echo '[+] IP: ' . is_ipv4(gethostbyname($url)) . "\n\n";
48
echo "[+] Searching for more IP addresses.\n\n";
49
50
for($x = 0; $x < $count; $x++)
51
{
52
$site = $sdom[$x] . $url;
53
$ip = is_ipv4(gethostbyname($site));
54
55
echo "Trying {$site}: {$ip}\n";
56
}
57
58
echo "\n[+] Finished.\n";
59
60
?>
61
62
63
64