Created
May 6, 2018 22:22
-
-
Save jjsantanna/d517bd76e1c6f9db9d6e3f587ac7498f to your computer and use it in GitHub Desktop.
Generating a list of random IP addresses
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
def generating_ips(int): | |
ips =[] | |
for x in range(0,int): | |
ip = '{}.{}.{}.{}'.format(*__import__('random').sample(range(0, 255), 4)) | |
ips.append(ip) | |
return ips |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment