Code Monkey home page Code Monkey logo

analyzer-d4-passivedns's Issues

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xbf in position 2: invalid start byte

When I run command: python3 pdns-ingestion.py
then display:
2019-06-07 07:19:18,611 - pdns ingestor - INFO - Starting and using FIFO analyzer:8:ac45ea5c-be1b-46db-a0e1-50decb7d3c09 from D4 server
Traceback (most recent call last):
File "pdns-ingestion.py", line 96, in
l = d4_record_line.decode('UTF-8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xbf in position 2: invalid start byte

IP address is stripped one character at the end

if i == 4 or i == 6:

From terminal:

$ dig google.com

; <<>> DiG 9.11.3-1ubuntu1.3-Ubuntu <<>> google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 60926
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;google.com.			IN	A

;; ANSWER SECTION:
google.com.		23	IN	A	172.217.22.78

;; Query time: 19 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Tue Feb 11 17:55:59 CET 2020
;; MSG SIZE  rcvd: 55

From API:

{"time_first": 1581440159, "time_last": 1581440159, "count": 1, "rrtype": "A", "rrname": "google.com", "rdata": "172.217.22.7", "origin": "origin not configured"} 

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.