I need your help to write a python function that will read txt with firewall configuration
rules and extract information into an sqlite table, filling table Rules reading a text file with firewall rules will be required to
extract the information.
The sqlite table named Rules has the below columns.
name | source_zone | destination_zone | rule_id | protocol | source_IP | destination_IP
| source_port | destination_port | action
The funtion will take arguments as per below:
The different fields will be selected from lines containing firewall rules with different syntax rules, sor there will be different possible conditions depending on the syntax to extract the information.
I will provide the table as well as examples of input and desired output in order to test the funtion.
File named: configs and sqlite files.zip contains the config1.txt , config2.txt and configdb.sqlite files compressed.
Copyright © 2020 | Truelancer.com