nosmo / fess_up Goto Github PK
View Code? Open in Web Editor NEWUnintelligent DNS record guesser in Python
Unintelligent DNS record guesser in Python
% python fess-up.py -c ../conf/fess-up.yaml google.ca
google.ca
File "fess-up.py", line 159, in <module>
main(args.domains, mysql_config)
File "fess-up.py", line 131, in main
domain_scanner.runScan()
File "fess-up.py", line 63, in runScan
for subdomain, record in self._scan("A").iteritems():
File "fess-up.py", line 87, in _scan
answers = dns.resolver.query("%s" % (query_str), record_type)
File "/usr/lib/python2.7/dist-packages/dns/resolver.py", line 770, in query
raise_on_no_answer)
File "/usr/lib/python2.7/dist-packages/dns/resolver.py", line 602, in query
qname = dns.name.from_text(qname, None)
File "/usr/lib/python2.7/dist-packages/dns/name.py", line 637, in from_text
raise EmptyLabel
dns.name.EmptyLabel
Seems to work OK if I add
try:
answers = dns.resolver.query("%s" % (query_str), record_type)
except (dns.resolver.NXDOMAIN, dns.resolver.NoAnswer, dns.name.EmptyLabel):
continue
The nature of wildcard records messes up our scan for the most part, but it doesn't mean that we can't get TXT and MX records for @. Make sure these are queried before DomainScans return.
This is an edge case and not part of the common scanning flow but fess-up needs to check for records like _domainkey
The path that is used to locate *txt for dnsnames is incorrect and will frequently glob the wrong thing.
Steps to reproduce:
$ virtualenv /tmp/sandbox
$ /tmp/sandbox/bin/pip install fess_up
$ /tmp/sandbox/bin/fess_up.py
Traceback (most recent call last):
File "/tmp/sandbox/bin/fess_up.py", line 20, in <module>
import yaml
ImportError: No module named yaml
Steps to reproduce:
$ virtualenv /tmp/sandbox
$ /tmp/sandbox/bin/pip install fess_up pyyaml
$ /tmp/sandbox/bin/fess_up.py
Traceback (most recent call last):
File "/tmp/sandbox/bin/fess_up.py", line 23, in <module>
from fess_up import dnsnames, DomainScan
File "/tmp/sandbox/bin/fess_up.py", line 23, in <module>
from fess_up import dnsnames, DomainScan
ImportError: cannot import name dnsnames
This happens because Python adds the directory containing the script to the beginning of sys.path, and then 'from fess_up import ...' finds fess_up.py
in the script directory instead of finding fess_up/__init__.py
in the site-packages directory.
Suggested fix: rename the script to not have the .py
extension.
I need to pass in the list
fess_up.DomainScan("yahoo.com", ['www', 'mail', 'wiki', 'search', 'blog' ...
manually if I use this as a module, since I don't actually run fess_up.py.
Fess up will not return DNS records if resolving any domain results in a Timeout()
exception being raised from the Python DNS library.
Traceback (most recent call last):
<!-- SNIP -->
File "/usr/local/lib/python2.7/dist-packages/fess_up/domainscan.py",
line 36, in runScan
for subdomain, record in self._scan("NS").iteritems():
File "/usr/local/lib/python2.7/dist-packages/fess_up/domainscan.py",
line 64, in _scan
answers = self.resolver.query("%s" % (query_str), record_type)
File "/usr/lib/python2.7/dist-packages/dns/resolver.py", line 826, in
query
timeout = self._compute_timeout(start)
File "/usr/lib/python2.7/dist-packages/dns/resolver.py", line 739, in
_compute_timeout
raise Timeout
Timeout
When running fess-up.py
python fess-up.py
Traceback (most recent call last):
File "./fess-up.py", line 29, in <module>
import dnsnames
File "/home/l/documents/fess-up/src/dnsnames/__init__.py", line 15, in <module>
dnsnames += set(codes)
NameError: name 'codes' is not defined
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.