Crypt0s / FakeDns

A regular-expression based python MITM DNS server with support for DNS Rebinding attacks
MIT License
547 stars 147 forks source link

fakedns.py asnwered wrong IP v4 address #34

Closed ftanida closed 4 years ago

ftanida commented 4 years ago

[Problem] fakedns.py responds wrong IP v4 address:

[Environment] MacOSX 10.15 Python 3.7.3

[Test case]

  1. add following entry dns.conf: A www.example.com 192.168.2.5
  2. use builtin nslookup command

[Server responds]

Non-authoritative answer: Name: www.example.com Address: 93.184.216.34

[How to fix] directly composing byte array in the usage of Integer.to_byte() instead of chr() Quit encoding at line 220

FredericLespez commented 4 years ago

Works like a charm :-)