pang_scan 增加host对TSG_OBJ_FQDN的扫描
This commit is contained in:
fengweihao
2019-08-20 13:48:38 +08:00
parent 87f48df29a
commit 87734b9320

View File

@@ -1854,6 +1854,16 @@ enum pangu_action http_scan(const struct tfe_http_session * session, enum tfe_ht
if (events & EV_HTTP_REQ_HDR) 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_URL],
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; const char * str_url = session->req->req_spec.url;
int str_url_length = (int) (strlen(session->req->req_spec.url)); int str_url_length = (int) (strlen(session->req->req_spec.url));