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

Custom header input is not working with headless option #414

Closed
ehsandeep opened this issue Apr 20, 2023 · 0 comments · Fixed by #437
Closed

Custom header input is not working with headless option #414

ehsandeep opened this issue Apr 20, 2023 · 0 comments · Fixed by #437
Assignees
Labels
Status: Completed Nothing further to be done with this issue. Awaiting to be closed. Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.
Milestone

Comments

@ehsandeep
Copy link
Member

Example:

echo example.com | katana -headless -H "GG: test" -j | jq -r .request.raw 

   __        __                
  / /_____ _/ /____ ____  ___ _
 /  '_/ _  / __/ _  / _ \/ _  /
/_/\_\\_,_/\__/\_,_/_//_/\_,_/							 

		projectdiscovery.io

[INF] Current katana version v1.0.1 (latest)
[INF] Started headless crawling for => https://example.com
GET / HTTP/1.1
Host: example.com
User-Agent: Go-http-client/1.1
Accept-Encoding: gzip

Is it not possible to specify the user-agent in headless mode?

$ echo  http://0.0.0.0:65161 | ./katana -headless -H "User-Agent: test" -j

   __        __                
  / /_____ _/ /____ ____  ___ _
 /  '_/ _  / __/ _  / _ \/ _  /
/_/\_\\_,_/\__/\_,_/_//_/\_,_/							 

		projectdiscovery.io

[INF] Current katana version v1.0.1 (latest)
[INF] Started headless crawling for => http://0.0.0.0:65161
{"timestamp":"2023-04-20T17:58:21.140330753+08:00","request":{"method":"GET","endpoint":"http://0.0.0.0:65161","raw":"GET / HTTP/1.1\r\nHost: 0.0.0.0:65161\r\nUser-Agent: Go-http-client/1.1\r\nAccept-Encoding: gzip\r\n\r\n"},"error":"[hybrid:RUNTIME] navigation failed: net::ERR_CONNECTION_REFUSED \u003c- could not navigate target\n"}

In headless mode, the user-agent being used is not the specified one, nor is it similar to what a normal legitimate browser might use.

Originally posted by @heroesm in #270 (reply in thread)

@ehsandeep ehsandeep added the Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors. label Apr 20, 2023
@tarunKoyalwar tarunKoyalwar self-assigned this May 3, 2023
@tarunKoyalwar tarunKoyalwar linked a pull request May 10, 2023 that will close this issue
@ehsandeep ehsandeep added the Status: Completed Nothing further to be done with this issue. Awaiting to be closed. label May 16, 2023
@ehsandeep ehsandeep added this to the katana v1.0.2 milestone May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Completed Nothing further to be done with this issue. Awaiting to be closed. 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.

2 participants