Debian Codegraph @

hub1/.tests/exim-spam/scenario.assert

raw
1 len(results) == 2
2 "1.2.3.5" in results[0].Overflow.GetSources()
3 results[0].Overflow.Sources["1.2.3.5"].IP == "1.2.3.5"
4 results[0].Overflow.Sources["1.2.3.5"].Range == ""
5 results[0].Overflow.Sources["1.2.3.5"].GetScope() == "Ip"
6 results[0].Overflow.Sources["1.2.3.5"].GetValue() == "1.2.3.5"
7 results[0].Overflow.Alert.Events[0].GetMeta("datasource_path") == "exim-spam.log"
8 results[0].Overflow.Alert.Events[0].GetMeta("datasource_type") == "file"
9 results[0].Overflow.Alert.Events[0].GetMeta("log_type") == "spam-attempt"
10 results[0].Overflow.Alert.Events[0].GetMeta("service") == "exim"
11 results[0].Overflow.Alert.Events[0].GetMeta("source_dns") == "test.sa.com"
12 results[0].Overflow.Alert.Events[0].GetMeta("source_ip") == "1.2.3.5"
13 results[0].Overflow.Alert.Events[0].GetMeta("timestamp") == "2022-06-29T18:35:43Z"
14 results[0].Overflow.Alert.Events[1].GetMeta("datasource_path") == "exim-spam.log"
15 results[0].Overflow.Alert.Events[1].GetMeta("datasource_type") == "file"
16 results[0].Overflow.Alert.Events[1].GetMeta("log_type") == "spam-attempt"
17 results[0].Overflow.Alert.Events[1].GetMeta("service") == "exim"
18 results[0].Overflow.Alert.Events[1].GetMeta("source_dns") == "tata.test.biz"
19 results[0].Overflow.Alert.Events[1].GetMeta("source_ip") == "1.2.3.5"
20 results[0].Overflow.Alert.Events[1].GetMeta("source_user") == "[email protected]"
21 results[0].Overflow.Alert.Events[1].GetMeta("timestamp") == "2022-06-29T18:37:43Z"
22 results[0].Overflow.Alert.Events[2].GetMeta("datasource_path") == "exim-spam.log"
23 results[0].Overflow.Alert.Events[2].GetMeta("datasource_type") == "file"
24 results[0].Overflow.Alert.Events[2].GetMeta("log_type") == "spam-attempt"
25 results[0].Overflow.Alert.Events[2].GetMeta("service") == "exim"
26 results[0].Overflow.Alert.Events[2].GetMeta("source_dns") == "tata.test.biz"
27 results[0].Overflow.Alert.Events[2].GetMeta("source_ip") == "1.2.3.5"
28 results[0].Overflow.Alert.Events[2].GetMeta("source_user") == "[email protected]"
29 results[0].Overflow.Alert.Events[2].GetMeta("timestamp") == "2022-06-29T18:38:43Z"
30 results[0].Overflow.Alert.Events[2].GetMeta("username") == "[email protected]"
31 results[0].Overflow.Alert.Events[3].GetMeta("datasource_path") == "exim-spam.log"
32 results[0].Overflow.Alert.Events[3].GetMeta("datasource_type") == "file"
33 results[0].Overflow.Alert.Events[3].GetMeta("log_type") == "spam-attempt"
34 results[0].Overflow.Alert.Events[3].GetMeta("service") == "exim"
35 results[0].Overflow.Alert.Events[3].GetMeta("source_dns") == "smtpclient.test"
36 results[0].Overflow.Alert.Events[3].GetMeta("source_ip") == "1.2.3.5"
37 results[0].Overflow.Alert.Events[3].GetMeta("source_user") == "[email protected]"
38 results[0].Overflow.Alert.Events[3].GetMeta("target_port") == "587"
39 results[0].Overflow.Alert.Events[3].GetMeta("timestamp") == "2022-06-29T18:39:43Z"
40 results[0].Overflow.Alert.Events[3].GetMeta("username") == "[email protected]"
41 results[0].Overflow.Alert.GetScenario() == "crowdsecurity/exim-spam"
42 results[0].Overflow.Alert.Remediation == true
43 results[0].Overflow.Alert.GetEventsCount() == 4
44 "1.2.3.4" in results[1].Overflow.GetSources()
45 results[1].Overflow.Sources["1.2.3.4"].IP == "1.2.3.4"
46 results[1].Overflow.Sources["1.2.3.4"].Range == ""
47 results[1].Overflow.Sources["1.2.3.4"].GetScope() == "Ip"
48 results[1].Overflow.Sources["1.2.3.4"].GetValue() == "1.2.3.4"
49 results[1].Overflow.Alert.Events[0].GetMeta("datasource_path") == "exim-spam.log"
50 results[1].Overflow.Alert.Events[0].GetMeta("datasource_type") == "file"
51 results[1].Overflow.Alert.Events[0].GetMeta("log_type") == "spam-attempt"
52 results[1].Overflow.Alert.Events[0].GetMeta("rbl_url") == "https://www.spamhaus.org/sbl/query/SBLCSS"
53 results[1].Overflow.Alert.Events[0].GetMeta("service") == "exim"
54 results[1].Overflow.Alert.Events[0].GetMeta("source_dns") == "test.com"
55 results[1].Overflow.Alert.Events[0].GetMeta("source_ip") == "1.2.3.4"
56 results[1].Overflow.Alert.Events[0].GetMeta("source_user") == "[email protected]"
57 results[1].Overflow.Alert.Events[0].GetMeta("timestamp") == "2022-06-29T15:33:46Z"
58 results[1].Overflow.Alert.Events[0].GetMeta("username") == "[email protected]"
59 results[1].Overflow.Alert.Events[1].GetMeta("datasource_path") == "exim-spam.log"
60 results[1].Overflow.Alert.Events[1].GetMeta("datasource_type") == "file"
61 results[1].Overflow.Alert.Events[1].GetMeta("log_type") == "spam-attempt"
62 results[1].Overflow.Alert.Events[1].GetMeta("service") == "exim"
63 results[1].Overflow.Alert.Events[1].GetMeta("source_dns") == "test.sa.com"
64 results[1].Overflow.Alert.Events[1].GetMeta("source_ip") == "1.2.3.4"
65 results[1].Overflow.Alert.Events[1].GetMeta("timestamp") == "2022-06-29T15:35:46Z"
66 results[1].Overflow.Alert.Events[2].GetMeta("datasource_path") == "exim-spam.log"
67 results[1].Overflow.Alert.Events[2].GetMeta("datasource_type") == "file"
68 results[1].Overflow.Alert.Events[2].GetMeta("log_type") == "spam-attempt"
69 results[1].Overflow.Alert.Events[2].GetMeta("service") == "exim"
70 results[1].Overflow.Alert.Events[2].GetMeta("source_dns") == "tata.test.biz"
71 results[1].Overflow.Alert.Events[2].GetMeta("source_ip") == "1.2.3.4"
72 results[1].Overflow.Alert.Events[2].GetMeta("source_user") == "[email protected]"
73 results[1].Overflow.Alert.Events[2].GetMeta("timestamp") == "2022-06-29T15:36:46Z"
74 results[1].Overflow.Alert.Events[3].GetMeta("datasource_path") == "exim-spam.log"
75 results[1].Overflow.Alert.Events[3].GetMeta("datasource_type") == "file"
76 results[1].Overflow.Alert.Events[3].GetMeta("log_type") == "spam-attempt"
77 results[1].Overflow.Alert.Events[3].GetMeta("service") == "exim"
78 results[1].Overflow.Alert.Events[3].GetMeta("source_dns") == "tata.test.biz"
79 results[1].Overflow.Alert.Events[3].GetMeta("source_ip") == "1.2.3.4"
80 results[1].Overflow.Alert.Events[3].GetMeta("source_user") == "[email protected]"
81 results[1].Overflow.Alert.Events[3].GetMeta("timestamp") == "2022-06-29T15:37:46Z"
82 results[1].Overflow.Alert.GetScenario() == "crowdsecurity/exim-spam"
83 results[1].Overflow.Alert.Remediation == true
84 results[1].Overflow.Alert.GetEventsCount() == 4