blob: 0961d173ac363fceb8c79340e6b4e3443b0fc931 [file] [log] [blame]
Harald Welte94e87352021-04-02 13:38:00 +02001Legacy tools
2============
Harald Welte9ae33c82021-04-04 15:49:06 +02003
4*legacy tools* are the classic ``pySim-prog`` and ``pySim-read`` programs that
5existed long before ``pySim-shell``.
6
Harald Welte9e241432022-02-15 15:38:19 +01007These days, you should primarily use ``pySim-shell`` instead of these
8legacy tools.
9
Harald Welte9ae33c82021-04-04 15:49:06 +020010pySim-prog
11----------
12
13``pySim-prog`` was the first part of the pySim software suite. It started as
14a tool to write ICCID, IMSI, MSISDN and Ki to very simplistic SIM cards, and
15was later extended to a variety of other cards. As the number of features supported
16became no longer bearable to express with command-line arguments, `pySim-shell` was
17created.
18
19Basic use cases can still use `pySim-prog`.
20
21Program customizable SIMs
22~~~~~~~~~~~~~~~~~~~~~~~~~
23Two modes are possible:
24
25 - one where you specify every parameter manually :
26
27``./pySim-prog.py -n 26C3 -c 49 -x 262 -y 42 -i <IMSI> -s <ICCID>``
28
29
30 - one where they are generated from some minimal set :
31
32``./pySim-prog.py -n 26C3 -c 49 -x 262 -y 42 -z <random_string_of_choice> -j <card_num>``
33
34 With <random_string_of_choice> and <card_num>, the soft will generate
35 'predictable' IMSI and ICCID, so make sure you choose them so as not to
36 conflict with anyone. (for eg. your name as <random_string_of_choice> and
37 0 1 2 ... for <card num>).
38
39 You also need to enter some parameters to select the device :
40 -t TYPE : type of card (supersim, magicsim, fakemagicsim or try 'auto')
41 -d DEV : Serial port device (default /dev/ttyUSB0)
42 -b BAUD : Baudrate (default 9600)
43
44
45pySim-read
46----------
47
48``pySim-read`` allows you to read some data from a SIM card. It will only some files
49of the card, and will only read files accessible to a normal user (without any special authentication)
50
Harald Welte9e241432022-02-15 15:38:19 +010051These days, you should use the ``export`` command of ``pySim-shell``
52instead. It performs a much more comprehensive export of all of the
53[standard] files that can be found on the card. To get a human-readable
54decode instead of the raw hex export, you can use ``export --json``.
55
Harald Welte9ae33c82021-04-04 15:49:06 +020056Specifically, pySim-read will dump the following:
57
58* MF
59
60 * EF.ICCID
61
62* DF.GSM
63
64 * EF,IMSI
65 * EF.GID1
66 * EF.GID2
67 * EF.SMSP
68 * EF.SPN
69 * EF.PLMNsel
70 * EF.PLMNwAcT
71 * EF.OPLMNwAcT
72 * EF.HPLMNAcT
73 * EF.ACC
74 * EF.MSISDN
75 * EF.AD
76 * EF.SST
77
78* ADF.USIM
79
80 * EF.EHPLMN
81 * EF.UST
82 * EF.ePDGId
83 * EF.ePDGSelection
84
85* ADF.ISIM
86
87 * EF.PCSCF
88 * EF.DOMAIN
89 * EF.IMPI
90 * EF.IMPU
91 * EF.UICCIARI
92 * EF.IST
93
94
Harald Welte8fe1d202021-04-11 12:31:40 +020095pySim-read usage
96~~~~~~~~~~~~~~~~
Harald Welte9ae33c82021-04-04 15:49:06 +020097
Harald Welte8fe1d202021-04-11 12:31:40 +020098.. argparse::
99 :module: pySim-read
100 :func: option_parser
Harald Weltef422eb12023-06-09 11:15:09 +0200101 :prog: pySim-read.py