Closed garpenholm closed 4 years ago
Works fine until...
Traceback (most recent call last): File "simple_IMSI-catcher.py", line 538, in <module> sniff(iface=options.iface, filter="port {} and not icmp and udp".format(options.port), prn=find_imsi_from_pkt, store=0) File "/usr/lib/python2.7/dist-packages/scapy/sendrecv.py", line 620, in sniff r = prn(p) File "simple_IMSI-catcher.py", line 498, in find_imsi_from_pkt find_imsi(udpdata) File "simple_IMSI-catcher.py", line 429, in find_imsi t.register_imsi(gsm.arfcn, imsi1, imsi2, tmsi1, tmsi2, p) File "simple_IMSI-catcher.py", line 225, in register_imsi self.pfields(str(n), self.str_tmsi(tmsi1), self.str_tmsi(tmsi2), imsi1, str(self.mcc), str(self.mnc), str(self.lac), str(self.cell), p) File "simple_IMSI-catcher.py", line 162, in pfields self.output_function(cpt, tmsi1, tmsi2, imsi, imsicountry, imsibrand, imsioperator, mcc, mnc, lac, cell, now, packet) File "simple_IMSI-catcher.py", line 151, in output print("{:7s} ; {:10s} ; {:10s} ; {:17s} ; {:12s} ; {:10s} ; {:21s} ; {:4s} ; {:5s} ; {:6s} ; {:6s} ; {:s}".format(str(cpt), tmsi1, tmsi2, imsi, imsicountry, imsibrand, imsioperator, str(mcc), str(mnc), str(lac), str(cell), now.isoformat())) UnicodeEncodeError: 'ascii' codec can't encode character u'\xf3' in position 5: ordinal not in range(128)
Please use python3 or this old version https://github.com/Oros42/IMSI-catcher/tree/v1
Works fine until...