Parse success, python ctypes struct to library connected

This commit is contained in:
infidel
2023-10-25 23:51:08 +07:00
parent e420442b3d
commit cfa5264b16
8 changed files with 1836 additions and 1530 deletions

View File

@@ -1,11 +1,39 @@
# Infidel's iptables log parser
# Iptables Log parser
## Codes
## How To
### Build
```c=
mkdir lib
#Compile the library
make parse_lib.so
```
### Execute
```bash=
./wrapper.py
```
## Structure
### wrapper.py
Reads, iptables.log and calls the c `parser_lib.so`. Feed the parser library with lines from iptables log.
Reads, iptables.log and calls the `lib/parser_lib.so`. Feed the parser library with lines from iptables log.
### parser_lib.so
### lib/parser_lib.so
Process the sed like operation on the line by line feeded by `wrapper.py`.
Current parsed values are :
- Source IP
- Destination IP
- Packet Length
- Interface IN
- Interface OUT
- Protocol