projectdiscovery / httpx

httpx is a fast and multi-purpose HTTP toolkit that allows running multiple probes using the retryablehttp library.
https://docs.projectdiscovery.io/tools/httpx
MIT License
7.75k stars 843 forks source link

Program Hangs with ProbeAllIPS Enabled on IP Targets with Ports #1997

Closed Explorer1092 closed 21 hours ago

Explorer1092 commented 1 day ago

httpx version:

1.6.9

Current Behavior:

When the ProbeAllIPS option is enabled, and a target IP with a port (e.g., 1.1.1.1:443) is passed, the results channel receives targets with the port included, e.g., httpx.Target{Host: "1.1.1.1:443"}. However, the program hangs indefinitely, and the analysis does not complete.

Expected Behavior:

The expected behavior is that when a target IP with a port is passed with ProbeAllIPS enabled, the tool should handle it without hanging, and the analysis should complete successfully. Ideally, the port should either be handled appropriately or documented how the tool expects IP targets with ports in this context.

Steps To Reproduce:

  1. Run httpx with the ProbeAllIPS option enabled.
  2. Use a target IP with a specified port, e.g., httpx -target "1.1.1.1:443" -ProbeAllIPS
  3. Observe that the output logs httpx.Target{Host: "1.1.1.1:443"} to the results channel.
  4. Notice that the program hangs and does not complete the analysis.

Anything else:

ehsandeep commented 1 day ago

@Explorer1092 not able to reproduce.

$ time httpx -target "1.1.1.1:443" -probe-all-ips

    __    __  __       _  __
   / /_  / /_/ /_____ | |/ /
  / __ \/ __/ __/ __ \|   /
 / / / / /_/ /_/ /_/ /   |
/_/ /_/\__/\__/ .___/_/|_|
             /_/

        projectdiscovery.io

[INF] Current httpx version v1.6.9 (latest)
[WRN] UI Dashboard is disabled, Use -dashboard option to enable

real    0m3.615s
user    0m0.174s
sys 0m0.081s