wifijammer-ng icon indicating copy to clipboard operation
wifijammer-ng copied to clipboard

UnicodeEncodeError: 'ascii' codec can't encode characters in position 3-4

Open lynnux opened this issue 5 years ago • 2 comments

[*] 38:d5:47:0b:b3:0c    - 6     - ASUS                      - 0
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/local/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "wifijammer-ng.py", line 160, in channel_hop
    self.output()
  File "wifijammer-ng.py", line 225, in output
    str(len([x[0] for x in self.clients if x[0].lower() == ap[0].lower()]))
UnicodeEncodeError: 'ascii' codec can't encode characters in position 3-4: ordinal not in range(128)

I'm in china there maybe has some chinese chars in ap name. Well, the original wifijammer doesn't has the trouble.

lynnux avatar Jul 13 '18 02:07 lynnux

I commented the print lines near 225, get another error:

[+] wlan0 channel 6

      Access Points     ch     ESSID
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/local/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "wifijammer-ng.py", line 170, in channel_hop
    self.deauth()
  File "wifijammer-ng.py", line 268, in deauth
    send(p, inter=float(self.mTimeout), count=self.mPackets)
  File "/usr/local/lib/python2.7/site-packages/scapy/sendrecv.py", line 258, in send
    realtime=realtime, return_packets=return_packets)
  File "/usr/local/lib/python2.7/site-packages/scapy/sendrecv.py", line 236, in __gen_send
    s.send(p)
  File "/usr/local/lib/python2.7/site-packages/scapy/arch/linux.py", line 397, in send
    self.outs.sendto(sx, sdto)
error: [Errno 105] No buffer space available

lynnux avatar Jul 13 '18 02:07 lynnux

This issue is usually due to a unicode character in the access points ssid. Some millenial assholes like putting shit emojis in their SSID's and messing up these scanners. It requires an additional filter and is a pain in the ass.

MisterBianco avatar Aug 29 '18 22:08 MisterBianco