ngrep - возможный скрыть полезные нагрузки?

Попробуйте strerror (3).

Из страницы справочника:

DESCRIPTION

 The strerror(), strerror_r() and perror() functions look up the error
 message string corresponding to an error number.

 The strerror() function accepts an error number argument errnum and
 returns a pointer to the corresponding message string.

 The strerror_r() function renders the same result into strerrbuf for a
 maximum of buflen characters and returns 0 upon success.

 The perror() function finds the error message corresponding to the cur-
 rent value of the global variable errno (intro(2)) and writes it, fol-
 lowed by a newline, to the standard error file descriptor.  If the argu-
 ment string is non-NULL and does not point to the null character, this
 string is prepended to the message string and separated from it by a
 colon and space (``: ''); otherwise, only the error message string is
 printed.

 If the error number is not recognized, these functions return an error
 message string containing ``Unknown error: '' followed by the error num-
 ber in decimal.  The strerror() and strerror_r() functions return EINVAL
 as a warning.  Error numbers recognized by this implementation fall in
 the range 0 < errnum < sys_nerr.

 If insufficient storage is provided in strerrbuf (as specified in buflen)
 to contain the error string, strerror_r() returns ERANGE and strerrbuf
 will contain an error message that has been truncated and NUL terminated
 to fit the length specified by buflen.

 The message strings can be accessed directly using the external array
 sys_errlist.  The external value sys_nerr contains a count of the mes-
 sages in sys_errlist.  The use of these variables is deprecated;
 strerror() or strerror_r() should be used instead.
3
задан 8 March 2016 в 17:18
1 ответ

Вы попытались установить -S к небольшому числу?

-S limitlen
  Set the upper limit on the size of packets that ngrep will look at. Useful for 
  looking at only the first N bytes of packets without changing the BPF snaplen.
2
ответ дан 3 December 2019 в 07:18

Теги

Похожие вопросы