Skip to content

Instantly share code, notes, and snippets.

@jjsantanna
Created May 6, 2018 22:22
Show Gist options
  • Save jjsantanna/d517bd76e1c6f9db9d6e3f587ac7498f to your computer and use it in GitHub Desktop.
Save jjsantanna/d517bd76e1c6f9db9d6e3f587ac7498f to your computer and use it in GitHub Desktop.
Generating a list of random IP addresses
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