diff options
author | Aleksej Jocic <aleksej@spidermail.tk> | 2019-01-12 00:39:36 +0100 |
---|---|---|
committer | Aleksej Jocic <aleksej@spidermail.tk> | 2019-01-12 00:39:36 +0100 |
commit | e9420b23c4a7820f93b8118c61685ac1ff6bac4c (patch) | |
tree | 7535128b8e648e1257d06c98951db43ffc5b73e2 /tmap | |
parent | 086b7547949315ad8f36a12df4fd8fac54c14b1e (diff) |
making tmap output more nmapish
Diffstat (limited to 'tmap')
-rwxr-xr-x | tmap | 17 |
1 files changed, 10 insertions, 7 deletions
@@ -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() |