diff options
author | alexej996 <aleksej@spidermail.tk> | 2018-10-04 20:52:38 +0200 |
---|---|---|
committer | alexej996 <aleksej@spidermail.tk> | 2018-10-04 20:52:38 +0200 |
commit | c87cee411117cf669601c7529a369c4884b4d4bc (patch) | |
tree | 96b3d680945d4d5c31d033f30425dba88a48a71c /tmap | |
parent | 37b6afbe55efec62b0b970d9570c979f0faa1c5d (diff) |
add version argument
Diffstat (limited to 'tmap')
-rwxr-xr-x | tmap | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -38,6 +38,7 @@ def main(): ## Define and parse the arguments parser = argparse.ArgumentParser(description="Simple port scanner that works over Tor") + parser.add_argument("--version", dest="version", help="print version info and exit", action="store_true") parser.add_argument("HOSTS", help="IP or domain to scan", default="empty_host", nargs="?") parser.add_argument("-H", "--hosts", metavar="HOSTS", dest="tgtHost", help="IP or domain to scan", default="empty_host_option") parser.add_argument("-p", "--ports", metavar="PORTS", dest="tgtPort", help="ports to scan", default="21,22,23,25,53,80,443,8080,8333,9050,9150") @@ -47,6 +48,14 @@ def main(): args = parser.parse_args() + ## Version argument + if args.version: + print("Tmap 1.0.0") + print("License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>") + print("This is free software: you are free to change and redistribute it.") + print("There is NO WARRANTY, to the extent permitted by law.") + exit() + ## Combine HOST and --hosts values if args.HOSTS == "empty_host": if args.tgtHost == "empty_host_option": |