Oros42 / IMSI-catcher

This program show you IMSI numbers of cellphones around you.
Creative Commons Zero v1.0 Universal
3.22k stars 736 forks source link

Python type error: a bytes-like object is required #78

Closed arall closed 4 years ago

arall commented 4 years ago

I'm facing this issue in two different devices, running Debian based distros:

python3 simple_IMSI-catcher.py --sniff
Nb IMSI ; TMSI-1     ; TMSI-2     ; IMSI              ; country      ; brand      ; operator              ; MCC  ; MNC   ; LAC    ; CellId
Traceback (most recent call last):
  File "simple_IMSI-catcher.py", line 533, in <module>
    sniff(iface=options.iface, filter="port {} and not icmp and udp".format(options.port), prn=find_imsi_from_pkg, store=0)
  File "/usr/lib/python3/dist-packages/scapy/sendrecv.py", line 972, in sniff
    sniffer._run(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/scapy/sendrecv.py", line 925, in _run
    session.on_packet_received(p)
  File "/usr/lib/python3/dist-packages/scapy/sessions.py", line 47, in on_packet_received
    result = self.prn(pkt)
  File "simple_IMSI-catcher.py", line 493, in find_imsi_from_pkg
    find_imsi(udpdata)
  File "simple_IMSI-catcher.py", line 365, in find_imsi
    gsm = gsmtap_hdr.from_buffer_copy(udpdata)
TypeError: a bytes-like object is required, not 'str'
Oros42 commented 4 years ago

Fixed in https://github.com/Oros42/IMSI-catcher/commit/e73a1eb2b3a91d9d688d99f7dccac619590276b9