1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-06-23 00:29:59 +02:00

update docs

This commit is contained in:
Kelly Brazil
2021-04-08 15:52:49 -07:00
parent 4290a3cbd1
commit b8b8dfead4
61 changed files with 1500 additions and 1847 deletions

View File

@ -17,6 +17,29 @@ Usage (module):
import jc.parsers.iptables
result = jc.parsers.iptables.parse(iptables_command_output)
Schema:
[
{
"chain": string,
"rules": [
{
"num" integer,
"pkts": integer,
"bytes": integer, # converted based on suffix
"target": string,
"prot": string,
"opt": string, # "--" = Null
"in": string,
"out": string,
"source": string,
"destination": string,
"options": string
}
]
}
]
Compatibility:
'linux'
@ -146,44 +169,7 @@ Examples:
```python
info()
```
## process
```python
process(proc_data)
```
Final processing to conform to the schema.
Parameters:
proc_data: (List of Dictionaries) raw structured data to process
Returns:
List of Dictionaries. Structured data with the following schema:
[
{
"chain": string,
"rules": [
{
"num" integer,
"pkts": integer,
"bytes": integer, # converted based on suffix
"target": string,
"prot": string,
"opt": string, # "--" = Null
"in": string,
"out": string,
"source": string,
"destination": string,
"options": string
}
]
}
]
Provides parser metadata (version, author, etc.)
## parse
```python