diff options
Diffstat (limited to 'tmap')
-rwxr-xr-x | tmap | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -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: |