miyurudassanayake / sni-injector

SNI Injecting tool for free internet (HTTP Injector)
153 stars 43 forks source link

SSH commands that are provide in the README is not working on windows #1

Closed npkumara closed 1 year ago

npkumara commented 1 year ago

Description

ssh -C -o "ProxyCommand=nc -X CONNECT -x 127.0.0.1:9092 %h %p" [username]@[host] -p 443 -CND 1080 -o StrictHostKeyChecking=no -o UserKnownHostsFile=NUL

This SSH command is failing in windows because it doesn't have a netcat executable installed by default.

How to test

1.Clone the repo

  1. Run injector
  2. Run ssh command

You will get this error CreateProcessW failed error:2 posix_spawnp: No such file or directory

Possible Solution

There is a solution for this by using ncat which comes with nmap. Install nmap version 7.92 and modify above SSH command like this

ssh -C -o "ProxyCommand=ncat --proxy 127.0.0.1:9092 %h %p" [username]@[host] -p 443 -CND 1080 -o StrictHostKeyChecking=no -o UserKnownHostsFile=NUL

This is works perfectly on windows 11. Also you can use proxifier to create sock5 proxy in windows.

These should be added to the DOCS Thank you!

miyurudassanayake commented 1 year ago

Thank you for reporting the issue and for your help in testing the solution. I am happy to inform you that I was able to fix the issue by modifying the SSH command as suggested.