diff options
-rw-r--r-- | README.md | 2 | ||||
-rwxr-xr-x | tmap | 14 |
2 files changed, 8 insertions, 8 deletions
@@ -7,7 +7,7 @@ It was modifed to work over **Tor** for anonymous and hidden service scanning. ### Dependencies Tmap is a python script that requries the **socks** module and a running Tor deamon on localhost. -Tmap is built to support **pyhton3**. +Tmap is built to support **python3**. ### Usage: `./tmap [-h] -H HOSTS [-p PORTS] [-t TIMEOUT] [--clearnet] [--torport TORPORT]` @@ -148,12 +148,7 @@ def hostScan(host, ports, wait, notor, jobs): return ret -def main(): - ## Record time of program starting in seconds - startTime = time.time() - - ## Define and parse the arguments - parser = argparse.ArgumentParser(description="Simple stateful port scanner that works over Tor") +def parseArgs(parser): parser.add_argument("--version", dest="version", help="print version information and exit", action="store_true") parser.add_argument("HOSTS", help="IP address or domain to scan", default="empty_host", nargs="?") parser.add_argument("-H", "--hosts", metavar="HOSTS", dest="tgtHost", help="IP address or domain to scan", default="empty_host_option") @@ -164,8 +159,13 @@ def main(): parser.add_argument("--torport", metavar="TORPORT", dest="torPort", type=int, help="port on which Tor is listening on", default="9050") parser.add_argument("-j", "--jobs", metavar="JOBS", dest="jobs", type=int, help="maximum number of open connections at the same time", default="10") parser.add_argument("--output", metavar="OUTFILE", dest="outFile", help="write scan results to output file", default="empty_outfile") + return parser.parse_args() - args = parser.parse_args() + +def main(): + ## Record time of program starting in seconds + startTime = time.time() + args = parseArgs(argparse.ArgumentParser(description="Simple stateful port scanner that works over Tor")) ## Version argument if args.version: |