From 40c4bd5785d3f96faff7933414b83f0917b7a9db Mon Sep 17 00:00:00 2001 From: stevan Date: Sat, 17 Nov 2018 23:28:40 +0100 Subject: Added host info for current host scanning. Changed portScan function not to waste time on ports bigger than 65536 --- tmap | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tmap') diff --git a/tmap b/tmap index 3585c21..1eee939 100755 --- a/tmap +++ b/tmap @@ -30,8 +30,8 @@ def portScan(host, ports, wait, notor): openports = list() for p in ports: if p > 65535: - pass - if connScan(host, p, wait, notor): + return openports + elif connScan(host, p, wait, notor): openports.append(p) return openports @@ -164,6 +164,10 @@ def main(): r = dict() for h in HOSTS: r = hostScan(h, PORTS, WAIT_TIME, CLEARNET) + if OUTFILE == "empty_outfile": + print("Results for: {}".format(h)) + else: + f.write("Results for: {}".format(h)) for i in r.keys(): if len(r[i]) != 0: if OUTFILE == "empty_outfile": -- cgit v1.2.3