Skip to main content
# IPGenerator
-------------

############################################

__Program__: IPGenerator
__version__: 0.3.1
__Author__ : Boumediene Kaddour
__Email__ : snboumediene@gmail.com
__Website__: http://www.pentestingskills.com

############################################

This is a very simple third-party python module that generates list of ALL IPs for a given network, the module provides a couple of other information as well, through out the Class IPGen for instance, you can get the first IP, the last IP, the BROADCAST address or the network ID, in addition, you can generate the list of IPs which is returned as a list.
The module provides another Class for performing an informtion gathering, for example you can use the localIP() method to get the local IP address, or you can use other methods to get other info like MASK(), GATEWAY(), GW_MAC() ... etc.


Requirements:
------------

No third-party mudules are needed, which means the tool has been built from scratch, i'm using only the AF_INET, SOCK_STREAM and inet_ntoa socket methods.

Usage:
-----

# Generating List of IPs
------------------------
>>> from IPGenerator import IPGen, Netinfo
>>> ip = IPGenerator("172.16.122.1/28")
>>> ip.isNetOK()
>>> True
>>> iplist = ip.IPGen()
>>> for IP in iplist:
>>> .... print IP
172.16.122.1
172.16.122.2
172.16.122.3
172.16.122.4
172.16.122.5
172.16.122.6
172.16.122.7
172.16.122.8
172.16.122.9
172.16.122.10
172.16.122.11
172.16.122.12
172.16.122.13
172.16.122.14

# Getting the local IP address
------------------------------
>>> LIP = Netinfo().localIP()
>>> print "The local IP address is: %s "%LIP
>>> The local IP address is: 172.16.122.99
>>> print Netinfo().MASK()
255.255.255.0
>>> print Netinfo().GATEWAY()
172.16.122.1

Release files for IPGenerator 0.3.1

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

Source distribution (sdist)

Source distribution for IPGenerator 0.3.1
File Size Uploaded
IPGenerator-0.3.1.tar.gz 3.7 kB Details

Release files / IPGenerator-0.3.1.tar.gz

Download URL IPGenerator-0.3.1.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a8bb00a00ad1b63689c2f1bc41a90e7c73120460145d557846a5e4ce8f3443c3
BLAKE2b-256 checksum
How to use checksums
d6ffbeac5083b34d95825406de371fa25a2a92641bb5d2a0e16b44f26e5d31c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.3.1 This release

1 release file

0.3

1 release file

0.3.0

1 release file

0.2

1 release file

0.1

0.0

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