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

-headless exception :" An existing connection was forcibly closed by the remote host." #2389

Closed
p0mel0 opened this issue Aug 3, 2022 · 4 comments
Assignees
Labels
Investigation Something to Investigate Priority: Low This issue can probably be picked up by anyone looking to contribute to the project, as an entry fix 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.

Comments

@p0mel0
Copy link

p0mel0 commented Aug 3, 2022

Nuclei version: 2.7.5

Current Behavior: When I use the -headless parameter, the following error is reported

D:\Nuclei\nuclei.exe -v -id dvwa-headless-automatic-login -headless -u http://localhost/DVWA/ -sb

                     __     _
   ____  __  _______/ /__  (_)
  / __ \/ / / / ___/ / _ \/ /
 / / / / /_/ / /__/ /  __/ /
/_/ /_/\__,_/\___/_/\___/_/   2.7.5

                projectdiscovery.io

[WRN] Use with caution. You are responsible for your actions.
[WRN] Developers assume no liability and are not responsible for any misuse or damage.
[INF] Using Nuclei Engine 2.7.5 (latest)
[INF] Using Nuclei Templates 9.1.3 (latest)
[INF] Templates added in last update: 40
[INF] Templates loaded for scan: 1
[WRN] [dvwa-headless-automatic-login] Could not execute request for http://localhost/DVWA/: could get html element: read tcp 127.0.0.1:53634->127.0.0.1:53632: wsarecv: An existing connection was forcibly closed by the remote host.
[INF] No results found. Better luck next time!

Solution

it maybe a browser compatibility issue,I solved it by following the steps below

1.Find the browser for nuclei download
2.Right-click on the icon to open the drop-down menu.
3.Click Properties.
4.Navigate to the Compatibility tab.
5.Look for Run this program in compatibility mode for under the Compatibility mode option and check the box.
6.Under it, click the drop-down arrow and select Windows 8.
7.At the bottom, click Change settings for all users.
8.Now, click Apply.

Reference: https://www.windowsdispatch.com/fix-google-chrome-status-invalid-image-hash-error/

Anything else:

When you use the -sc parameter to use a local browser, you may also encounter this problem, the solution is the same

@p0mel0 p0mel0 added the Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors. label Aug 3, 2022
@ehsandeep ehsandeep added Priority: Low This issue can probably be picked up by anyone looking to contribute to the project, as an entry fix Investigation Something to Investigate labels Aug 27, 2022
@tarunKoyalwar tarunKoyalwar removed their assignment Dec 2, 2022
@tarunKoyalwar
Copy link
Member

tarunKoyalwar commented Dec 2, 2022

@p0mel0 ,are you still able to reproduce this issue . It works fine on linux/mac . and it might be related to docker on windows .

  1. do you get same error with the latest version 2.7.9 ??
  2. Can you try this on any other website and share results . Use command
  nuclei -u https://projectdiscovery.io  -stats -headless -id screenshot

@ehsandeep
Copy link
Member

@tarunKoyalwar could be related to projectdiscovery/retryabledns#66 and fixed.

@tarunKoyalwar
Copy link
Member

@ehsandeep are you able to reproduce it ?? I don't have windows available now .

@Mzack9999
Copy link
Member

This is not reproducible anymore on windows AMD64:

> go run .  -id dvwa-headless-automatic-login -headless -u http://localhost/DVWA/ -sb

                     __     _
   ____  __  _______/ /__  (_)
  / __ \/ / / / ___/ / _ \/ /
 / / / / /_/ / /__/ /  __/ /
/_/ /_/\__,_/\___/_/\___/_/   v2.8.4-dev

                projectdiscovery.io

[INF] Using Nuclei Engine 2.8.4-dev (development)
[INF] Using Nuclei Templates 9.3.1 (latest)
[INF] Templates added in last update: 2
[INF] Templates loaded for scan: 1
[INF] Targets loaded for scan: 1
[INF] No results found. Better luck next time!

Unable to reproduce - I'm closing the issue and will reopen it if similar problems get reported.

@Mzack9999 Mzack9999 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 13, 2022
@ehsandeep ehsandeep added the Status: Completed Nothing further to be done with this issue. Awaiting to be closed. label Dec 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Investigation Something to Investigate Priority: Low This issue can probably be picked up by anyone looking to contribute to the project, as an entry fix 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

No branches or pull requests

4 participants