in reply to Can't send more than 12 bytes on raw socket! (not including IP header)

$result = send( SOCKET, $synpacket, $num_of_bytes, $broadcastAddr );

perldoc -f send says

send SOCKET,MSG,FLAGS,TO send SOCKET,MSG,FLAGS

so your invocation appears to be incorrect. Replacing $num_of_bytes with 0 gives me a successful outcome, although I did clean up your code a little before running so let us know if you still have problems.

Replies are listed 'Best First'.
Re^2: Can't send more than 12 bytes on raw socket! (not including IP header)
by BatchMcNulty (Initiate) on Aug 12, 2018 at 15:17 UTC
    Thank you so much! I don't know WHERE I got the idea that I had to put the number of bytes I was sending - all my manuals agree with you... I think it must be that recv works like that. Doh!

    I did have an inkling it was noob error of some kind, though. It was just so oddly persistent... now to see what happens when I send the real syn packet...

    Thank you from the bottom of my heart! :-)