Replies: 1 comment 1 reply
-
|
@knakul853 Sounds good to me! If you’re open to it, feel free to take this on. Thank you! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Issue Description
The
pkg/runner/runner.gofile, which contains the core scanning functionality of Naabu, currently lacks comprehensive unit tests. Adding tests would significantly improve code reliability, ensure safer future modifications, and make the codebase more maintainable.Current Status
runner.gofile handles:Proposed Test Coverage
Core Functionality Tests
Runner Initialization
NewRunnerwith valid and invalid configurations.Scan Execution
RunEnumerationwith different scan types (SYN, CONNECT, UDP).Result Handling
OnResult,OnReceive).Error Handling
Close().Example Test Plan (Tabular Format)
Options{Host: "example.com", Ports: "80,443"}Options{Host: "", Ports: ""}Options{ScanType: "s"}Options{Host: "example.com", Ports: "80", ScanType: "s"}Options{Host: "example.com", Ports: "80", ScanType: "c"}Options{Host: "example.com", Ports: "80"}with canceled contextOptions{Host: "example.com", Ports: "80", Rate: 100}Options{Host: "example.com", Ports: "80", OnResult: callbackFunc}Options{Host: "example.com", Ports: "80", Output: "output.json"}Options{Host: "example.com", Ports: "80,80"}Options{Host: "invalid.host", Ports: "80"}Options{Host: "example.com", Ports: "99999"}Options{Host: "example.com", Ports: "80"}with simulated packet dropsOptions{Resume: true}with a partially completed scanresume.cfgfile.Options{Host: "example.com", Ports: "80"}Close()is called.Benefits of Adding Tests
Next Steps
Beta Was this translation helpful? Give feedback.
All reactions