def main(self):
try:
response = subprocess.check_output(["wafw00f", self.get_options("domain")])
if "is behind a" in response:
regex = re.compile("is behind a(.*)")
result = regex.findall(response)
print Fore.GREEN + "* " + Style.RESET_ALL + "Firewall found"
print Fore.BLUE + "* " + Style.RESET_ALL + result[0].strip()
self.export.append(result[0].strip())
else:
print Fore.RED + "* " + Style.RESET_ALL + "Can't get firewall with wafw00f"
except OSError as e:
if e.errno == os.errno.ENOENT:
print e
else:
# Something else went wrong while trying to run `wget`
raise
评论列表
文章目录