diff --git a/blockcheck2.d/standard/10-http-basic.sh b/blockcheck2.d/standard/10-http-basic.sh index 970758b..6755184 100644 --- a/blockcheck2.d/standard/10-http-basic.sh +++ b/blockcheck2.d/standard/10-http-basic.sh @@ -7,6 +7,6 @@ pktws_check_http() [ "$NOTEST_BASIC_HTTP" = 1 ] && { echo "SKIPPED"; return; } for s in 'http_hostcase' 'http_hostcase:spell=hoSt' 'http_domcase' 'http_methodeol' 'http_unixeol'; do - pktws_curl_test_update $1 $2 --payload http_req --lua-desync=$s + pktws_curl_test_update $1 $2 --payload=http_req --lua-desync=$s done } diff --git a/blockcheck2.d/standard/15-misc.sh b/blockcheck2.d/standard/15-misc.sh index e2a1466..9f19f6e 100644 --- a/blockcheck2.d/standard/15-misc.sh +++ b/blockcheck2.d/standard/15-misc.sh @@ -5,7 +5,7 @@ pktws_check_http() # $1 - test function # $2 - domain - local PAYLOAD="--payload http_req" repeats ok + local PAYLOAD="--payload=http_req" repeats ok for repeats in 1 20 100 260; do # send starting bytes of original payload @@ -20,7 +20,7 @@ pktws_check_https_tls12() # $1 - test function # $2 - domain - local PAYLOAD="--payload tls_client_hello" repeats ok + local PAYLOAD="--payload=tls_client_hello" repeats ok for repeats in 1 20 100 260; do # send starting bytes of original payload diff --git a/blockcheck2.d/standard/20-multi.sh b/blockcheck2.d/standard/20-multi.sh index a149ea3..64992ae 100644 --- a/blockcheck2.d/standard/20-multi.sh +++ b/blockcheck2.d/standard/20-multi.sh @@ -26,7 +26,7 @@ pktws_check_http() # $1 - test function # $2 - domain local splits_http='method+2 midsld method+2,midsld' - local PAYLOAD="--payload http_req" + local PAYLOAD="--payload=http_req" [ "$NOTEST_MULTI_HTTP" = 1 ] && { echo "SKIPPED"; return; } @@ -39,7 +39,7 @@ pktws_check_https_tls() # $2 - domain # $3 - PRE args for nfqws2 local splits_tls='2 1 sniext+1 sniext+4 host+1 midsld 1,midsld 1,midsld,1220 1,sniext+1,host+1,midsld-2,midsld,midsld+2,endhost-1' - local PAYLOAD="--payload tls_client_hello" + local PAYLOAD="--payload=tls_client_hello" [ "$NOTEST_MULTI_HTTPS" = 1 ] && { echo "SKIPPED"; return; } diff --git a/blockcheck2.d/standard/23-seqovl.sh b/blockcheck2.d/standard/23-seqovl.sh index 8371c9b..6b135c9 100644 --- a/blockcheck2.d/standard/23-seqovl.sh +++ b/blockcheck2.d/standard/23-seqovl.sh @@ -5,7 +5,7 @@ pktws_check_http() [ "$NOTEST_SEQOVL_HTTP" = 1 ] && { echo "SKIPPED"; return; } - local PAYLOAD="--payload http_req" + local PAYLOAD="--payload=http_req" local ok pat= split f f2 @@ -37,7 +37,7 @@ pktws_seqovl_tests_tls() local ok ok_any local testf=$1 domain="$2" pre="$3" local pat rnd_mod padencap_mod split f f2 - local PAYLOAD="--payload tls_client_hello" + local PAYLOAD="--payload=tls_client_hello" pat=${SEQOVL_PATTERN_HTTPS:+seqovl_pat} pat=${pat:-fake_default_tls} diff --git a/blockcheck2.d/standard/24-syndata.sh b/blockcheck2.d/standard/24-syndata.sh index 6208509..de47fa7 100644 --- a/blockcheck2.d/standard/24-syndata.sh +++ b/blockcheck2.d/standard/24-syndata.sh @@ -5,7 +5,7 @@ pktws_check_http() # $1 - test function # $2 - domain - local PAYLOAD="--payload http_req" split + local PAYLOAD="--payload=http_req" split for split in '' multisplit $MULTIDISORDER; do pktws_curl_test_update "$1" "$2" --lua-desync=syndata ${split:+$PAYLOAD --lua-desync=$split} @@ -19,7 +19,7 @@ pktws_check_https_tls() # $2 - domain # $3 - PRE args for nfqws2 - local PAYLOAD="--payload tls_client_hello" ok=0 pre="$3" split + local PAYLOAD="--payload=tls_client_hello" ok=0 pre="$3" split for split in '' multisplit $MULTIDISORDER; do pktws_curl_test_update "$1" "$2" $pre --lua-desync=syndata ${split:+$PAYLOAD --lua-desync=$split} && ok=1 diff --git a/blockcheck2.d/standard/25-fake.sh b/blockcheck2.d/standard/25-fake.sh index 6af2e13..8592a98 100644 --- a/blockcheck2.d/standard/25-fake.sh +++ b/blockcheck2.d/standard/25-fake.sh @@ -40,7 +40,7 @@ pktws_check_http() for ff in $fake 0x00000000; do pktws_curl_test_update $testf $domain ${FAKE_HTTP:+--blob=fake_http:@"$FAKE_HTTP" }$PAYLOAD --lua-desync=fake:blob=$ff:$fooling:repeats=$FAKE_REPEATS && ok=1 # duplicate SYN with MD5 - contains "$fooling" tcp_md5 && pktws_curl_test_update $testf $domain ${FAKE_HTTP:+--blob=$fake:@"$FAKE_HTTP" }$PAYLOAD --lua-desync=fake:blob=$ff:$fooling:repeats=$FAKE_REPEATS --payload empty "--out-range== 504 lua_setwarnf(params.L,lua_warn,NULL); #endif lua_atpanic(params.L,lua_panic); luaL_openlibs(params.L); /* Load Lua libraries */ + + lua_getfield(params.L, LUA_REGISTRYINDEX, "_LOADED"); + if (lua_type(params.L, -1)==LUA_TTABLE) + { + lua_getfield(params.L, -1, "jit"); + if (lua_type(params.L, -1)==LUA_TTABLE) + { + lua_getfield(params.L, -1, "status"); + if (lua_type(params.L, -1)==LUA_TFUNCTION) + { + const char *s; + int n = lua_gettop(params.L); + + lua_call(params.L, 0, LUA_MULTRET); + DLOG_CONDUP(lua_toboolean(params.L, n) ? "JIT: ON" : "JIT: OFF"); + for (n++; (s = lua_tostring(params.L, n)); n++) + DLOG_CONDUP(" %s", s); + DLOG_CONDUP("\n"); + } + } + } + lua_settop(params.L, 0); + return true; } diff --git a/nfq2/nfqws.c b/nfq2/nfqws.c index b83c5b0..1649fe4 100644 --- a/nfq2/nfqws.c +++ b/nfq2/nfqws.c @@ -2228,7 +2228,7 @@ int main(int argc, char **argv) DLOG_ERR("Invalid port filter : %s\n", optarg); exit_clean(1); } - // deny tcp if not set + // deny udp if not set if (!port_filters_deny_if_empty(&dp->pf_udp)) exit_clean(1); break;