We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bd297a3 commit 623ba6cCopy full SHA for 623ba6c
Reconnoitre/lib/find_dns.py
@@ -27,7 +27,7 @@ def find_dns(target_hosts, output_directory, quiet):
27
28
print(" [>] Testing %s for DNS" % ip_address)
29
DNSSCAN = "nmap -n -sV -Pn -vv -p53 %s" % (ip_address)
30
- results = subprocess.check_output(DNSSCAN, shell=True).decode("utf-8")
+ results = subprocess.check_output(DNSSCAN, shell=True, text=True)
31
lines = results.split("\n")
32
33
for line in lines:
Reconnoitre/lib/hostname_scan.py
@@ -18,7 +18,7 @@ def hostname_scan(target_hosts, output_directory, quiet):
18
else:
19
SWEEP = "nbtscan -q %s" % (target_hosts)
20
21
- results = subprocess.check_output(SWEEP, shell=True).decode("utf-8")
+ results = subprocess.check_output(SWEEP, shell=True,text=True)
22
23
24
Reconnoitre/lib/ping_sweeper.py
@@ -23,8 +23,7 @@ def ping_sweeper(target_hosts, output_directory, quiet):
def call_nmap_sweep(target_hosts):
SWEEP = "nmap -n -sP %s" % (target_hosts)
25
26
- results = subprocess.check_output(SWEEP, shell=True)
- lines = str(results).encode("utf-8").split("\n")
+ results = subprocess.check_output(SWEEP, shell=True, text=True)
return lines
Reconnoitre/lib/service_scan.py
@@ -20,7 +20,7 @@ def nmap_scan(
QUICKSCAN = "nmap -sC -sV -Pn --disable-arp-ping %s -oA '%s/%s.quick'" % (
ip_address, output_directory, ip_address)
quickresults = subprocess.check_output(
- QUICKSCAN, shell=True).decode("utf-8")
+ QUICKSCAN, shell=True,text=True)
write_recommendations(quickresults, ip_address, output_directory)
print("[*] TCP quick scans completed for %s" % ip_address)
@@ -70,8 +70,8 @@ def nmap_scan(
70
71
72
udpresult = "" if no_udp_service_scan is True else subprocess.check_output(
73
- UDPSCAN, shell=True).decode("utf-8")
74
- tcpresults = subprocess.check_output(TCPSCAN, shell=True).decode("utf-8")
+ UDPSCAN, shell=True, text=True)
+ tcpresults = subprocess.check_output(TCPSCAN, shell=True, text=True)
75
76
write_recommendations(tcpresults + udpresult, ip_address, output_directory)
77
print("[*] TCP%s scans completed for %s" %
Reconnoitre/lib/snmp_walk.py
@@ -76,7 +76,8 @@ def snmp_scans(ip_address, output_directory):
subprocess.check_output(
SCAN,
78
stderr=subprocess.STDOUT,
79
- shell=True).decode("utf-8").decode('utf-8')
+ shell=True,
80
+ text=True)
81
except Exception:
82
print("[+] No Response from %s" % ip_address)
83
except subprocess.CalledProcessError:
0 commit comments