日志接口、扫描接口修复
1)日志发送接口:增加对非结构化日志判断 2)扫描接口:对客户端请求中HOST字段为空情况,扫描不在扫FQDN域
This commit is contained in:
@@ -1937,13 +1937,15 @@ enum pangu_action http_scan(const struct tfe_http_session * session, enum tfe_ht
|
||||
if (events & EV_HTTP_REQ_HDR)
|
||||
{
|
||||
const char *str_host = session->req->req_spec.host;
|
||||
int str_host_length = (int) (strlen(session->req->req_spec.host));
|
||||
|
||||
scan_ret = Maat_full_scan_string(g_pangu_rt->maat, g_pangu_rt->scan_table_id[PXY_CTRL_HTTP_FQDN],
|
||||
CHARSET_UTF8, str_host, str_host_length, result, NULL, MAX_SCAN_RESULT, &(ctx->scan_mid), ctx->thread_id);
|
||||
if (scan_ret > 0)
|
||||
if (str_host != NULL)
|
||||
{
|
||||
hit_cnt += scan_ret;
|
||||
int str_host_length = (int) (strlen(session->req->req_spec.host));
|
||||
scan_ret = Maat_full_scan_string(g_pangu_rt->maat, g_pangu_rt->scan_table_id[PXY_CTRL_HTTP_FQDN],
|
||||
CHARSET_UTF8, str_host, str_host_length, result, NULL, MAX_SCAN_RESULT, &(ctx->scan_mid), ctx->thread_id);
|
||||
if (scan_ret > 0)
|
||||
{
|
||||
hit_cnt += scan_ret;
|
||||
}
|
||||
}
|
||||
|
||||
const char * str_url = session->req->req_spec.url;
|
||||
|
||||
Reference in New Issue
Block a user