-
-
Notifications
You must be signed in to change notification settings - Fork 18
ScriptingAndAPDUExchange
There are a couple of SEND and SEND_RAW commands to transfer APDU-style sequences of bytes to the device documented in the chameleon commands. The usage available in the app is summarized as follows:
This subtab enables users to grok, or otherwise lookup in realtime, particular APDU command combinations from a detailed, multi-device-spec dictionary compiled from within the app source.
This feature is a work in progress (under construction). In principle, the idea is to run a short shell-like script with a list of in-order commands recognized by the Chameleon device terminal, or otherwise encode notation for directly transferring a sequence of bitwise APDU commands to the device. A complete spec of what should eventually work to script operations on/with a live Chameleon device is given in the points in this overview. The script parser / lever will be done with ANTLR4 (in Java) as an imported Android library. This is a very powerful and robust way to provide support for otherwise complicated grammars.
A sketch to the application intended functionality is seen below:
I am back working actively on the CMLD project and on the work-in-progress scripting functionality. Demonstrations of the syntax that is supported by the built-in script parsers are found in this sample directory. For example, the following script shows supported functionality:
$cmdOutput = $$("CONFIG=MF_DESFIRE")
Printf("CMD-RESP(%03d) [%s] ... \n", $cmdOutput->respCode, $cmdOutput->respText)
$cmdOutput = $$("CONFIG?")
Printf("CmdName=%s (%d) [%s] -> %s %s / %s\n",
$cmdOutput->cmdName, $cmdOutput->respCode, $cmdOutput->respText,
$cmdOutput->data, $cmdOutput->isError ? "XX" : "OK",
$cmdOutput->isTimeout ? "TMT" : "NO-TMT")
myBkptLabel:
$tagUID = $$("UID?")
$tagUID = Replace($tagUID, "..(?!$)", "$0" + ":")
Print("Tag UID = ", $tagUID)
Exit(0)Please 🌟star🌟 the project and/or rate the application on Play Store. Any new bugs or feature requests can be issued on the issues thread for the project. If you use the application on a regualar basis or find it useful please consider doing what you can to donate hardware to the project, or support the developer.