增加增强数值扫描功能及对应测试用例
增加changelog到rpm包
This commit is contained in:
@@ -1825,6 +1825,31 @@
|
||||
"clause_index":1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"compile_id": 179,
|
||||
"service": 1,
|
||||
"action": 1,
|
||||
"do_blacklist": 1,
|
||||
"do_log": 1,
|
||||
"user_region": "anything",
|
||||
"is_valid": "yes",
|
||||
"groups": [
|
||||
{
|
||||
"group_name": "Untitled",
|
||||
"regions": [
|
||||
{
|
||||
"table_name": "INTERGER_PLUS",
|
||||
"table_type": "intval_plus",
|
||||
"table_content": {
|
||||
"district": "intval.plus",
|
||||
"low_boundary": 2020,
|
||||
"up_boundary": 2020
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"plugin_table": [
|
||||
|
||||
@@ -54,4 +54,5 @@
|
||||
31 SOURCE_IP_ASN virtual AS_NUMBER --
|
||||
32 DESTINATION_IP_ASN virtual AS_NUMBER --
|
||||
33 GeoLocation expr UTF8 UTF8 yes 0
|
||||
34 SOURCE_IP_GEO virtual GeoLocation --
|
||||
34 SOURCE_IP_GEO virtual GeoLocation --
|
||||
35 INTERGER_PLUS intval_plus --
|
||||
@@ -444,6 +444,30 @@ TEST(StringScan, PrefixAndSuffix)
|
||||
Maat_clean_status(&mid);
|
||||
|
||||
}
|
||||
|
||||
#define IntvalPlusTest 1
|
||||
TEST(IntvalScan, IntvalPlusPlus)
|
||||
{
|
||||
int table_id=0,ret=0;
|
||||
int scan_val=2020;
|
||||
scan_status_t mid=NULL;
|
||||
struct Maat_rule_t result[4];
|
||||
|
||||
table_id=Maat_table_register(g_feather, "INTERGER_PLUS");
|
||||
ASSERT_GT(table_id, 0);
|
||||
|
||||
ret=Maat_set_scan_status(g_feather, &mid, MAAT_SET_SCAN_DISTRICT, "intval.plus", strlen("intval.plus"));
|
||||
ASSERT_EQ(ret, 0);
|
||||
|
||||
ret=Maat_scan_intval(g_feather, table_id, scan_val, result,4, &mid, 0);
|
||||
EXPECT_EQ(ret, 1);
|
||||
EXPECT_EQ(result[0].config_id, 179);
|
||||
|
||||
Maat_clean_status(&mid);
|
||||
|
||||
return ;
|
||||
}
|
||||
|
||||
#define ExprPlusTest 1
|
||||
TEST(StringScan, ExprPlus)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user