{"action":"created","issue":{"url":"https://api.github.com/repos/darkoperator/dnsrecon/issues/27","labels_url":"https://api.github.com/repos/darkoperator/dnsrecon/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/darkoperator/dnsrecon/issues/27/comments","events_url":"https://api.github.com/repos/darkoperator/dnsrecon/issues/27/events","html_url":"https://github.com/darkoperator/dnsrecon/issues/27","id":57613699,"number":27,"title":"Incorrect regex causes failure - Record NSEC3  - write_db","user":{"login":"FrankSpierings","id":2954929,"avatar_url":"https://avatars.githubusercontent.com/u/2954929?v=3","gravatar_id":"","url":"https://api.github.com/users/FrankSpierings","html_url":"https://github.com/FrankSpierings","followers_url":"https://api.github.com/users/FrankSpierings/followers","following_url":"https://api.github.com/users/FrankSpierings/following{/other_user}","gists_url":"https://api.github.com/users/FrankSpierings/gists{/gist_id}","starred_url":"https://api.github.com/users/FrankSpierings/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FrankSpierings/subscriptions","organizations_url":"https://api.github.com/users/FrankSpierings/orgs","repos_url":"https://api.github.com/users/FrankSpierings/repos","events_url":"https://api.github.com/users/FrankSpierings/events{/privacy}","received_events_url":"https://api.github.com/users/FrankSpierings/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-13T15:42:54Z","updated_at":"2015-02-14T09:28:19Z","closed_at":null,"body":"Line 782 of dnsrecon.py will process NSEC3 records, which results in a stacktrace as shown below:\r\n\r\nTraceback (most recent call last):\r\n  File \"dnsrecon.py\", line 1666, in <module>\r\n    main()\r\n  File \"dnsrecon.py\", line 1638, in main\r\n    write_db(results_db, returned_records)\r\n  File \"dnsrecon.py\", line 784, in write_db\r\n    'values( \"%(type)s\", \"%(target)s\", \"%(address)s\" )' % n\r\nKeyError: 'target'\r\n\r\nSuggestion for a fix (line 782):\r\n        elif re.match(r'NS$', n['type']):"},"comment":{"url":"https://api.github.com/repos/darkoperator/dnsrecon/issues/comments/74368363","html_url":"https://github.com/darkoperator/dnsrecon/issues/27#issuecomment-74368363","issue_url":"https://api.github.com/repos/darkoperator/dnsrecon/issues/27","id":74368363,"user":{"login":"FrankSpierings","id":2954929,"avatar_url":"https://avatars.githubusercontent.com/u/2954929?v=3","gravatar_id":"","url":"https://api.github.com/users/FrankSpierings","html_url":"https://github.com/FrankSpierings","followers_url":"https://api.github.com/users/FrankSpierings/followers","following_url":"https://api.github.com/users/FrankSpierings/following{/other_user}","gists_url":"https://api.github.com/users/FrankSpierings/gists{/gist_id}","starred_url":"https://api.github.com/users/FrankSpierings/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FrankSpierings/subscriptions","organizations_url":"https://api.github.com/users/FrankSpierings/orgs","repos_url":"https://api.github.com/users/FrankSpierings/repos","events_url":"https://api.github.com/users/FrankSpierings/events{/privacy}","received_events_url":"https://api.github.com/users/FrankSpierings/received_events","type":"User","site_admin":false},"created_at":"2015-02-14T09:28:19Z","updated_at":"2015-02-14T09:28:19Z","body":"This is fixed when using sqlite as output. I'm also testing csv and xml output. This should be the fix for a similar problem in csv output.\r\n\r\n@@ -715,7 +715,7 @@ def make_csv(data):\r\n             if re.search(r'PTR|^[A]$|AAAA', n['type']):\r\n                 csv_data += n['type'] + \",\" + n['name'] + \",\" + n['address'] + \"\\n\"\r\n \r\n-            elif re.search(r'NS', n['type']):\r\n+            elif re.search(r'NS$', n['type']):\r\n                 csv_data += n['type'] + \",\" + n['target'] + \",\" + n['address'] + \"\\n\"\r\n \r\n             elif re.search(r'SOA', n['type']):"}}