pythonhacktoberfeststeamauthenticationauthenticatorsteam-authenticatorsteam-clientsteam-guard-codessteam-websteamworksvalvewebapi
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9 lines
178 B
9 lines
178 B
import struct
|
|
import socket
|
|
|
|
|
|
def ip_from_int(ip):
|
|
return socket.inet_ntoa(struct.pack(">L", ip))
|
|
|
|
def ip_to_int(ip):
|
|
return struct.unpack(">L", socket.inet_aton(ip))[0]
|
|
|