Skip to main content
snspoliciestocsv
================

Description
-----------
A simple script to extract policies from a Stormshield Network Security device configuration file to CSV

Options
-------
```
$ python3 snspoliciestocsv.py -h
Usage: snspoliciestocsv.py [options]
Version: 1.0

Options:
-h, --help show this help message and exit

Main parameters:
-i INPUT_FILE, --input-file=INPUT_FILE
Partial or full Stormshield Network security appliance
configuration file. Ex: filter.cfg
-o OUTPUT_FILE, --output-file=OUTPUT_FILE
Output csv file (default ./policies-out.csv)
-s, --skip-header Do not print the csv header
-d DELIMITER, --delimiter=DELIMITER
CSV delimiter (default ";")
```

Examples
--------
#### exemple.txt
```
[Filter]
separator color="000000" comment="Allow VPN A to B" collapse="1"
pass inspection firewall log ipproto vpn-esp proto none from A to B # Créée le 1970-01-01 00:00:01, par Serge (1.2.3.4)
separator color="000000" comment="Block B to C" collapse="1"
block from B to C port ssh # Prenez un chewing-gum EmileCréée le 1970-01-01 00:00:02, par Odile (1.2.3.5)
```

#### policies-out.csv
```
type;from;to;ipproto;proto;port;comment;creation_date;user;ip_user
Allow VPN A to B;;;;;;;;;
pass;A;B;vpn-esp;none;; ;1970-01-01 00:00:01;Serge;1.2.3.4
Block B to C;;;;;;;;;
block;B;C;;;ssh; Prenez un chewing-gum Emile;1970-01-01 00:00:02;Odile;1.2.3.5
```

Dependencies and installation
-----------------------------
* The **easiest way** to setup everything: `pip install snspoliciestocsv` and then directly use `$ snspoliciestocsv`
* Or git clone that repository

Changelog
---------
* version 1.0 - 07/14/2017: Initial commit

Disclaimer and license
---------------------
* **I don't own anything on the Stormshield brand and am not affiliated with organization**
* snspoliciestocsv is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
* snspoliciestocsv is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details: http://www.gnu.org/licenses/

Contact
-------
* Thomas Debize < tdebize at mail d0t com >

Metadata

Release files for snspoliciestocsv 1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for snspoliciestocsv 1.0
File Size Uploaded
snspoliciestocsv-1.0.tar.gz 4.8 kB Details

Release files / snspoliciestocsv-1.0.tar.gz

Download URL snspoliciestocsv-1.0.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
c88f15d696ab3288972dc459576739a17ecef96d4c758998f23ecfe6a7619e65
BLAKE2b-256 checksum
How to use checksums
882c9201abd51aa23bb219d2e08ad394f2e3c3af79166c64052d2724d60fbb4e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

1.12

1 release file

1.11

1 release file

1.1

1 release file

This release

1.0 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page