Giter VIP home page Giter VIP logo

Comments (3)

gripedthumbtacks avatar gripedthumbtacks commented on July 21, 2024

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.

gripedthumbtacks avatar gripedthumbtacks commented on July 21, 2024

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.

mschwager avatar mschwager commented on July 21, 2024

@9Yg1rxeSeha90ZU1 thanks for the reproducible error case!

from fierce.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.