mirror of
https://github.com/srlabs/blue-merle.git
synced 2025-01-03 03:20:52 -05:00
python: only get the IMSI when in deterministic mode
We don't need the IMSI otherwise so let's not spend the time obtaining it.
This commit is contained in:
parent
4a16277ac2
commit
53bf156fd0
@ -180,10 +180,12 @@ def validate_imei(imei):
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
args = ap.parse_args()
|
args = ap.parse_args()
|
||||||
|
imsi_d = None
|
||||||
if args.verbose:
|
if args.verbose:
|
||||||
verbose = args.verbose
|
verbose = args.verbose
|
||||||
if args.deterministic:
|
if args.deterministic:
|
||||||
mode = Modes.DETERMINISTIC
|
mode = Modes.DETERMINISTIC
|
||||||
|
imsi_d = get_imsi()
|
||||||
if args.random:
|
if args.random:
|
||||||
mode = Modes.RANDOM
|
mode = Modes.RANDOM
|
||||||
if args.static is not None:
|
if args.static is not None:
|
||||||
@ -196,7 +198,6 @@ if __name__ == '__main__':
|
|||||||
else:
|
else:
|
||||||
exit(-1)
|
exit(-1)
|
||||||
else:
|
else:
|
||||||
imsi_d = get_imsi()
|
|
||||||
imei = generate_imei(imei_prefix, imsi_d)
|
imei = generate_imei(imei_prefix, imsi_d)
|
||||||
if (verbose):
|
if (verbose):
|
||||||
print(f"Generated new IMEI: {imei}")
|
print(f"Generated new IMEI: {imei}")
|
||||||
|
Loading…
Reference in New Issue
Block a user