Debian Codegraph @

hub1/.tests/proftpd-logs/parser.assert

raw
1 len(results) == 4
2 len(results["s00-raw"]["crowdsecurity/non-syslog"]) == 4
3 results["s00-raw"]["crowdsecurity/non-syslog"][0].Success == true
4 results["s00-raw"]["crowdsecurity/non-syslog"][0].Evt.Parsed["program"] == "proftpd"
5 results["s00-raw"]["crowdsecurity/non-syslog"][0].Evt.Parsed["message"] == "2021-05-28 18:08:01,124 mantis proftpd[498625] mantis (192.168.1.142[192.168.1.142]): USER asd: no such user found from 192.168.1.142 [192.168.1.142] to ::ffff:192.168.1.23:21"
6 results["s00-raw"]["crowdsecurity/non-syslog"][0].Evt.Meta["datasource_path"] == "proftpd-logs.log"
7 results["s00-raw"]["crowdsecurity/non-syslog"][0].Evt.Meta["datasource_type"] == "file"
8 results["s00-raw"]["crowdsecurity/non-syslog"][1].Success == true
9 results["s00-raw"]["crowdsecurity/non-syslog"][1].Evt.Parsed["message"] == "2021-05-28 18:08:34,399 mantis proftpd[498819] mantis (192.168.1.142[192.168.1.142]): USER seb (Login failed): Incorrect password"
10 results["s00-raw"]["crowdsecurity/non-syslog"][1].Evt.Parsed["program"] == "proftpd"
11 results["s00-raw"]["crowdsecurity/non-syslog"][1].Evt.Meta["datasource_path"] == "proftpd-logs.log"
12 results["s00-raw"]["crowdsecurity/non-syslog"][1].Evt.Meta["datasource_type"] == "file"
13 results["s00-raw"]["crowdsecurity/non-syslog"][2].Success == true
14 results["s00-raw"]["crowdsecurity/non-syslog"][2].Evt.Parsed["message"] == "Jan 7 18:26:02 amazing-ishizaka proftpd[80283]: 172.31.39.97 (1.1.1.1[1.1.1.1]) - USER sdf: no such user found from 1.1.1.1 [1.1.1.1] to 172.31.39.97:21"
15 results["s00-raw"]["crowdsecurity/non-syslog"][2].Evt.Parsed["program"] == "proftpd"
16 results["s00-raw"]["crowdsecurity/non-syslog"][2].Evt.Meta["datasource_path"] == "proftpd-logs.log"
17 results["s00-raw"]["crowdsecurity/non-syslog"][2].Evt.Meta["datasource_type"] == "file"
18 results["s00-raw"]["crowdsecurity/non-syslog"][3].Success == true
19 results["s00-raw"]["crowdsecurity/non-syslog"][3].Evt.Parsed["message"] == "Jan 7 18:26:52 amazing-ishizaka proftpd[80686]: 172.31.39.97 (1.1.1.1[1.1.1.1]) - USER unruffled-feynman (Login failed): Incorrect password"
20 results["s00-raw"]["crowdsecurity/non-syslog"][3].Evt.Parsed["program"] == "proftpd"
21 results["s00-raw"]["crowdsecurity/non-syslog"][3].Evt.Meta["datasource_path"] == "proftpd-logs.log"
22 results["s00-raw"]["crowdsecurity/non-syslog"][3].Evt.Meta["datasource_type"] == "file"
23 len(results["s00-raw"]["crowdsecurity/syslog-logs"]) == 4
24 results["s00-raw"]["crowdsecurity/syslog-logs"][0].Success == false
25 results["s00-raw"]["crowdsecurity/syslog-logs"][1].Success == false
26 results["s00-raw"]["crowdsecurity/syslog-logs"][2].Success == false
27 results["s00-raw"]["crowdsecurity/syslog-logs"][3].Success == false
28 len(results["s01-parse"]["proftpd-logs"]) == 4
29 results["s01-parse"]["proftpd-logs"][0].Success == true
30 results["s01-parse"]["proftpd-logs"][0].Evt.Parsed["hostname"] == "mantis"
31 results["s01-parse"]["proftpd-logs"][0].Evt.Parsed["message"] == "2021-05-28 18:08:01,124 mantis proftpd[498625] mantis (192.168.1.142[192.168.1.142]): USER asd: no such user found from 192.168.1.142 [192.168.1.142] to ::ffff:192.168.1.23:21"
32 results["s01-parse"]["proftpd-logs"][0].Evt.Parsed["program"] == "proftpd"
33 results["s01-parse"]["proftpd-logs"][0].Evt.Parsed["source_ip"] == "192.168.1.142"
34 results["s01-parse"]["proftpd-logs"][0].Evt.Parsed["timestamp"] == "2021-05-28 18:08:01,124"
35 results["s01-parse"]["proftpd-logs"][0].Evt.Parsed["username"] == "asd"
36 results["s01-parse"]["proftpd-logs"][0].Evt.Meta["datasource_path"] == "proftpd-logs.log"
37 results["s01-parse"]["proftpd-logs"][0].Evt.Meta["datasource_type"] == "file"
38 results["s01-parse"]["proftpd-logs"][0].Evt.Meta["log_type"] == "ftp_failed_auth"
39 results["s01-parse"]["proftpd-logs"][0].Evt.Meta["source_ip"] == "192.168.1.142"
40 results["s01-parse"]["proftpd-logs"][0].Evt.Meta["target_user"] == "asd"
41 results["s01-parse"]["proftpd-logs"][1].Success == true
42 results["s01-parse"]["proftpd-logs"][1].Evt.Parsed["timestamp"] == "2021-05-28 18:08:34,399"
43 results["s01-parse"]["proftpd-logs"][1].Evt.Parsed["username"] == "seb"
44 results["s01-parse"]["proftpd-logs"][1].Evt.Parsed["hostname"] == "mantis"
45 results["s01-parse"]["proftpd-logs"][1].Evt.Parsed["message"] == "2021-05-28 18:08:34,399 mantis proftpd[498819] mantis (192.168.1.142[192.168.1.142]): USER seb (Login failed): Incorrect password"
46 results["s01-parse"]["proftpd-logs"][1].Evt.Parsed["program"] == "proftpd"
47 results["s01-parse"]["proftpd-logs"][1].Evt.Parsed["source_ip"] == "192.168.1.142"
48 results["s01-parse"]["proftpd-logs"][1].Evt.Meta["source_ip"] == "192.168.1.142"
49 results["s01-parse"]["proftpd-logs"][1].Evt.Meta["target_user"] == "seb"
50 results["s01-parse"]["proftpd-logs"][1].Evt.Meta["datasource_path"] == "proftpd-logs.log"
51 results["s01-parse"]["proftpd-logs"][1].Evt.Meta["datasource_type"] == "file"
52 results["s01-parse"]["proftpd-logs"][1].Evt.Meta["log_type"] == "ftp_failed_auth"
53 results["s01-parse"]["proftpd-logs"][2].Success == true
54 results["s01-parse"]["proftpd-logs"][2].Evt.Parsed["program"] == "proftpd"
55 results["s01-parse"]["proftpd-logs"][2].Evt.Parsed["source_ip"] == "1.1.1.1"
56 results["s01-parse"]["proftpd-logs"][2].Evt.Parsed["timestamp"] == "Jan 7 18:26:02"
57 results["s01-parse"]["proftpd-logs"][2].Evt.Parsed["username"] == "sdf"
58 results["s01-parse"]["proftpd-logs"][2].Evt.Parsed["hostname"] == "172.31.39.97"
59 results["s01-parse"]["proftpd-logs"][2].Evt.Parsed["message"] == "Jan 7 18:26:02 amazing-ishizaka proftpd[80283]: 172.31.39.97 (1.1.1.1[1.1.1.1]) - USER sdf: no such user found from 1.1.1.1 [1.1.1.1] to 172.31.39.97:21"
60 results["s01-parse"]["proftpd-logs"][2].Evt.Meta["datasource_type"] == "file"
61 results["s01-parse"]["proftpd-logs"][2].Evt.Meta["log_type"] == "ftp_failed_auth"
62 results["s01-parse"]["proftpd-logs"][2].Evt.Meta["source_ip"] == "1.1.1.1"
63 results["s01-parse"]["proftpd-logs"][2].Evt.Meta["target_user"] == "sdf"
64 results["s01-parse"]["proftpd-logs"][2].Evt.Meta["datasource_path"] == "proftpd-logs.log"
65 results["s01-parse"]["proftpd-logs"][3].Success == true
66 results["s01-parse"]["proftpd-logs"][3].Evt.Parsed["source_ip"] == "1.1.1.1"
67 results["s01-parse"]["proftpd-logs"][3].Evt.Parsed["timestamp"] == "Jan 7 18:26:52"
68 results["s01-parse"]["proftpd-logs"][3].Evt.Parsed["username"] == "unruffled-feynman"
69 results["s01-parse"]["proftpd-logs"][3].Evt.Parsed["hostname"] == "172.31.39.97"
70 results["s01-parse"]["proftpd-logs"][3].Evt.Parsed["message"] == "Jan 7 18:26:52 amazing-ishizaka proftpd[80686]: 172.31.39.97 (1.1.1.1[1.1.1.1]) - USER unruffled-feynman (Login failed): Incorrect password"
71 results["s01-parse"]["proftpd-logs"][3].Evt.Parsed["program"] == "proftpd"
72 results["s01-parse"]["proftpd-logs"][3].Evt.Meta["log_type"] == "ftp_failed_auth"
73 results["s01-parse"]["proftpd-logs"][3].Evt.Meta["source_ip"] == "1.1.1.1"
74 results["s01-parse"]["proftpd-logs"][3].Evt.Meta["target_user"] == "unruffled-feynman"
75 results["s01-parse"]["proftpd-logs"][3].Evt.Meta["datasource_path"] == "proftpd-logs.log"
76 results["s01-parse"]["proftpd-logs"][3].Evt.Meta["datasource_type"] == "file"
77 len(results["s02-enrich"]["crowdsecurity/dateparse-enrich"]) == 4
78 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][0].Success == true
79 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][0].Evt.Parsed["hostname"] == "mantis"
80 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][0].Evt.Parsed["message"] == "2021-05-28 18:08:01,124 mantis proftpd[498625] mantis (192.168.1.142[192.168.1.142]): USER asd: no such user found from 192.168.1.142 [192.168.1.142] to ::ffff:192.168.1.23:21"
81 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][0].Evt.Parsed["program"] == "proftpd"
82 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][0].Evt.Parsed["source_ip"] == "192.168.1.142"
83 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][0].Evt.Parsed["timestamp"] == "2021-05-28 18:08:01,124"
84 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][0].Evt.Parsed["username"] == "asd"
85 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][0].Evt.Meta["datasource_path"] == "proftpd-logs.log"
86 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][0].Evt.Meta["datasource_type"] == "file"
87 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][0].Evt.Meta["log_type"] == "ftp_failed_auth"
88 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][0].Evt.Meta["source_ip"] == "192.168.1.142"
89 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][0].Evt.Meta["target_user"] == "asd"
90 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][0].Evt.Meta["timestamp"] == "2021-05-28T18:08:01.124Z"
91 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][0].Evt.Enriched["MarshaledTime"] == "2021-05-28T18:08:01.124Z"
92 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][1].Success == true
93 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][1].Evt.Parsed["username"] == "seb"
94 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][1].Evt.Parsed["hostname"] == "mantis"
95 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][1].Evt.Parsed["message"] == "2021-05-28 18:08:34,399 mantis proftpd[498819] mantis (192.168.1.142[192.168.1.142]): USER seb (Login failed): Incorrect password"
96 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][1].Evt.Parsed["program"] == "proftpd"
97 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][1].Evt.Parsed["source_ip"] == "192.168.1.142"
98 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][1].Evt.Parsed["timestamp"] == "2021-05-28 18:08:34,399"
99 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][1].Evt.Meta["datasource_path"] == "proftpd-logs.log"
100 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][1].Evt.Meta["datasource_type"] == "file"
101 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][1].Evt.Meta["log_type"] == "ftp_failed_auth"
102 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][1].Evt.Meta["source_ip"] == "192.168.1.142"
103 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][1].Evt.Meta["target_user"] == "seb"
104 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][1].Evt.Meta["timestamp"] == "2021-05-28T18:08:34.399Z"
105 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][1].Evt.Enriched["MarshaledTime"] == "2021-05-28T18:08:34.399Z"
106 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][2].Success == true
107 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][2].Evt.Parsed["timestamp"] == "Jan 7 18:26:02"
108 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][2].Evt.Parsed["username"] == "sdf"
109 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][2].Evt.Parsed["hostname"] == "172.31.39.97"
110 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][2].Evt.Parsed["message"] == "Jan 7 18:26:02 amazing-ishizaka proftpd[80283]: 172.31.39.97 (1.1.1.1[1.1.1.1]) - USER sdf: no such user found from 1.1.1.1 [1.1.1.1] to 172.31.39.97:21"
111 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][2].Evt.Parsed["program"] == "proftpd"
112 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][2].Evt.Parsed["source_ip"] == "1.1.1.1"
113 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][2].Evt.Meta["source_ip"] == "1.1.1.1"
114 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][2].Evt.Meta["target_user"] == "sdf"
115 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][2].Evt.Meta["timestamp"][4:] == "-01-07T18:26:02Z"
116 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][2].Evt.Meta["datasource_path"] == "proftpd-logs.log"
117 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][2].Evt.Meta["datasource_type"] == "file"
118 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][2].Evt.Meta["log_type"] == "ftp_failed_auth"
119 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][2].Evt.Enriched["MarshaledTime"][4:] == "-01-07T18:26:02Z"
120 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][3].Success == true
121 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][3].Evt.Parsed["hostname"] == "172.31.39.97"
122 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][3].Evt.Parsed["message"] == "Jan 7 18:26:52 amazing-ishizaka proftpd[80686]: 172.31.39.97 (1.1.1.1[1.1.1.1]) - USER unruffled-feynman (Login failed): Incorrect password"
123 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][3].Evt.Parsed["program"] == "proftpd"
124 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][3].Evt.Parsed["source_ip"] == "1.1.1.1"
125 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][3].Evt.Parsed["timestamp"] == "Jan 7 18:26:52"
126 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][3].Evt.Parsed["username"] == "unruffled-feynman"
127 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][3].Evt.Meta["source_ip"] == "1.1.1.1"
128 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][3].Evt.Meta["target_user"] == "unruffled-feynman"
129 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][3].Evt.Meta["timestamp"][4:] == "-01-07T18:26:52Z"
130 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][3].Evt.Meta["datasource_path"] == "proftpd-logs.log"
131 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][3].Evt.Meta["datasource_type"] == "file"
132 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][3].Evt.Meta["log_type"] == "ftp_failed_auth"
133 results["s02-enrich"]["crowdsecurity/dateparse-enrich"][3].Evt.Enriched["MarshaledTime"][4:] == "-01-07T18:26:52Z"