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

isPortOpen() function doesnt work if scanning udp port #5396

Closed
daffainfo opened this issue Jul 11, 2024 · 0 comments · Fixed by #5397
Closed

isPortOpen() function doesnt work if scanning udp port #5396

daffainfo opened this issue Jul 11, 2024 · 0 comments · Fixed by #5397
Assignees
Labels
Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.
Milestone

Comments

@daffainfo
Copy link
Contributor

daffainfo commented Jul 11, 2024

UDP port wont be detected when using isPortOpen function because that function only detects TCP port. A small example can be found at https://github.com/projectdiscovery/nuclei-templates/blob/main/javascript/udp/detection/tftp-detect.yaml

When using that template it always return not found even though the host is already using tftp

$ nuclei -u 201.194.192.183 -t nuclei-templates/javascript/udp/detection/tftp-detect.yaml --debug


                     __     _
   ____  __  _______/ /__  (_)
  / __ \/ / / / ___/ / _ \/ /
 / / / / /_/ / /__/ /  __/ /
/_/ /_/\__,_/\___/_/\___/_/   v3.2.9

                projectdiscovery.io

[INF] Current nuclei version: v3.2.9 (latest)
[INF] Current nuclei-templates version: v9.9.1 (latest)
[WRN] Scan results upload to cloud is disabled.
[INF] New templates added in latest release: 75
[INF] Templates loaded for current scan: 1
[INF] Executing 1 signed templates from projectdiscovery/nuclei-templates
[INF] Targets loaded for current scan: 1
[DBG] [tftp-detect] Executing Precondition for request
[DBG]  [tftp-detect] Javascript Code:

        isPortOpen(Host, Port);

[WRN] [tftp-detect] Could not execute request for 201.194.192.183: [tftp-detect:RUNTIME] could not execute pre-condition: dial tcp 201.194.192.183:69: connect: connection refused
@daffainfo daffainfo added the Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors. label Jul 11, 2024
@RamanaReddy0M RamanaReddy0M self-assigned this Jul 11, 2024
@RamanaReddy0M RamanaReddy0M linked a pull request Jul 11, 2024 that will close this issue
4 tasks
@ehsandeep ehsandeep added this to the nuclei v3.3.0 milestone Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants