⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 script_example.py

📁 一个免费的SMART CARD OS系统。
💻 PY
字号:
### <Init>import sys, ossys.path.append( os.path.join( "..", "..", "..", "inkit", "jayapy" ) )sys.path.append( os.path.join( "..", "..", "..", "inkit", "spy" ) )from script_player import *def s( *params, **kwparams ):	apply( sp.send, params, kwparams )### </Init>### <Script>def run(sp):	sp.powerOn()	### Script players accepts many type of commands:	# just send the command, do not care about the response	sp.send("0084000008" ) 	# check only the Status Word of the response, ignore the data	sp.send("0084000008", "9000" ) 	# check both data and status word. Here, we check that there is no data	sp.send("0084000007", "", "6700" ) 	# many format are accepted for the command/responses	sp.send("00 84 00 00 08", "9000" ) 	sp.send( [ 0x00, 0x84, 0x00, 0x00, 0x08 ], (0x90, 00) ) 	# we can use short cut functions	s( "0084000008", dataLen=8, sw="9000" ) 	### This is copy paste form test01	sp.send("0084000008", dataLen=8, sw="9000" )	sp.send("0084000007","6700")	sp.send("8086000008","9000", dataLen=8)	sp.send("8086000011","9000", dataLen=0x11)	sp.send("8086000010","9000", dataLen=0x10)	### This is copy/pasted from test02	sp.send("0084000008", dataLen=8, sw="9000" )	sp.send("0084000007", dataLen=0, sw="6700" )	# Bug 743793 	# http://sourceforge.net/tracker/index.php?func=detail&aid=743793&group_id=13983&atid=113983	sp.send("0084000008", dataLen=8, sw="9000" )	sp.send("0084000008", dataLen=8, sw="9000" )	sp.powerOff()	# some special commands allow to put back the simulator into init or perso	# phase, or to force a eeprom generation.	print "Reset to init..."	sp.extra( "UNLOCKBLOCKED" )	sp.extra( "UNLOCKPERSO" )	sp.extra( "UNLOCKINIT" )	sp.extra( "SAVE_EEPROM 66" )	# A lot of higher level commands are defined in script_player and easy_cmd	# check those files in inkit/jayapy### </Script>### <Main>if __name__ == "__main__":	global sp	jlog_disable_component( "ContactlessBinder" )	jlog_disable_component( "SimuReader" )	jlog_disable_component( "Rd T=CL" )	jlog_disable_component( "Apdu" )	sp = ScriptPlayer(None, 1)	run(sp)### </Main>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -