Esempio n. 1
0
##############################################################################################################
##############################################################################################################
##############################################################################################################
#(CommandStrings=,preProcess=None,process=None,argChecker=None,postProcess=None,showInHelp=True):

try:
    Executer
except NameError:
    print "  No variable Executer found, this is an addon, it can't be executed alone"
    exit()
            
t = tokenValueArgChecker({"off":ProxnrollAPDUBuilder.colorOFF,"on":ProxnrollAPDUBuilder.colorON,"auto":ProxnrollAPDUBuilder.colorAUTO,"slow":ProxnrollAPDUBuilder.colorSLOW,"quick":ProxnrollAPDUBuilder.colorQUICK,"beat":ProxnrollAPDUBuilder.colorBEAT})
i0to60000 = IntegerArgChecker(0,60000)


Executer.addCommand(CommandStrings=["proxnroll","setlight"],                               preProcess=ProxnrollAPDUBuilder.setLedColorFun,process=executeAPDU,argChecker=DefaultArgsChecker([("red",t),("green",t),("yellow_blue",t)],2))
Executer.addCommand(CommandStrings=["proxnroll","setbuzzer"],                              preProcess=ProxnrollAPDUBuilder.setBuzzerDuration,process=executeAPDU,                                  argChecker=DefaultArgsChecker([("duration",i0to60000)],0))
Executer.addCommand(CommandStrings=["proxnroll","calypso","setspeed","9600"],              preProcess=ProxnrollAPDUBuilder.configureCalypsoSamSetSpeed9600,process=executeAPDU)
Executer.addCommand(CommandStrings=["proxnroll","calypso","setspeed","115200"],            preProcess=ProxnrollAPDUBuilder.configureCalypsoSamSetSpeed115200,process=executeAPDU)
Executer.addCommand(CommandStrings=["proxnroll","calypso","enabledigestupdate"],           preProcess=ProxnrollAPDUBuilder.configureCalypsoSamEnableInternalDigestUpdate,process=executeAPDU)
Executer.addCommand(CommandStrings=["proxnroll","calypso","disabledigestupdate"],          preProcess=ProxnrollAPDUBuilder.configureCalypsoSamDisableInternalDigestUpdate,process=executeAPDU)
                
Executer.addCommand(CommandStrings=["proxnroll","vendor"],                   preProcess=ProxnrollAPDUBuilder.getDataVendorName,process=executeAPDU                                   ,postProcess=resultHandlerAPDUAndConvertDataToString)
Executer.addCommand(CommandStrings=["proxnroll","product","name"],           preProcess=ProxnrollAPDUBuilder.getDataProductName,process=executeAPDU                                  ,postProcess=resultHandlerAPDUAndConvertDataToString)
Executer.addCommand(CommandStrings=["proxnroll","product","serialString"],   preProcess=ProxnrollAPDUBuilder.getDataProductSerialNumber,process=executeAPDU                          ,postProcess=resultHandlerAPDUAndConvertDataToString)
Executer.addCommand(CommandStrings=["proxnroll","product","usbidentifiel"],  preProcess=ProxnrollAPDUBuilder.getDataProductUSBIdentifier,process=executeAPDU                         ,postProcess=resultHandlerAPDUAndConvertDataToString)
Executer.addCommand(CommandStrings=["proxnroll","product","version"],        preProcess=ProxnrollAPDUBuilder.getDataProductVersion,process=executeAPDU                               ,postProcess=resultHandlerAPDUAndConvertDataToString)
Executer.addCommand(CommandStrings=["proxnroll","product","serial"],         preProcess=ProxnrollAPDUBuilder.getDataProductSerialNumber,process=executeAPDU   ,postProcess=resultHandlerAPDUAndPrintData)

Executer.addCommand(CommandStrings=["proxnroll","card","serial"],            preProcess=ProxnrollAPDUBuilder.getDataCardSerialNumber,process=executeAPDU                             ,postProcess=resultHandlerAPDUAndPrintData)
Executer.addCommand(CommandStrings=["proxnroll","card","ats"],               preProcess=ProxnrollAPDUBuilder.getDataCardATS,process=executeAPDU               ,postProcess=resultHandlerAPDUAndPrintData)
Esempio n. 2
0
    def iso15693Lock():
        pass #TODO
        
    def iso15693GetSecurityStatus():
        pass #TODO
        
    def iso15693ReadBinary():
        pass #TODO
        
    def iso15693UpdateBinary():
        pass #TODO
        
    def iso15693UpdateSingleByte():
        pass #TODO
        
    
    
try:
    Executer
except NameError:
    print "  No variable Executer found, this is an addon, it can't be executed alone"
    exit()
        
               
Executer.addCommand(CommandStrings=["omnikey","card","serial"],preProcess=omnikeyAPDUBuilder.getDataCardSerialNumber,       process=executeAPDU,postProcess=resultHandlerAPDUAndPrintData)
#Executer.addCommand(CommandStrings=["proxnroll","read"],       preProcess=omnikeyAPDUBuilder.readBinary,process=executeAPDU,argChecker=DefaultArgsChecker([("address",i)],0),postProcess=resultHandlerAPDUAndPrintData)
Executer.addCommand(CommandStrings=["omnikey","apdu"],         process=omnikeyExecute,argChecker=AllTheSameChecker(hexaArgChecker(),"args"),postProcess=printResultHandler)



Esempio n. 3
0
        pass  #TODO

    def iso15693GetSecurityStatus():
        pass  #TODO

    def iso15693ReadBinary():
        pass  #TODO

    def iso15693UpdateBinary():
        pass  #TODO

    def iso15693UpdateSingleByte():
        pass  #TODO


try:
    Executer
except NameError:
    print "  No variable Executer found, this is an addon, it can't be executed alone"
    exit()

Executer.addCommand(CommandStrings=["omnikey", "card", "serial"],
                    preProcess=omnikeyAPDUBuilder.getDataCardSerialNumber,
                    process=executeAPDU,
                    postProcess=resultHandlerAPDUAndPrintData)
#Executer.addCommand(CommandStrings=["proxnroll","read"],       preProcess=omnikeyAPDUBuilder.readBinary,process=executeAPDU,argChecker=DefaultArgsChecker([("address",i)],0),postProcess=resultHandlerAPDUAndPrintData)
Executer.addCommand(CommandStrings=["omnikey", "apdu"],
                    process=omnikeyExecute,
                    argChecker=AllTheSameChecker(hexaArgChecker(), "args"),
                    postProcess=printResultHandler)