This commit is contained in:
Xargana 2025-05-16 19:28:37 +03:00
parent 54e78333dd
commit 7ba3bdcda1
9 changed files with 40 additions and 39 deletions

0
utils/__init__.py Normal file
View file

11
utils/network.py Normal file
View file

@ -0,0 +1,11 @@
import socket
def get_ip():
try:
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.connect(("8.8.8.8", 80))
ip = s.getsockname()[0]
s.close()
return ip
except Exception:
return "No IP"