Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
osmo-sim-auth
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Bjoern Riemer
osmo-sim-auth
Commits
4807dd9b
Commit
4807dd9b
authored
12 years ago
by
Harald Welte
Browse files
Options
Downloads
Patches
Plain Diff
add 'ipsec triplets.dat' mode (-I) to osmo-sim-auth.py
parent
c1cd027c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
osmo-sim-auth.py
+13
-4
13 additions, 4 deletions
osmo-sim-auth.py
with
13 additions
and
4 deletions
osmo-sim-auth.py
+
13
−
4
View file @
4807dd9b
...
...
@@ -65,12 +65,18 @@ def handle_sim(options, rand_bin):
exit
(
1
)
imsi
=
s
.
get_imsi
()
print
"
Testing SIM card with IMSI %s
"
%
imsi
if
not
options
.
ipsec
:
print
"
Testing SIM card with IMSI %s
"
%
imsi
print
"
\n
GSM Authentication
"
print
"
\n
GSM Authentication
"
ret
=
s
.
run_gsm_alg
(
rand_bin
)
print
"
SRES:
\t
%s
"
%
b2a_hex
(
byteToString
(
ret
[
0
]))
print
"
Kc:
\t
%s
"
%
b2a_hex
(
byteToString
(
ret
[
1
]))
if
not
options
.
ipsec
:
print
"
SRES:
\t
%s
"
%
b2a_hex
(
byteToString
(
ret
[
0
]))
print
"
Kc:
\t
%s
"
%
b2a_hex
(
byteToString
(
ret
[
1
]))
if
options
.
ipsec
:
print
"
1%s@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
])))
if
__name__
==
"
__main__
"
:
...
...
@@ -85,6 +91,9 @@ if __name__ == "__main__":
parser
.
add_option
(
"
-s
"
,
"
--sim
"
,
dest
=
"
sim
"
,
help
=
"
SIM mode (default: USIM)
"
,
action
=
"
store_true
"
,
default
=
False
)
parser
.
add_option
(
"
-I
"
,
"
--ipsec
"
,
dest
=
"
ipsec
"
,
help
=
"
IPSEC mode for strongswan triplets.dat
"
,
action
=
"
store_true
"
)
(
options
,
args
)
=
parser
.
parse_args
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment