netcat failure
Closed this issue · 2 comments
netcat: connect to localhost port 6666 (tcp) failed: Unknown error 3223857
Error message comes from openbsd warn().
warn() is like perror
3223857 is the value in errno at the time this warn() was called
warn() is called if vflag is set -> verbosity on and timeout_connect does not return 0
timeout_connect sets errno to optval returned from getsockopt (likely source of bug)
4484 getsockopt(3, SOL_SOCKET, SO_ERROR, [111], [4]) = 0
results in:
DEBUG:root:Optval: 111
DEBUG:root:Optval Length: 4
DEBUG:root:Nooping the current system call in pid: 4705
DEBUG:root:Writing values
C: poke_address: child: 4705
C: poke_address: address: bfffb900
C: poke_address: data: 3223857
C: poke_address: child: 4705
C: poke_address: address: bfffb904
C: poke_address: data: 52
It looks like the data getting poked in is garbage
getsockopt handler is writing data using that terrible write_buffer function I need to get rid of
Fixed. Added a populate_int function to replace write_buffer calls that were misbehaving.