Update goodbyedpi.c
This commit is contained in:
parent
2b7236fa1b
commit
50087fe4a2
|
|
@ -213,7 +213,7 @@ static void add_maxpayloadsize_str(unsigned short maxpayload) {
|
||||||
const char *maxpayloadsize_str = "and (tcp.PayloadLength ? tcp.PayloadLength < %hu or tcp.Payload32[0] == 0x47455420 or tcp.Payload32[0] == 0x504F5354 : true)";
|
const char *maxpayloadsize_str = "and (tcp.PayloadLength ? tcp.PayloadLength < %hu or tcp.Payload32[0] == 0x47455420 or tcp.Payload32[0] == 0x504F5354 : true)";
|
||||||
char *addfilter;
|
char *addfilter;
|
||||||
|
|
||||||
asprintf(&addfilter, maxpayloadsize_str, maxpayload);
|
asprintf(&addfilter, "%s", maxpayloadsize_str, maxpayload);
|
||||||
|
|
||||||
char *newstr = repl_str(filter_string, MAXPAYLOADSIZE_TEMPLATE, addfilter);
|
char *newstr = repl_str(filter_string, MAXPAYLOADSIZE_TEMPLATE, addfilter);
|
||||||
free(filter_string);
|
free(filter_string);
|
||||||
|
|
@ -222,6 +222,7 @@ static void add_maxpayloadsize_str(unsigned short maxpayload) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void finalize_filter_strings() {
|
static void finalize_filter_strings() {
|
||||||
char *newstr = repl_str(filter_string, IPID_TEMPLATE, "");
|
char *newstr = repl_str(filter_string, IPID_TEMPLATE, "");
|
||||||
free(filter_string);
|
free(filter_string);
|
||||||
|
|
@ -807,15 +808,15 @@ int main(int argc, char *argv[]) {
|
||||||
char *autottl_copy = strdup(optarg);
|
char *autottl_copy = strdup(optarg);
|
||||||
if (strchr(autottl_copy, '-')) {
|
if (strchr(autottl_copy, '-')) {
|
||||||
// token "-" found, start X-Y parser
|
// token "-" found, start X-Y parser
|
||||||
char *autottl_current = strtok(autottl_copy, "-");
|
char *autottl_current = strtok_r(autottl_copy, "-");
|
||||||
auto_ttl_1 = atoub(autottl_current, "Set Auto TTL parameter error!");
|
auto_ttl_1 = atoub(autottl_current, "Set Auto TTL parameter error!");
|
||||||
autottl_current = strtok(NULL, "-");
|
autottl_current = strtok_r(NULL, "-");
|
||||||
if (!autottl_current) {
|
if (!autottl_current) {
|
||||||
puts("Set Auto TTL parameter error!");
|
puts("Set Auto TTL parameter error!");
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
auto_ttl_2 = atoub(autottl_current, "Set Auto TTL parameter error!");
|
auto_ttl_2 = atoub(autottl_current, "Set Auto TTL parameter error!");
|
||||||
autottl_current = strtok(NULL, "-");
|
autottl_current = strtok_r(NULL, "-");
|
||||||
if (!autottl_current) {
|
if (!autottl_current) {
|
||||||
puts("Set Auto TTL parameter error!");
|
puts("Set Auto TTL parameter error!");
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue