mirror of
https://github.com/nmap/nmap.git
synced 2026-01-17 20:09:02 +00:00
Open log files in binary mode.
This avoids CRLF translation on Windows.
This commit is contained in:
@@ -459,9 +459,9 @@ int ncat_delay_timer(int delayval)
|
||||
int ncat_openlog(const char *logfile, int append)
|
||||
{
|
||||
if (append)
|
||||
return Open(logfile, O_WRONLY | O_CREAT | O_APPEND, 0664);
|
||||
return Open(logfile, O_BINARY | O_WRONLY | O_CREAT | O_APPEND, 0664);
|
||||
else
|
||||
return Open(logfile, O_WRONLY | O_CREAT | O_TRUNC, 0664);
|
||||
return Open(logfile, O_BINARY | O_WRONLY | O_CREAT | O_TRUNC, 0664);
|
||||
}
|
||||
|
||||
static int ncat_hexdump(int logfd, const char *data, int len);
|
||||
|
||||
Reference in New Issue
Block a user