Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError: dictionary changed size during iteration #92

Closed
wistoff opened this issue Apr 13, 2020 · 1 comment
Closed

RuntimeError: dictionary changed size during iteration #92

wistoff opened this issue Apr 13, 2020 · 1 comment

Comments

@wistoff
Copy link

wistoff commented Apr 13, 2020

After successfully running and catching I get the following error always after a few minutes.

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/python3/dist-packages/scapy/sendrecv.py", line 603, 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 180, in register_imsi
    if imsi1: self.imsi_seen(imsi1, arfcn)
  File "simple_IMSI-catcher.py", line 257, in imsi_seen
    self.imsi_purge_old()
  File "simple_IMSI-catcher.py", line 262, in imsi_purge_old
    for imsi in self.imsistate.keys():
RuntimeError: dictionary changed size during iteration
@jbarea
Copy link

jbarea commented Apr 17, 2020

I get the error as well after a few minutes of running.
My output is this:

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/python3/dist-packages/scapy/sendrecv.py", line 886, 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 180, in register_imsi if imsi1: self.imsi_seen(imsi1, arfcn) File "simple_IMSI-catcher.py", line 257, in imsi_seen self.imsi_purge_old() File "simple_IMSI-catcher.py", line 262, in imsi_purge_old for imsi in self.imsistate.keys(): RuntimeError: dictionary changed size during iteration

@Oros42 Oros42 closed this as completed in f05313a Apr 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants