Fixed syslog false positives. (#1577)
* syslog: removed unnecessary/unreliable printable string check * added `ndpi_isalnum()` * splitted `ndpi_is_printable_string()` into `ndpi_is_printable_buffer()` and `ndpi_normalize_printable_string()` Signed-off-by: lns <matzeton@googlemail.com>
This commit is contained in:
@@ -151,7 +151,8 @@ extern "C" {
|
||||
char *risk_message);
|
||||
int ndpi_isset_risk(struct ndpi_detection_module_struct *ndpi_str,
|
||||
struct ndpi_flow_struct *flow, ndpi_risk_enum r);
|
||||
int ndpi_is_printable_string(char * const str, size_t len);
|
||||
int ndpi_is_printable_buffer(uint8_t const * const buf, size_t len);
|
||||
int ndpi_normalize_printable_string(char * const str, size_t len);
|
||||
int ndpi_is_valid_hostname(char * const str, size_t len);
|
||||
#define NDPI_ENTROPY_ENCRYPTED_OR_RANDOM(entropy) (entropy > 7.0f)
|
||||
float ndpi_entropy(u_int8_t const * const buf, size_t len);
|
||||
|
||||
@@ -25,6 +25,7 @@ extern u_int8_t ndpi_ends_with(char *str, char *ends);
|
||||
|
||||
#define ndpi_isalpha(ch) (((ch) >= 'a' && (ch) <= 'z') || ((ch) >= 'A' && (ch) <= 'Z'))
|
||||
#define ndpi_isdigit(ch) ((ch) >= '0' && (ch) <= '9')
|
||||
#define ndpi_isalnum(ch) (ndpi_isalpha(ch) != 0 || ndpi_isdigit(ch) != 0)
|
||||
#define ndpi_isspace(ch) (((ch) >= '\t' && (ch) <= '\r') || ((ch) == ' '))
|
||||
#define ndpi_isprint(ch) ((ch) >= 0x20 && (ch) <= 0x7e)
|
||||
#define ndpi_ispunct(ch) (((ch) >= '!' && (ch) <= '/') || \
|
||||
|
||||
Reference in New Issue
Block a user