Skip to content

Instantly share code, notes, and snippets.

@macostag
Created June 2, 2019 19:33
Show Gist options
  • Save macostag/07ae8a9a00876d4124ba9649fe8b157f to your computer and use it in GitHub Desktop.
Save macostag/07ae8a9a00876d4124ba9649fe8b157f to your computer and use it in GitHub Desktop.
Port scan automation.
import subprocess
f = open("hosts.txt", "r")
for line in f.readlines():
ip=line.strip()
report='masscan-' + ip + '.xml'
subprocess.call(['./masscan',ip,'-p0-65535','--rate','100','-oX',report])
ip=""
report=""
f.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment