<span class="Apple-style-span" style="background-color: rgb(255, 255, 255);">Well,</span><div><span class="Apple-style-span" style="background-color: rgb(255, 255, 255);"><br></span></div><div><span class="Apple-style-span" style="background-color: rgb(255, 255, 255);">     If you know Erlang, C and C++, python you<span class="hps" style="font-family: arial, sans-serif; "> will learn</span><span class="Apple-style-span" style="font-family: arial, sans-serif; "> </span><span class="hps" style="font-family: arial, sans-serif; ">Python</span><span class="Apple-style-span" style="font-family: arial, sans-serif; "> </span><span class="hps" style="font-family: arial, sans-serif; ">fast!</span></span></div>
<span class="Apple-style-span" style="background-color: rgb(255, 255, 255);"><span class="hps" style="font-family: arial, sans-serif; ">     And</span><span class="Apple-style-span" style="font-family: arial, sans-serif; "> </span><span class="hps" style="font-family: arial, sans-serif; ">the advantage is that</span><span class="Apple-style-span" style="font-family: arial, sans-serif; "> </span><span class="hps" style="font-family: arial, sans-serif; ">Python</span><span class="Apple-style-span" style="font-family: arial, sans-serif; "> </span><span class="hps" style="font-family: arial, sans-serif; ">has</span><span class="Apple-style-span" style="font-family: arial, sans-serif; "> </span><span class="hps" style="font-family: arial, sans-serif; ">some projects</span><span class="Apple-style-span" style="font-family: arial, sans-serif; "> </span><span class="hps" style="font-family: arial, sans-serif; ">in which they can</span><span class="Apple-style-span" style="font-family: arial, sans-serif; "> </span><span class="hps" style="font-family: arial, sans-serif; ">be leveraged</span><span class="" style="font-family: arial, sans-serif; ">, for example</span><span class="" style="font-family: arial, sans-serif; ">:</span></span><div>
<br></div><div><a href="http://pyscard.sourceforge.net/">http://pyscard.sourceforge.net/</a></div><div><a href="http://michau.benoit.free.fr/codes/smartcard/card/">http://michau.benoit.free.fr/codes/smartcard/card/</a></div>
<div><br></div><div><br></div><div><span class="Apple-style-span" style="background-color: rgb(255, 255, 255);">   <span class="hps" style="color: rgb(51, 51, 51); font-family: arial, sans-serif; ">Recalling also that</span><span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: arial, sans-serif; "> </span><span class="hps" style="color: rgb(51, 51, 51); font-family: arial, sans-serif; ">wrappers</span><span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: arial, sans-serif; "> between </span></span><span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: arial, sans-serif; background-color: rgb(255, 255, 255); ">Python</span><span class="Apple-style-span" style="background-color: rgb(255, 255, 255);"><span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: arial, sans-serif; "> and </span><span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: arial, sans-serif; "> Erlang </span></span><span class="hps" style="background-color: rgb(255, 255, 255); color: rgb(51, 51, 51); font-family: arial, sans-serif; ">or C</span><span class="Apple-style-span" style="background-color: rgb(255, 255, 255); color: rgb(51, 51, 51); font-family: arial, sans-serif; "> </span><span class="hps" style="background-color: rgb(255, 255, 255); color: rgb(51, 51, 51); font-family: arial, sans-serif; ">are relatively</span><span class="Apple-style-span" style="background-color: rgb(255, 255, 255); color: rgb(51, 51, 51); font-family: arial, sans-serif; "> </span><span class="hps" style="background-color: rgb(255, 255, 255); color: rgb(51, 51, 51); font-family: arial, sans-serif; ">simple...</span></div>
<div><font class="Apple-style-span" color="#333333" face="arial, sans-serif"><br></font></div><div><font class="Apple-style-span" color="#333333" face="arial, sans-serif">[]s</font></div><div><font class="Apple-style-span" color="#333333" face="arial, sans-serif"><br>
</font></div><div><font class="Apple-style-span" color="#333333" face="arial, sans-serif">./alberto -fabiano -vvv</font></div><div><br><div class="gmail_quote">On Sat, Nov 26, 2011 at 16:12, Harald Welte <span dir="ltr"><<a href="mailto:laforge@gnumonks.org">laforge@gnumonks.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi all,<br>
<br>
I'm thinking of starting a project that would allow us to<br>
 * perform SIM and USIM card pre-personalization<br>
 * read/dump and explore [U]SIM contents interactively<br>
 * perform SIM card simulation<br>
