Skip to content

Commit

Permalink
Merge pull request #97 from Ostorlab/fix/swtich_syn_all_port
Browse files Browse the repository at this point in the history
Change default to all ports with SYN scan.
  • Loading branch information
3asm authored Aug 9, 2024
2 parents 6d1caea + 22328a8 commit 60e5301
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion agent/nmap_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class NmapOptions:
version_detection: bool = True
port_scanning_techniques: List[PortScanningTechnique] = dataclasses.field(
default_factory=lambda: [
PortScanningTechnique.TCP_CONNECT,
PortScanningTechnique.TCP_SYN,
]
)
no_ping: bool = True
Expand Down
2 changes: 1 addition & 1 deletion ostorlab.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ args:
- name: "fast_mode"
description: "Fast mode scans fewer ports than the default mode."
type: "boolean"
value: true
value: false
- name: "ports"
type: "string"
description: "List of ports to scan."
Expand Down
4 changes: 2 additions & 2 deletions tests/nmap_agent_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ def testAgentNmapOptions_whenUrlsScriptsGivent_RunScan(

assert all(
a in options.command_options
for a in ["-sV", "-n", "-p", "0-65535", "-T3", "-sT", "-Pn", "--script"]
for a in ["-sV", "-n", "-p", "0-65535", "-T3", "-sS", "-Pn", "--script"]
)


Expand Down Expand Up @@ -359,7 +359,7 @@ def testAgentNmapOptions_whenUrlsScriptsGivent_RunScan2(

assert all(
a in options.command_options
for a in ["-sV", "-n", "-p", "0-65535", "-T3", "-sT", "-Pn", "--script"]
for a in ["-sV", "-n", "-p", "0-65535", "-T3", "-sS", "-Pn", "--script"]
)


Expand Down
6 changes: 3 additions & 3 deletions tests/nmap_wrapper_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def testNmapWrapper_whenFastMode_returnCommand(
"-n",
"-F",
"-T3",
"-sT",
"-sS",
"--script",
"banner",
"-sC",
Expand Down Expand Up @@ -73,7 +73,7 @@ def testNmapWrapper_whenTopPortsUsed_returnCommand(
"--top-ports",
"420",
"-T3",
"-sT",
"-sS",
"--script",
"banner",
"-sC",
Expand Down Expand Up @@ -111,7 +111,7 @@ def testNmapWrapper_whenAllTopPortsUsed_returnCommand(
"-p",
"0-65535",
"-T3",
"-sT",
"-sS",
"--script",
"banner",
"-sC",
Expand Down

0 comments on commit 60e5301

Please sign in to comment.