Python 100 project #30: Fortigate Policy to CSV

Today I made a script it takes fortigate config, and make a csv file for firewall policies.

If I use API, it can be much easier, as it does not require any data transformation required to collect those data. But still there are lots of cases (and most of the cases for me) the API is not enabled on the unit. In those cases, I need to use text based config file to make a parameter sheet.

 

Output Example:

 

Here is the code: