Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
/*.json
/*.xml
/*.code-workspace
/.vscode
/.vscode
__pycache__/
*.pyc
37 changes: 34 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,37 @@
# Juniper Firewall Configuration XML to Excel xlsx

This is script is to make Juniper SRX firewall XML exports more readable in excel format, better for validation processes.
This script makes Juniper SRX firewall XML exports more readable in Excel format, better for validation processes.

The file need to have the name srx.xml and needs to be in the same directory as the script.
Will output a file called test.xlsx.
## Usage

```bash
python3 fw_rules_xml.py -i <inputfile> -o <outputfile>
```

### Options

- `-i, --input`: Input XML file (default: srx.xml)
- `-o, --output`: Output Excel file (default: test.xlsx)
- `-h`: Show help message

### Examples

```bash
# Using default files (srx.xml -> test.xlsx)
python3 fw_rules_xml.py

# Specifying custom input and output files
python3 fw_rules_xml.py -i config.xml -o output.xlsx

# Show help
python3 fw_rules_xml.py -h
```

## Output

The script generates an Excel workbook with the following sheets:
- **Addresses**: Individual address objects
- **Address-sets**: Groups of addresses
- **Policies**: Security policies with source/destination zones and match criteria
- **Applications**: Application definitions
- **Application-sets**: Groups of applications
Loading