Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change default to all ports with SYN scan. #97

Merged
merged 3 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading