Skip to content

Commit

Permalink
fix: add nmap --top-ports option (#339)
Browse files Browse the repository at this point in the history
  • Loading branch information
ocervell committed Apr 24, 2024
1 parent 663af17 commit 6352be7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions secator/tasks/nmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
OPT_NOT_SUPPORTED, OUTPUT_PATH, PORT, PORTS, PROVIDER,
PROXY, RATE_LIMIT, REFERENCE, REFERENCES,
RETRIES, SCRIPT, SERVICE_NAME, SEVERITY, STATE, TAGS,
THREADS, TIMEOUT, USER_AGENT)
THREADS, TIMEOUT, TOP_PORTS, USER_AGENT)
from secator.output_types import Exploit, Port, Vulnerability
from secator.tasks._categories import VulnMulti
from secator.utils import debug
Expand All @@ -29,11 +29,12 @@ class nmap(VulnMulti):
opt_prefix = '--'
output_types = [Port, Vulnerability, Exploit]
opts = {
PORTS: {'type': str, 'help': 'Ports to scan', 'short': 'p'},
PORTS: {'type': str, 'short': 'p', 'help': 'Ports to scan'},
TOP_PORTS: {'type': int, 'short': 'tp', 'help': 'Top ports to scan [full, 100, 1000]'},
SCRIPT: {'type': str, 'default': 'vulners', 'help': 'NSE scripts'},
# 'tcp_connect': {'type': bool, 'short': 'sT', 'default': False, 'help': 'TCP Connect scan'},
'tcp_syn_stealth': {'is_flag': True, 'short': 'sS', 'default': False, 'help': 'TCP SYN Stealth'},
'output_path': {'type': str, 'short': 'oX', 'default': None, 'help': 'Output XML file path'}
'output_path': {'type': str, 'short': 'oX', 'default': None, 'help': 'Output XML file path'},
}
opt_key_map = {
HEADER: OPT_NOT_SUPPORTED,
Expand Down

0 comments on commit 6352be7

Please sign in to comment.