Updated tnp3.lua

added some possibilities to abort the "hf mf nested" command
added a rudimentary items identification for tnp3xxx
This commit is contained in:
iceman1001 2014-11-09 17:22:04 +01:00
commit 22f1c57786
6 changed files with 195 additions and 33 deletions

View file

@ -26,8 +26,6 @@ int compar_int(const void * a, const void * b) {
else return -1;
}
// Compare 16 Bits out of cryptostate
int Compare16Bits(const void * a, const void * b) {
if ((*(uint64_t*)b & 0x00ff000000ff0000) == (*(uint64_t*)a & 0x00ff000000ff0000)) return 0;
@ -35,7 +33,6 @@ int Compare16Bits(const void * a, const void * b) {
else return -1;
}
typedef
struct {
union {
@ -70,15 +67,11 @@ void* nested_worker_thread(void *arg)
return statelist->head.slhead;
}
int mfnested(uint8_t blockNo, uint8_t keyType, uint8_t * key, uint8_t trgBlockNo, uint8_t trgKeyType, uint8_t * resultKey, bool calibrate)
{
uint16_t i, len;
uint32_t uid;
UsbCommand resp;
StateList_t statelists[2];
struct Crypto1State *p1, *p2, *p3, *p4;