Nmap Development mailing list archives

Ncat File Transfer Brokenness


From: David Millis <tvtronix () yahoo com>
Date: Sat, 27 Feb 2010 14:46:18 -0800 (PST)

This is the only sender-connects/listener-receives file transfer arrangement that works for me. (WinXP, ncat 5.21)

ncat -l -p 1234 > somefile.zip
type somefile.zip | ncat -vvn -i 3000 --send-only 192.168.1.1 1234


The following terminated early leaving files varying between 8 ad 40k in size.

ncat -vvvn -e "cmd /c \"type somefile.zip\"" --send-only 192.168.1.1 1234
UnixUtils' cat.exe was similarly affected.

NCAT DEBUG: Executing: cmd /c "type ghost.exe"
NCAT DEBUG: Creating named pipe "\\.\pipe\ncat-0"
NCAT DEBUG: Register subprocess 00000728 at index 0.
NCAT DEBUG: Subprocess ended with exit code 259.
NCAT DEBUG: Unregister subprocess 00000728 from index 0.
NCAT DEBUG: Terminating subprocesses
NCAT DEBUG: max_index 1

Random speculation: a select statement that quits when the pipe isn't ready (0 pending buffered bytes), but would have 
seen more if it waited longer?


These send everything but don't disconnect, hence the timeout at the top.

ncat -vvn --send-only 192.168.1.1 1234 < somefile.zip
type somefile.zip | ncat -vvn --send-only 192.168.1.1 1234


When ncat has to be killed manually, ctrl-c on the listening receiver gets the "Terminate batch job (Y/N)? " prompt 
mixed into the saved file instead of the prompt. Breaking at the sender disconnects cleanly.



      
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/


Current thread: