summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstevan <stevannestorovic@hotmail.com>2018-11-17 23:28:40 +0100
committerstevan <stevannestorovic@hotmail.com>2018-11-17 23:28:40 +0100
commit40c4bd5785d3f96faff7933414b83f0917b7a9db (patch)
tree059c9ede1319c2a91c7e1d6781147742d8f28c29
parentbcaf045c8744492a0c617b71032c9ba2c334f383 (diff)
Added host info for current host scanning. Changed portScan function not to waste time on ports bigger than 65536
-rwxr-xr-xtmap8
1 files changed, 6 insertions, 2 deletions
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":