X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;ds=sidebyside;f=client%2FGoodFETSmartCard.py;fp=client%2FGoodFETSmartCard.py;h=135ad0d9f914de116a42be129e9c732dfce6bcf8;hb=5d28f76d0b8e8fa540ffb5409ba5e9408cede34a;hp=0000000000000000000000000000000000000000;hpb=31f45062572380f91438aa566fe6b83ca66c4951;p=goodfet diff --git a/client/GoodFETSmartCard.py b/client/GoodFETSmartCard.py new file mode 100755 index 0000000..135ad0d --- /dev/null +++ b/client/GoodFETSmartCard.py @@ -0,0 +1,21 @@ +#!/usr/bin/env python +# GoodFET SPI and SPIFlash Client Library +# +# (C) 2009 Travis Goodspeed +# +# This code is being rewritten and refactored. You've been warned! + +import sys, time, string, cStringIO, struct, glob, serial, os; + +from GoodFET import GoodFET; + +class GoodFETSmartCard(GoodFET): + SMARTCARDAPP=0x73; + APP=SMARTCARDAPP; + + def setup(self): + """Move the FET into the SmartCard application.""" + self.writecmd(self.APP,0x10,0,self.data); + def start(self): + """Start the connection, reat ATR.""" + self.writecmd(self.APP,0x20,0,None);