<p>herlesupreeth has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/pysim/+/17498">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">cards.py: Added parsing of all the AIDs in the UICC<br><br>Introduced a new member variable to Card class to store the AIDs present in UICC.<br>And, populated this variable (a list) upon creating a Card object/Card subclass object by<br>reading the EF 2f00 under MF 3f00.<br><br>Change-Id: I0828f411e07a01464abed7fd05486e1a56603411<br>---<br>M pySim/cards.py<br>1 file changed, 13 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/98/17498/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/pySim/cards.py b/pySim/cards.py</span><br><span>index a872ee0..da9e371 100644</span><br><span>--- a/pySim/cards.py</span><br><span>+++ b/pySim/cards.py</span><br><span>@@ -32,6 +32,19 @@</span><br><span>        def __init__(self, scc):</span><br><span>             self._scc = scc</span><br><span>              self._adm_chv_num = 4</span><br><span style="color: hsl(120, 100%, 40%);">+         self._aids = []</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+             try:</span><br><span style="color: hsl(120, 100%, 40%);">+                  # Find out how many records the EF.DIR has</span><br><span style="color: hsl(120, 100%, 40%);">+                    # and store all the AIDs in the UICC</span><br><span style="color: hsl(120, 100%, 40%);">+                  rec_cnt = self._scc.record_count(['3f00', '2f00'])</span><br><span style="color: hsl(120, 100%, 40%);">+                    for i in range(0, rec_cnt):</span><br><span style="color: hsl(120, 100%, 40%);">+                           rec = self._scc.read_record(['3f00', '2f00'], i + 1)</span><br><span style="color: hsl(120, 100%, 40%);">+                          if (rec[0][0:2], rec[0][4:6]) == ('61', '4f') and len(rec[0]) > 12 \</span><br><span style="color: hsl(120, 100%, 40%);">+                               and rec[0][8:8 + int(rec[0][6:8], 16) * 2] not in self._aids:</span><br><span style="color: hsl(120, 100%, 40%);">+                                 self._aids.append(rec[0][8:8 + int(rec[0][6:8], 16) * 2])</span><br><span style="color: hsl(120, 100%, 40%);">+             except Exception as e:</span><br><span style="color: hsl(120, 100%, 40%);">+                        pass</span><br><span> </span><br><span>     def reset(self):</span><br><span>             self._scc.reset_card()</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/pysim/+/17498">change 17498</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/pysim/+/17498"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: pysim </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I0828f411e07a01464abed7fd05486e1a56603411 </div>
<div style="display:none"> Gerrit-Change-Number: 17498 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: herlesupreeth <herlesupreeth@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>