diff options
author | stevan <stevannestorovic@hotmail.com> | 2018-11-17 23:28:40 +0100 |
---|---|---|
committer | stevan <stevannestorovic@hotmail.com> | 2018-11-17 23:28:40 +0100 |
commit | 40c4bd5785d3f96faff7933414b83f0917b7a9db (patch) | |
tree | 059c9ede1319c2a91c7e1d6781147742d8f28c29 /tmap | |
parent | bcaf045c8744492a0c617b71032c9ba2c334f383 (diff) |
Added host info for current host scanning. Changed portScan function not to waste time on ports bigger than 65536
Diffstat (limited to 'tmap')
-rwxr-xr-x | tmap | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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": |