[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: __main__.py
File is not writable. Editing disabled.
import collections.abc import pycares import select import socket import sys def wait_channel(channel): while True: read_fds, write_fds = channel.getsock() if not read_fds and not write_fds: break timeout = channel.timeout() if not timeout: channel.process_fd(pycares.ARES_SOCKET_BAD, pycares.ARES_SOCKET_BAD) continue rlist, wlist, xlist = select.select(read_fds, write_fds, [], timeout) for fd in rlist: channel.process_fd(fd, pycares.ARES_SOCKET_BAD) for fd in wlist: channel.process_fd(pycares.ARES_SOCKET_BAD, fd) def cb(result, error): if error is not None: print('Error: (%d) %s' % (error, pycares.errno.strerror(error))) else: parts = [ ';; QUESTION SECTION:', ';%s\t\t\tIN\t%s' % (hostname, qtype.upper()), '', ';; ANSWER SECTION:' ] if not isinstance(result, collections.abc.Iterable): result = [result] for r in result: txt = '%s\t\t%d\tIN\t%s' % (hostname, r.ttl, r.type) if r.type in ('A', 'AAAA'): parts.append('%s\t%s' % (txt, r.host)) elif r.type == 'CAA': parts.append('%s\t%d %s "%s"' % (txt, r.critical, r.property, r.value)) elif r.type == 'CNAME': parts.append('%s\t%s' % (txt, r.cname)) elif r.type == 'MX': parts.append('%s\t%d %s' % (txt, r.priority, r.host)) elif r.type == 'NAPTR': parts.append('%s\t%d %d "%s" "%s" "%s" %s' % (txt, r.order, r.preference, r.flags, r.service, r.regex, r.replacement)) elif r.type == 'NS': parts.append('%s\t%s' % (txt, r.host)) elif r.type == 'PTR': parts.append('%s\t%s' % (txt, r.name)) elif r.type == 'SOA': parts.append('%s\t%s %s %d %d %d %d %d' % (txt, r.nsname, r.hostmaster, r.serial, r.refresh, r.retry, r.expires, r.minttl)) elif r.type == 'SRV': parts.append('%s\t%d %d %d %s' % (txt, r.priority, r.weight, r.port, r.host)) elif r.type == 'TXT': parts.append('%s\t"%s"' % (txt, r.text)) print('\n'.join(parts)) channel = pycares.Channel() if len(sys.argv) not in (2, 3): print('Invalid arguments! Usage: python -m pycares [query_type] hostname') sys.exit(1) if len(sys.argv) == 2: _, hostname = sys.argv qtype = 'A' else: _, qtype, hostname = sys.argv try: query_type = getattr(pycares, 'QUERY_TYPE_%s' % qtype.upper()) except Exception: print('Invalid query type: %s' % qtype) sys.exit(1) channel.query(hostname, query_type, cb) wait_channel(channel)
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server05.hostinghome.co.in
Server IP: 192.168.74.40
PHP Version: 7.4.33
Server Software: Apache
System: Linux server05.hostinghome.co.in 3.10.0-962.3.2.lve1.5.81.el7.x86_64 #1 SMP Wed May 31 10:36:47 UTC 2023 x86_64
HDD Total: 1.95 TB
HDD Free: 691.56 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Disabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: itsweb
User ID (UID): 1619
Group ID (GID): 1621
Script Owner UID: 1619
Current Dir Owner: N/A