ru24.pro
Работа
Октябрь
2024
1 2 3 4 5 6 7 8 9 10 11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

Распарсить sql поле в YML файлах и понять какие поля в sql встречаются чаще всего

0

Добрый день.

Нужно из гитхаба распарсить yml файлы с полем query.

И в поле query распарсить поля в запросе со значениями и сагрегировать какие поля встречаются чаще всего

https://github.com/elastic/detection-rules/blob/main/rules/linux/command_and_control_linux_kworker_netcon.toml

query = '''host.os.type:linux and event.category:network and event.action:(connection_attempted or connection_accepted) and process.name:kworker* and not destination.ip:( 10.0.0.0/8 or 127.0.0.0/8 or 169.254.0.0/16 or 172.16.0.0/12 or 192.168.0.0/16 or 224.0.0.0/4 or "::1" or
"FE80::/10" or
"FF00::/8") and not destination.port:2049'''