Comments (3)
This is due to a CNAME record response without a corresponding A record. You can recreate it like so:
$ python3 fierce.py --domain keypr.com --subdomains outgoing
And you will see something like:
NS: ns-1101.awsdns-09.org. ns-1979.awsdns-55.co.uk. ns-347.awsdns-43.com. ns-731.awsdns-27.net.
SOA: ns-347.awsdns-43.com. (205.251.193.91)
Zone: failure
Wildcard: failure
Traceback (most recent call last):
File "fierce.py", line 408, in <module>
main()
File "fierce.py", line 405, in main
fierce(**vars(args))
File "fierce.py", line 290, in fierce
ip = ipaddress.IPv4Address(record[0].address)
File "../dnspython-1.15.0-py3.5.egg/dns/resolver.py", line 281, in __getitem__
TypeError: 'NoneType' object is not subscriptable
See dig output:
$ dig outgoing.keypr.com
; <<>> DiG ... <<>> outgoing.keypr.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: ...
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;outgoing.keypr.com. IN A
;; ANSWER SECTION:
outgoing.keypr.com. 299 IN CNAME u4122848.wl099.sendgrid.net.
;; AUTHORITY SECTION:
wl099.sendgrid.net. 179 IN SOA ns10.dnsmadeeasy.com. dns.dnsmadeeasy.com. 2009017173 43200 3600 1209600 180
;; Query time: 65 msec
;; SERVER: ...)
;; WHEN: ...
;; MSG SIZE rcvd: 145
from fierce.
And here is a patch to resolve it:
--- fierce.py.orig 2017-01-03 22:23:35.948000000 -0500
+++ fierce.py 2017-01-03 22:22:51.056000000 -0500
@@ -286,8 +286,10 @@
if record is None:
continue
-
- ip = ipaddress.IPv4Address(record[0].address)
+ try:
+ ip = ipaddress.IPv4Address(record[0].address)
+ except TypeError:
+ continue
print("Found: {} ({})".format(url, ip))
if kwargs.get('connect') and not ip.is_private:
from fierce.
@9Yg1rxeSeha90ZU1 thanks for the reproducible error case!
from fierce.
Related Issues (20)
- Socket errors with --connect option HOT 1
- Doen't work with cloudflare DNS HOT 3
- ConnectionRefusedError: [Errno 111] Connection refused HOT 1
- Problem for two subdomains separated by dot with --subdomain-file HOT 3
- Problem with subdomains and wildcard failure HOT 1
- `dns.name.EmptyLabel` stack trace HOT 4
- Timeout from DNS resolver crashes program HOT 3
- Timeout during AXFR HOT 1
- Homebrew formula? HOT 3
- FileNotFoundError: [Errno 2] No such file or directory: 'default.txt' HOT 26
- Zone transfer error: REFUSED / NOTAUTH HOT 5
- Traverse expander breaks on IP addresses close to zero HOT 4
- Zone: failure & Wildcard: failure
- Allow later dnspython releases
- problem using fierce against an internal DNS
- Pull
- Zone transfert not working when DNS is badly configured
- TypeError: 'NoneType' object is not subscriptable HOT 6
- File 'lists/default.txt' missing HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fierce.