summaryrefslogtreecommitdiff
path: root/tmap
diff options
context:
space:
mode:
Diffstat (limited to 'tmap')
-rwxr-xr-xtmap17
1 files changed, 10 insertions, 7 deletions
diff --git a/tmap b/tmap
index 5a3562f..e5476ee 100755
--- a/tmap
+++ b/tmap
@@ -210,18 +210,21 @@ def main():
r = dict()
for h in HOSTS:
r = hostScan(h, PORTS, WAIT_TIME, CLEARNET, JOBS)
- f.write("Results for: {}\n".format(h))
for i in r.keys():
if len(r[i]) != 0:
- f.write('{} open ports: {}\n'.format(i, str(r[i])))
- if BANNER:
- f.write('PORT\tBANNER\n')
+ f.write('Tmap scan report for {}\n'.format(i))
+ if BANNER == False:
+ f.write('PORT\tSTATE\n')
+ for j in r[i]:
+ f.write('{}\topen\n'.format(j))
if BANNER:
+ f.write('PORT\tSTATE\tBANNER\n')
for j in r[i]:
banner = getBanner(i,j,WAIT_TIME, CLEARNET)
- if banner == "banner_error" or banner == '':
- continue
- f.write('{}\t{}\n'.format(j,banner))
+ if banner == "banner_error":
+ f.write('{}\topen\n'.format(j))
+ else:
+ f.write('{}\topen\t{}\n'.format(j,banner))
## Record time of program stopping and display the time running to the user
endTime = time.time()