#!/usr/bin/python # Targeted nmap scan script with 20 targeted ports defined import subprocess,os,sys author = "\n./targeted_nmap coded by bostonlink\n" usage = """./targeted_nmap.py ip file_output_name example: ./targeted_nmap.py 1.2.3.4 int_pentest\n""" if len(sys.argv) != 3: print(author) print("check the arguments - script needs IP range or address and file name defined see usage and example below") print(usage) sys.exit(0) subprocess.Popen("nmap -sS -PN %s -p 0,21-23,25,80,110,135-139,443,445,3389,4444,5000,5800-5801,5900-5901,6000,8080,10000 --reason -oA %s" % (sys.argv[1],sys.argv[2]), shell=True).wait() print("\nNmap scan has finished see output files within the directory you ran this script in") print("brought to you by: bostonlink - pentest-labs.org\n")