mirror of
https://github.com/nmap/nmap.git
synced 2026-06-28 04:03:30 +00:00
Open log files in binary mode.
This avoids CRLF translation on Windows.
This commit is contained in:
parent
343e09c2fa
commit
ec311d78c5
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue