Browse Source

sysmo_usimsjs1: check ADM1 length

The length of the ADM1 key is currently not checked. The key is 8
digits long for all sysmo-usim-sjs1 cards. Lets make sure that the
length is checked before trying to authenticate.

Change-Id: I10a89d8343c889f6c1b2cf3fc67d08dcf08790cf
for/master/ret
Philipp Maier 2 years ago
parent
commit
70b7fcde40
  1. 4
      sysmo_usimsjs1.py

4
sysmo_usimsjs1.py

@ -236,6 +236,10 @@ def sysmo_usim_admin_auth(sim, adm1, force = False):
print " (double check ADM1 and use option -f to override)"
return False
if(len(adm1) != 8):
print " * Error: Short ADM1, a valid ADM1 is 8 digits long!"
return False
# Try to authenticate
try:
print " * Authenticating..."

Loading…
Cancel
Save