From c87cee411117cf669601c7529a369c4884b4d4bc Mon Sep 17 00:00:00 2001 From: alexej996 Date: Thu, 4 Oct 2018 20:52:38 +0200 Subject: add version argument --- tmap | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tmap') diff --git a/tmap b/tmap index e54c447..bc7f360 100755 --- a/tmap +++ b/tmap @@ -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 ") + 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": -- cgit v1.2.3