https://github.com/n0str/asn-subnet-parser
Just a draft.
https://github.com/n0str/asn-subnet-parser
asn asn-cidr networking parser subnet-summarization
Last synced: 6 months ago
JSON representation
Just a draft.
- Host: GitHub
- URL: https://github.com/n0str/asn-subnet-parser
- Owner: n0str
- Created: 2018-08-06T19:11:38.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T02:20:50.000Z (almost 3 years ago)
- Last Synced: 2025-02-04T15:49:53.822Z (8 months ago)
- Topics: asn, asn-cidr, networking, parser, subnet-summarization
- Language: Python
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# asn-subnet-parser
Just a draft.Allows getting summarized networks list for chosen ASN. Can be used to implement whitelist/blacklist for a firewall.
## Usage
> `python main.py --help`
```usage: main.py [-h] --asn ASN [--output OUTPUT]
optional arguments:
-h, --help show this help message and exit
--asn ASN Autonomous System Number
--output OUTPUT File to save summarized networks
```
> `python main.py --asn 20473 --output networks.txt`> `head networks.txt`
```
4.79.145.0/24
5.35.192.0/21
8.2.120.0/23
8.2.122.0/24
8.3.5.0/24
8.3.6.0/23
8.3.28.0/23
8.6.2.0/23
8.6.8.0/23
8.6.15.0/24
```## Installation and requirements
1. Python 3.6 (or remove f-string instead)
2. `pip install -r requirements.txt` (requests, netaddr and beautifulsoup4)