mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
added tesla info command, with some of the data that is available. Needed to fix the apdu chaining and a sneaky bug in get_sw since the apdu response was larger then 256
This commit is contained in:
parent
e1902ffa96
commit
f9a65505de
9 changed files with 281 additions and 16 deletions
|
@ -262,10 +262,10 @@ uint32_t rotr(uint32_t a, uint8_t n) {
|
|||
return (a >> n) | (a << (32 - n));
|
||||
}
|
||||
|
||||
uint16_t get_sw(const uint8_t *d, uint8_t n) {
|
||||
uint16_t get_sw(const uint8_t *d, uint16_t n) {
|
||||
if (n < 2)
|
||||
return 0;
|
||||
|
||||
n -= 2;
|
||||
return d[n] * 0x0100 + d[n + 1];
|
||||
return (d[n] << 8 | d[n + 1]);
|
||||
}
|
||||
|
|
|
@ -85,5 +85,5 @@ void htole24(uint32_t val, uint8_t data[3]);
|
|||
uint32_t rotl(uint32_t a, uint8_t n);
|
||||
uint32_t rotr(uint32_t a, uint8_t n);
|
||||
|
||||
uint16_t get_sw(const uint8_t *d, uint8_t n);
|
||||
uint16_t get_sw(const uint8_t *d, uint16_t n);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue