httpx icon indicating copy to clipboard operation
httpx copied to clipboard

Inconsistency in the results depending on options used

Open JoshuaMart opened this issue 2 years ago • 1 comments

Hi, If the -ports option is used together with -fhr, the final URL and the chain_status_code is not displayed.

Result without -ports :

root@8b5a349cdfa0:/recon# httpx -u redacted.tld -json -silent -fhr
{
  "timestamp": "2023-05-08T11:26:10.819288603Z",
  "hash": {
    ...
  },
  "port": "443",
  "url": "https://redacted.tld",
  "input": "redacted.tld",
  "title": "Redacted",
  "scheme": "https",
  "content_type": "text/html",
  "method": "GET",
  "host": "Redacted",
  "path": "/",
  "final_url": "https://redacted.tld/dashboard/",
  "time": "327.79312ms",
  "chain_status_codes": [
    302,
    200
  ],
  "a": [
    "Redacted"
  ],
  "cname": [
    "Redacted"
  ],
  "words": 1,
  "lines": 1,
  "status_code": 200,
  "content_length": 3026,
  "failed": false
}

Result with -ports :

root@8b5a349cdfa0:/recon# httpx -u redacted.tld -p 443 -json -silent -fhr
{
  "timestamp": "2023-05-08T11:26:04.438805097Z",
  "hash": {
    ...
  },
  "port": "443",
  "url": "https://redacted.tld:443",
  "input": "redacted.tld",
  "location": "/dashboard/",
  "scheme": "https",
  "content_type": "text/html",
  "method": "GET",
  "host": "Redacted",
  "path": "/",
  "time": "363.363036ms",
  "words": 1,
  "lines": 1,
  "status_code": 302,
  "content_length": 34,
  "failed": false
}

Also, in the first case (if -ports is not used), even if -location is present, it is not displayed in the output

Regards

JoshuaMart avatar May 08 '23 11:05 JoshuaMart

‏I have a problem with the last version when using httpx -silent

‏He says ‏Usage: httpx [OPTIONS] URL

‏Error: No such option: -s

What is the solution?

0xfff010 avatar Nov 11 '23 12:11 0xfff010

This issue seems to be fixed and not reproducible anymore.

$ echo docs.hackerone.com | ./httpx -fhr -j -ports 443 | jq .

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

		projectdiscovery.io

[INF] Current httpx version v1.6.8 (latest)
[WRN] UI Dashboard is disabled, Use -dashboard option to enable
{
  "timestamp": "2024-08-14T21:38:48.74516+03:00",
  "cdn_name": "cloudflare",
  "cdn_type": "waf",
  "port": "443",
  "url": "https://docs.hackerone.com:443",
  "input": "docs.hackerone.com",
  "title": "HackerOne Help Center",
  "scheme": "https",
  "webserver": "cloudflare",
  "content_type": "text/html",
  "method": "GET",
  "host": "104.18.16.177",
  "path": "/",
  "final_url": "https://docs.hackerone.com/en/",
  "time": "7.098555292s",
  "chain_status_codes": [
    302,
    200
  ],
  "a": [
    "104.18.16.177",
    "104.18.17.177"
  ],
  "tech": [
    "Cloudflare",
    "HSTS"
  ],
  "words": 2725,
  "lines": 51,
  "status_code": 200,
  "content_length": 60032,
  "failed": false,
  "cdn": true,
  "knowledgebase": {
    "PageType": "nonerror",
    "pHash": 0
  },
  "resolvers": [
    "100.95.0.252:53",
    "100.95.0.253:53"
  ]
}

ehsandeep avatar Aug 14 '24 18:08 ehsandeep