diff options
author | alexej996 <aleksej@spidermail.tk> | 2018-10-28 00:54:59 +0200 |
---|---|---|
committer | alexej996 <aleksej@spidermail.tk> | 2018-10-28 00:54:59 +0200 |
commit | 0bd0ef4a80d9d73c4d0d8fb271be154c2d262602 (patch) | |
tree | c5a4a20a8c99c2a1d43b714fc55b0f2cdd83607a /tmap | |
parent | 3f78328c9b5fdc7b4151bb887ac73e1173ad7dbb (diff) |
move printing of open ports from connScan to portScan
Diffstat (limited to 'tmap')
-rwxr-xr-x | tmap | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -14,10 +14,9 @@ def connScan(host, port, wait, notor): sckt = socks.socksocket() sckt.settimeout(wait) - ## Try to connect, print to stdout on success + ## Try to connect, return True on success try: sckt.connect((host, port)) - print("[+] port {} on {} is open".format(port, host)) sckt.close() return True except KeyboardInterrupt: @@ -32,6 +31,7 @@ def portScan(host, ports, wait, notor): for p in ports: if connScan(host, p, wait, notor): openPorts += 1 + print("[+] port {} on {} is open".format(p, host)) print("{} open ports on {} .".format(openPorts, host)) def main(): |