<br>
The idea is to start with some generic data structure that can represent<br>
the filesystem tree (DFs, EFs) and their "external" properties, i.e.<br>
file type, size, permissions, FID, SFID, etc.<br>
<br>
This data structure could also have the actual file content associated<br>
with each EF.<br>
<br>
The second step would be some code that can take that data structure and<br>
program a freely-programmable card (like sysmoSIM-GR1) and create the<br>
files according to that structure.<br>
<br>
Another module would implement card-simulation (via BT SAP, SIMtrace or<br>
virtual PC/SC card).  After all, only a few instructions have to be<br>
imilpemented if the filesystem and its content is already in a generic<br>
data structure that the program can access..<br>
<br>
Next step would be to associate parser and generator routines for the<br>
content of each individual file as it is  specified in TS 11.11.<br>
<br>
After that has been done, we could think of representing the FS tree and<br>
the parsed contents of each file in some kind of graphical / user<br>
friendly representation.  The idea here is that the UI code would be<br>
generic and not know any of the actual ecnoding/decoding of the EF<br>
content.<br>
<br>
The biggest question is what language to use for this.  Some kind of<br>
object orientation might very well resemble the idea of a 'file object'<br>
in a tree, with many different file types, each having it's own<br>
parser/encoder.<br>
<br>
On the other hand, Erlang's bit field syntax would probably come very<br>
handy in terms of encoding/decoding the various EF content.  However, at<br>
least once we start to want some kidn of UI, Erlan really sucsk.  Also,<br>
almost nobody here reads/writes Erlang [yet?].<br>
<br>
Writing all this in C seems like a bit much of an effort, probably even<br>
more so on the UI side.  However, we already have quite a bit of C code<br>
for parsing/generating things like LAI, etc. which are stored like 04.08<br>
inside the sim card files.<br>
<br>
Python might be a good idea in terms of tons of available<br>
libraries/modules, object orientation and good UI bindings.  The biggest<br>
problem here is that my python skills are really limited so far, so my<br>
productivity might not be as high as I expect.<br>
<br>
The individual components could even be written in different<br>
languages, but then we would have to have some common format for<br>
exchanging data back and forth - which might not be worth it, given the<br>
small scope of the project.<br>
<br>
any ideas / comments / feedback?<br>
<font color="#888888"><br>
--<br>
- Harald Welte <<a href="mailto:laforge@gnumonks.org">laforge@gnumonks.org</a>>           <a href="http://laforge.gnumonks.org/" target="_blank">http://laforge.gnumonks.org/</a><br>
============================================================================<br>
"Privacy in residential applications is a desirable marketing option."<br>
                                                  (ETSI EN 300 175-7 Ch. A6)<br>
<br>
</font></blockquote></div><br><br clear="all"><div><br></div>-- <br><div style="font-family:arial"><font color="#333333"><span style="color:rgb(32, 32, 32);font-family:'Droid Sans', arial, sans-serif;font-size:13px;background-color:rgb(255, 255, 255)"><div>
~[&]s;</div><div><br></div><div>HH /* Happy Hackings! */</div><div><br></div></span></font></div><div style="font-family:arial"><font color="#333333">AL. /* @AlbertoFabiano */</font></div><div><br></div><div>- .... .  -... . ... -  .-- .- -.--  - ---  .--. .-. . -.. .. -.-. -  - .... .  ..-. ..- - ..- .-. .  .. ...  - ---  .. -. ...- . -. -  .. -     .- .-.. .- -.  -.- .- -.--</div>
<span style="font-size:13px;border-collapse:collapse"><div><span style="font-size:small;border-collapse:separate"><div><div style="font-family:arial"><font color="#333333"><br></font></div><div><div><font face="'courier new', monospace" color="#333333"><span style="font-family:'courier new', monospace;background-color:rgb(255, 255, 255)">k'bɪt Y> "The best way to predict the future is to invent it." --Alan Kay </span><span style="background-color:rgb(255, 255, 255)"><div>
<div style="font-family:arial, sans-serif"><font face="'courier new', monospace">k'bɪt X> "Chance favors the prepared mind."   --Louis Pasteur  </font></div></div></span></font></div></div></div></span></div>
</span><span style="color:rgb(51, 51, 51);font-family:'courier new', monospace;background-color:rgb(255, 255, 255)">k'bɪt Z> "The world is full of fascinating problems waiting to be solved" --Eric S.Raymond</span><div>
<font color="#333333" face="'courier new', monospace"><br></font><span style="font-size:13px;border-collapse:collapse"><div><span style="font-size:small;border-collapse:separate"><div>/*  0x42 0x69 0x74 0x20 0x46 0x61 0x6e  */</div>
<div><br></div></span></div></span></div><br>
</div>