diff options
| author | zhangyang <[email protected]> | 2024-04-24 21:46:02 -0400 |
|---|---|---|
| committer | zhangyang <[email protected]> | 2024-04-24 21:46:02 -0400 |
| commit | a1f16a0817e1dfdeae397ec655e472f5868ce21d (patch) | |
| tree | 4183fdeed4961b5910352b512d8080b82bd62b8c | |
| parent | c077e2a07fc473e4516b252dd07cd27ae149dfae (diff) | |
demo1
| -rw-r--r-- | demo1/maat_json.json | 10 | ||||
| -rw-r--r-- | demo1/main.c | 6 | ||||
| -rw-r--r-- | demo1/table_info.conf | 4 |
3 files changed, 11 insertions, 9 deletions
diff --git a/demo1/maat_json.json b/demo1/maat_json.json index 946d2c2..a9e70bc 100644 --- a/demo1/maat_json.json +++ b/demo1/maat_json.json @@ -13,16 +13,18 @@ "is_valid": "yes", "groups": [ { - "virtual_table": "HTTP_URL", + "virtual_table": "UE_ID", "group_name": "Untitled", "regions": [ { - "table_name": "HTTP_URL", + "table_name": "WANNAT_OBJ_UE_ID", "table_type": "expr", "table_content": { - "keywords": "Hello Maat", + "region_id": 101, + "keywords": "abcdefghij", "expr_type": "none", - "match_method": "sub", + "match_method": "exact", + "is_hexbin": "no", "format": "uncase plain" } } diff --git a/demo1/main.c b/demo1/main.c index 266edf1..7f2742b 100644 --- a/demo1/main.c +++ b/demo1/main.c @@ -26,9 +26,9 @@ int main() assert(maat_instance != NULL); maat_options_free(opts); - const char *table_name = "HTTP_URL"; /* maat_json.json has HTTP_URL rule */ + const char *table_name = "UE_ID"; /* maat_json.json has HTTP_URL rule */ int table_id = maat_get_table_id(maat_instance, table_name); - assert(table_id == 3); /* defined in table_info.conf */ + assert(table_id == 4); /* defined in table_info.conf */ int thread_id = 0; long long results[ARRAY_SIZE] = {0}; @@ -39,7 +39,7 @@ int main() assert(state != NULL); // const char *scan_data = "Hello Maat, nice to meet you"; - const char *scan_data = "Hello Maat, nice to meet you"; + const char *scan_data = "abcdefghij"; /** * Becase maat instance has loaded rule in table_info.conf which keywords is "Hello Maat", diff --git a/demo1/table_info.conf b/demo1/table_info.conf index 1d4cf09..fda91e0 100644 --- a/demo1/table_info.conf +++ b/demo1/table_info.conf @@ -38,7 +38,7 @@ }, { "table_id":3, - "table_name":"HTTP_URL", + "table_name":"WANNAT_OBJ_UE_ID", "table_type":"expr", "valid_column":7, "custom": { @@ -54,6 +54,6 @@ "table_id":4, "table_name": "UE_ID", "table_type": "virtual", - "physical_table": "HTTP_URL" + "physical_table": "WANNAT_OBJ_UE_ID" } ]
\ No newline at end of file |
