⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.75
Server IP:
97.74.87.16
Server:
Linux 16.87.74.97.host.secureserver.net 5.14.0-503.38.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 18 08:52:10 EDT 2025 x86_64
Server Software:
Apache
PHP Version:
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
var
/
opt
/
nydus
/
ops
/
primordial
/
View File Name :
constants.py
# -*- coding: utf-8 -*- """This module holds constants needed for primordial.""" try: import fcntl except ImportError: pass # Windows import ipaddress import struct import socket CANONICAL_TIMESTRING_FORMAT = '%Y-%m-%dT%H:%M:%S.%fZ' "Standard format for time strings." CANONICAL_TIMESTRING_FORMAT_NO_ZULU = '%Y-%m-%dT%H:%M:%S.%f' "Standard format for time strings without a trailing Z." CANONICAL_TIMESTRING_FORMAT_NO_MICROSECONDS = '%Y-%m-%dT%H:%M:%SZ' "Strandard format for time strings without microseconds." def getIP() -> str: """Get the IP address of this machine.""" try: ips = [ip for ip in socket.gethostbyname_ex(socket.gethostname())[2] if not ip.startswith("127.")] if ips: for ip in ips: if ipaddress.ip_address(str(ip)).is_private: return ip return ips[0] except socket.gaierror: pass try: s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) ipstr = struct.pack('256s'.encode('ascii'), 'eth0'.encode('ascii')) return socket.inet_ntoa( fcntl.ioctl(s.fileno(), 0x8915, ipstr)[20:24]) except (IOError, RuntimeError, socket.gaierror): return '127.0.0.1' IP = getIP() "The IP address of this machine on which this is running."