Change in osmo-sim-auth[master]: osmo-sim-auth: support Python 3

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Wed Oct 28 17:24:50 UTC 2020


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sim-auth/+/20907 )

Change subject: osmo-sim-auth: support Python 3
......................................................................

osmo-sim-auth: support Python 3

Use byteToHex() so the same code works for Python 2 and Python 3.

Change-Id: Ib5602eb1b6406731757d39a77eb4c7103cfba846
---
M osmo-sim-auth.py
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  laforge: Looks good to me, approved; Verified
  fixeria: Looks good to me, but someone else must approve



diff --git a/osmo-sim-auth.py b/osmo-sim-auth.py
index 30cf2dc..e05c384 100755
--- a/osmo-sim-auth.py
+++ b/osmo-sim-auth.py
@@ -77,8 +77,8 @@
     ret = s.run_gsm_alg(rand_bin)
 
     if not options.ipsec:
-        print("SRES:\t%s" % b2a_hex(byteToString(ret[0])))
-        print("Kc:\t%s" % b2a_hex(byteToString(ret[1])))
+        print("SRES:\t%s" % byteToHex(ret[0]))
+        print("Kc:\t%s" % byteToHex(ret[1]))
 
     if options.ipsec:
         print("1%s at uma.mnc%s.mcc%s.3gppnetwork.org,%s,%s,%s" % (imsi, imsi[3:6], imsi[0:3], b2a_hex(byteToString(rand_bin)), b2a_hex(byteToString(ret[0])), b2a_hex(byteToString(ret[1]))))

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-sim-auth/+/20907
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sim-auth
Gerrit-Branch: master
Gerrit-Change-Id: Ib5602eb1b6406731757d39a77eb4c7103cfba846
Gerrit-Change-Number: 20907
Gerrit-PatchSet: 2
Gerrit-Owner: rousseau <ludovic.rousseau+osmocom at free.fr>
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201028/9f52011b/attachment.htm>


More information about the gerrit-log mailing list