EVENT_DOUBLE_DECODE,
EVENT_U_ENCODE,
EVENT_BARE_BYTE,
- EVENT_OBSOLETE_1,
+ EVENT_OBSOLETE_1, // Previously used, do not reuse this number
EVENT_UTF_8,
EVENT_IIS_UNICODE,
EVENT_MULTI_SLASH,
EVENT_PIPELINE_MAX,
EVENT_ANOM_SERVER,
EVENT_INVALID_STATCODE,
- EVENT_NO_CONTLEN,
+ EVENT_UNUSED_1,
EVENT_UTF_NORM_FAIL,
EVENT_UTF7,
EVENT_DECOMPR_FAILED,
EVENT_CONSECUTIVE_SMALL_CHUNKS_S,
- EVENT_MSG_SIZE_EXCEPTION,
+ EVENT_UNUSED_2,
EVENT_JS_OBFUSCATION_EXCD,
EVENT_JS_EXCESS_WS,
EVENT_MIXED_ENCODINGS,
HttpTestManager::set_print_amount(params->print_amount);
HttpTestManager::set_print_hex(params->print_hex);
HttpTestManager::set_show_pegs(params->show_pegs);
+ HttpTestManager::set_show_scan(params->show_scan);
#endif
}
{ "print_hex", Parameter::PT_BOOL, nullptr, "false",
"nonprinting characters printed in [HH] format instead of using an asterisk" },
{ "show_pegs", Parameter::PT_BOOL, nullptr, "true", "display peg counts with test output" },
+ { "show_scan", Parameter::PT_BOOL, nullptr, "false", "display scanned segments" },
#endif
{ nullptr, Parameter::PT_MAX, nullptr, nullptr, nullptr }
};
{
params->show_pegs = val.get_bool();
}
+ else if (val.is("show_scan"))
+ {
+ params->show_scan = val.get_bool();
+ }
#endif
else
{
long print_amount;
bool print_hex;
bool show_pegs;
+ bool show_scan;
#endif
};
}
if (bytes_used < msg_text.length())
{
- // FIXIT-M eventually need to separate max header alert from internal maximum
infractions += INF_TOO_MANY_HEADERS;
events.create_event(EVENT_MAX_HEADERS);
}
" direction %d length %u client port %u server port %u\n", session_data->seq_num,
source_id, length, flow->client_port, flow->server_port);
fflush(stdout);
+ if (HttpTestManager::get_show_scan())
+ {
+ Field(length, data).print(stdout, "Scan segment");
+ }
}
#endif
{ EVENT_PIPELINE_MAX, "too many pipelined requests" },
{ EVENT_ANOM_SERVER, "anomalous http server on undefined HTTP port" },
{ EVENT_INVALID_STATCODE, "invalid status code in HTTP response" },
- { EVENT_NO_CONTLEN, "no content-length or transfer-encoding in HTTP response" },
+ { EVENT_UNUSED_1, "unused event number--should not appear" },
{ EVENT_UTF_NORM_FAIL, "HTTP response has UTF charset which failed to normalize" },
{ EVENT_UTF7, "HTTP response has UTF-7 charset" },
{ EVENT_DECOMPR_FAILED, "HTTP response gzip decompression failed" },
{ EVENT_CONSECUTIVE_SMALL_CHUNKS_S, "server consecutive small chunk sizes" },
- { EVENT_MSG_SIZE_EXCEPTION, "invalid content-length or chunk size" },
+ { EVENT_UNUSED_2, "unused event number--should not appear" },
{ EVENT_JS_OBFUSCATION_EXCD, "javascript obfuscation levels exceeds 1" },
{ EVENT_JS_EXCESS_WS, "javascript whitespaces exceeds max allowed" },
{ EVENT_MIXED_ENCODINGS, "multiple encodings within javascript obfuscated data" },
long HttpTestManager::print_amount = 1200;
bool HttpTestManager::print_hex = false;
bool HttpTestManager::show_pegs = true;
+bool HttpTestManager::show_scan = false;
void HttpTestManager::update_test_number(int64_t new_test_number)
{
static bool get_print_hex() { return print_hex; }
static void set_show_pegs(bool show_pegs_) { show_pegs = show_pegs_; }
static bool get_show_pegs() { return show_pegs; }
+ static void set_show_scan(bool show_scan_) { show_scan = show_scan_; }
+ static bool get_show_scan() { return show_scan; }
private:
HttpTestManager() = delete;
static long print_amount;
static bool print_hex;
static bool show_pegs;
+ static bool show_scan;
};
#endif