Open gvanem opened 7 years ago
@gvanem
Hi, I meet exactly same problem as you havd (10022
error when calling sendto
within this library). But I tried your solution, don't work. And I confirm my system (Win 10 64bits) enabling SOCK_RAW by netsh winsock show catalog
command. So maybe it's not right answer for my situation, right?
I wonder if you have any suggestions?
While using the
portscan
program on Windows-10, I'm always getting aWSAEINVAL
in thesendto()
call. E.g. when doingportscan.exe 10.0.0.1 22
(my dd-Wrt router do have an open SSH port), I get this trace:After further testing, I figured the Winsock doesn't support "raw" operations on a socket created with a
IPPROTO_TCP
protocol [1]; it should beIPPROTO_RAW
instead. So AFAICS, the mappings intypes_[]
should account for this. With this patch:it works much better (no
WSAEINVAL
). But it seems fromtcpdump
thatportscan
is sending the SYNs with aeth-destination == eth-source
![1] the
socket (AF_INET, SOCK_RAW, socktype)
call inPacketSender::open_l3_socket()
.