From d60d751127518f744ce6004eef3393d99e348346 Mon Sep 17 00:00:00 2001 From: sneakerhax Date: Fri, 19 Nov 2021 17:36:05 -0800 Subject: [PATCH] Update curl module --- modules/curl.py | 10 ++++------ modules/whois.py | 4 ++-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/modules/curl.py b/modules/curl.py index e9cdfe8..a1a656b 100644 --- a/modules/curl.py +++ b/modules/curl.py @@ -5,12 +5,10 @@ def urllib_curl(host_list): for host in host_list: try: response = urllib.request.urlopen(host) - print(host) - print(response.read()) - print("\n") + print("[+] " + host + " " + "Response code: " + str(response.getcode())) except urllib.error.URLError as error: - print("[-] Unable to curl: " + str(error.reason)) + print("[-] Unable to curl " + str(host) + ": " + str(error.reason)) except urllib.error.HTTPError as error: - print("[-] Unable to curl: " + str(error.reason)) + print("[-] Unable to curl " + str(host) + ": " + str(error.reason)) except ValueError as error: - print("[-] Unable to curl: " + str(error)) + print("[-] Unable to curl " + str(host) + ": " + str(error)) diff --git a/modules/whois.py b/modules/whois.py index 6cc11f2..8d1c8ab 100644 --- a/modules/whois.py +++ b/modules/whois.py @@ -1,10 +1,10 @@ -import whois as whois2 +import whois def get_whois_org(host_list): for host in host_list: try: - w = whois2.whois(host) + w = whois.whois(host) print("[+] Whois data for " + str(host) + ":") print("Org: " + w.org) print("Country: " + w.country)