dirkjanm / mitm6

pwning IPv4 via IPv6
GNU General Public License v2.0
1.68k stars 246 forks source link

socket.gaierror #6

Closed scorpius closed 5 years ago

scorpius commented 5 years ago

I installed on kali via pip install mitm6, but I always get this error:

Unless this is what you want, specify at least one domain with -d
Traceback (most recent call last):
  File "/usr/local/bin/mitm6", line 10, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/mitm6/mitm6.py", line 362, in main
    dnssock = setupFakeDns()
  File "/usr/local/lib/python2.7/dist-packages/mitm6/mitm6.py", line 284, in setupFakeDns
    addrinfo = socket.getaddrinfo(fulladdr, 53, socket.AF_INET6, socket.SOCK_DGRAM)
socket.gaierror: [Errno -2] Name or service not known

Any suggestions?

scorpius commented 5 years ago

Update: If my IPv6 address starts with 2601, I get the error above. If it starts with fe80, there's no error.

dirkjanm commented 5 years ago

Correct, you need to already have a link-local IPv6 address on the interface you're running mitm6 on, otherwise it will error out.

scorpius commented 5 years ago

ifconfig wlan0 shows that I have fe80 and 2601. ifconfig eth0, shows that I just have just one fe80.

But when I start mitm6 on wlan0 it shows 2601, and then the error.

I must be doing something wrong somewhere.

scorpius commented 5 years ago

I think it was just auto detecting the wrong address. I used the -6 option with my IPv6 link-local address and got no more errors.

dirkjanm commented 5 years ago

Improved this behaviour in the latest version