summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralexej996 <aleksej@spidermail.tk>2018-10-04 20:52:38 +0200
committeralexej996 <aleksej@spidermail.tk>2018-10-04 20:52:38 +0200
commitc87cee411117cf669601c7529a369c4884b4d4bc (patch)
tree96b3d680945d4d5c31d033f30425dba88a48a71c
parent37b6afbe55efec62b0b970d9570c979f0faa1c5d (diff)
add version argument
-rwxr-xr-xtmap9
1 files changed, 9 insertions, 0 deletions
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 <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":