diff --git a/test/digest_test.data b/test/digest_test.data new file mode 100644 index 0000000..db61ed5 Binary files /dev/null and b/test/digest_test.data differ diff --git a/test/maat_json.json b/test/maat_json.json index b69da02..80bf5c2 100644 --- a/test/maat_json.json +++ b/test/maat_json.json @@ -180,8 +180,8 @@ "table_name": "FILE_DIGEST", "table_type": "digest", "table_content": { - "raw_len": 46292790, - "digest": "5nN+XW1badOlW7Odi6K[7203:46299992]", + "raw_len": 1160164, + "digest": "FsOmaK3utZafWYt/i[7203:46299992]", "cfds_level": 3 } } diff --git a/test/maat_test.cpp b/test/maat_test.cpp index ff43fc4..4be5a90 100644 --- a/test/maat_test.cpp +++ b/test/maat_test.cpp @@ -48,7 +48,7 @@ int main() // const char* inc_cfg_dir="./rules/inc/index"; const char* log_file="./test.log"; const char* scan_data="http://www.cyberessays.com/search_results.php?action=search&query=yulingjing,abckkk,1234567"; - const char* digest_test_file="./1.data"; + const char* digest_test_file="./digest_test.data"; struct stat digest_fstat; unsigned long long read_size=0,scan_offset=0; char digest_test_buff[4096]={0}; diff --git a/test/right_result.txt b/test/right_result.txt new file mode 100644 index 0000000..2897e09 --- /dev/null +++ b/test/right_result.txt @@ -0,0 +1,8 @@ +Load entry id 101 SUCCESS. +hit 1 rules +hit current region,but not hit compile rule. +ipv4 scan hit compile rule id 123. +ipv6 scan hit region. +digest scan hit 127. +digest scan hit 127. +digest scan hit 127. diff --git a/test/table_info.conf b/test/table_info.conf index 1846fc3..7ce9a2e 100644 --- a/test/table_info.conf +++ b/test/table_info.conf @@ -1,7 +1,7 @@ #each collumn seperate with '\t' #id (0~65535) #name string -#type one of ip,expr,compile or plugin +#type one of ip,expr,digest,intval,compile or plugin #src_charset one of GBK,BIG5,UNICODE,UTF8 #dst_charset combined by GBK,BIG5,UNICODE,UTF8,seperate with '/' #do_merege yes or no @@ -13,3 +13,4 @@ 4 IP_CONFIG ip GBK GBK no 0 5 CONTENT_SIZE intval GBK GBK no 0 6 QD_ENTRY_INFO plugin GBK GBK no 0 +7 FILE_DIGEST digest GBK GBK no 0