Skip to content

A set of tools written in python, including maybe network ...

Notifications You must be signed in to change notification settings

ddouble/pytools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

pytools

some tool written in python

iprange2network.py

convert ip range to network representation

Dependences:

python 3.7

Usage:

  1. Place your ip ranges in range.txt file placed in same directory with the script , range.txt look like:

    2409:8c14:f1a:8702:0:0:0:0-2409:8c14:f1a:8702:0:0:0:ff
    192.168.1.1-192.168.1.128
    61.160.224.0-61.160.224.255
    
  2. Convert

    python iprange2network.py 
    # or
    python iprange2network.py > output.txt
  3. Done, look network.txt or your output file

    2409:8c14:f1a:8702::/120
    192.168.1.1/32
    192.168.1.2/31
    192.168.1.4/30
    192.168.1.8/29
    192.168.1.16/28
    192.168.1.32/27
    192.168.1.64/26
    192.168.1.128/32
    61.160.224.0/24
    

About

A set of tools written in python, including maybe network ...

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages