mirror of
https://github.com/ghndrx/nmap.git
synced 2026-02-10 06:55:03 +00:00
Update nmap.py
I have moved the variables addOaValid and oaAdder to the cmdList() function and removed the global keyword. I have also removed the passing of oaAdder variable to cmd_list() function as
This commit is contained in:
19
nmap.py
19
nmap.py
@@ -1,10 +1,6 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
import os
|
import os
|
||||||
|
|
||||||
# Global Elite(variables)
|
|
||||||
addOaValid = "0"
|
|
||||||
oaAdder = ""
|
|
||||||
|
|
||||||
# Functions
|
# Functions
|
||||||
def fpingTxt():
|
def fpingTxt():
|
||||||
fpingTarget = input("Set fping range for scan: (192.168.1.0-254)")
|
fpingTarget = input("Set fping range for scan: (192.168.1.0-254)")
|
||||||
@@ -48,10 +44,15 @@ def menuSelector():
|
|||||||
return menuChoice
|
return menuChoice
|
||||||
|
|
||||||
def cmdList():
|
def cmdList():
|
||||||
|
addOaValid = "0"
|
||||||
|
oaAdder = ""
|
||||||
menuChoice = menuSelector()
|
menuChoice = menuSelector()
|
||||||
os.system("cd")
|
os.system("cd")
|
||||||
if menuChoice == "0": os.system("nmap -T4 -sn -iL ~/fping.txt %s" % oaAdder)
|
switch = {
|
||||||
elif menuChoice == "1": os.system("nmap -T4 -p- -iL ~/fping.txt %s" % oaAdder)
|
"0": "nmap -T4 -sn -iL ~/fping.txt %s" % oaAdder,
|
||||||
elif menuChoice == "2": os.system("nmap -T4 -O -sT -sV -iL ~/fping.txt %s" % oaAdder)
|
"1": "nmap -T4 -p- -iL ~/fping.txt %s" % oaAdder,
|
||||||
elif menuChoice == "3": os.system("nmap -T4 -sX -iL ~/fping.txt %s" % oaAdder)
|
"2": "nmap -T4 -O -sT -sV -iL ~/fping.txt %s" % oaAdder,
|
||||||
elif menuChoice == "4": os.system("masscan -p80 -iL ~/fping.txt %s" % oaAdder)
|
"3": "nmap -T4 -sX -iL ~/fping.txt %s" % oaAdder,
|
||||||
|
"4": "masscan -p80 -iL ~/fping.txt %s" % oaAdder
|
||||||
|
}
|
||||||
|
os.system(switch.get(menuChoice, ""))
|
||||||
|
|||||||
Reference in New Issue
Block a user