Linux cpanel.rrshost.in 5.15.0-25-generic #25-Ubuntu SMP Wed Mar 30 15:54:22 UTC 2022 x86_64
Apache
: 109.123.238.221 | : 172.70.100.119
128 Domain
8.2.28
aev999
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
share /
doc /
python3-dnspython /
examples /
[ HOME SHELL ]
Name
Size
Permission
Action
async_dns.py
702
B
-rw-r--r--
ddns.py
1.18
KB
-rwxr-xr-x
doh-json.py
2.95
KB
-rwxr-xr-x
doh.py
1.16
KB
-rwxr-xr-x
e164.py
114
B
-rwxr-xr-x
ecs.py
429
B
-rwxr-xr-x
mx.py
189
B
-rwxr-xr-x
name.py
430
B
-rwxr-xr-x
query_specific.py
815
B
-rw-r--r--
receive_notify.py
1.01
KB
-rw-r--r--
reverse.py
1.39
KB
-rwxr-xr-x
reverse_name.py
139
B
-rwxr-xr-x
xfr.py
340
B
-rwxr-xr-x
zonediff.py
11.53
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : reverse.py
#!/usr/bin/env python3 # Usage: reverse.py <zone_filename>... # # This demo script will load in all of the zones specified by the # filenames on the command line, find all the A RRs in them, and # construct a reverse mapping table that maps each IP address used to # the list of names mapping to that address. The table is then sorted # nicely and printed. # # Note! The zone name is taken from the basename of the filename, so # you must use filenames like "/wherever/you/like/dnspython.org" and # not something like "/wherever/you/like/foo.db" (unless you're # working with the ".db" GTLD, of course :)). # # If this weren't a demo script, there'd be a way of specifying the # origin for each zone instead of constructing it from the filename. import dns.zone import dns.ipv4 import os.path import sys from typing import Dict, List # pylint: disable=unused-import reverse_map = {} # type: Dict[str, List[str]] for filename in sys.argv[1:]: zone = dns.zone.from_file(filename, os.path.basename(filename), relativize=False) for (name, ttl, rdata) in zone.iterate_rdatas('A'): print(type(rdata)) try: reverse_map[rdata.address].append(name.to_text()) except KeyError: reverse_map[rdata.address] = [name.to_text()] for k in sorted(reverse_map.keys(), key=dns.ipv4.inet_aton): v = reverse_map[k] v.sort() print(k, v)
Close