mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 05:13:46 -07:00
chg: removed some warnings in ubuntu17.04
This commit is contained in:
parent
dc202ee498
commit
26f786bfe4
3 changed files with 133 additions and 131 deletions
|
@ -205,7 +205,7 @@ int CmdHF14BCmdRaw (const char *Cmd) {
|
||||||
if (!power)
|
if (!power)
|
||||||
flags |= ISO14B_DISCONNECT;
|
flags |= ISO14B_DISCONNECT;
|
||||||
|
|
||||||
if (datalen>0)
|
if (datalen > 0)
|
||||||
flags |= ISO14B_RAW;
|
flags |= ISO14B_RAW;
|
||||||
|
|
||||||
// Max buffer is USB_CMD_DATA_SIZE
|
// Max buffer is USB_CMD_DATA_SIZE
|
||||||
|
|
|
@ -222,7 +222,7 @@ int CmdLegicInfo(const char *Cmd) {
|
||||||
dcf = ((int)data[6] << 8) | (int)data[5];
|
dcf = ((int)data[6] << 8) | (int)data[5];
|
||||||
|
|
||||||
// New unwritten media?
|
// New unwritten media?
|
||||||
if(dcf == 0xFFFF) {
|
if (dcf == 0xFFFF) {
|
||||||
|
|
||||||
PrintAndLog("DCF: %d (%02x %02x), Token Type=NM (New Media)",
|
PrintAndLog("DCF: %d (%02x %02x), Token Type=NM (New Media)",
|
||||||
dcf,
|
dcf,
|
||||||
|
@ -234,7 +234,7 @@ int CmdLegicInfo(const char *Cmd) {
|
||||||
|
|
||||||
int fl = 0;
|
int fl = 0;
|
||||||
|
|
||||||
if(data[6] == 0xec) {
|
if (data[6] == 0xec) {
|
||||||
strncpy(token_type, "XAM", sizeof(token_type));
|
strncpy(token_type, "XAM", sizeof(token_type));
|
||||||
fl = 1;
|
fl = 1;
|
||||||
stamp_len = 0x0c - (data[5] >> 4);
|
stamp_len = 0x0c - (data[5] >> 4);
|
||||||
|
@ -269,7 +269,7 @@ int CmdLegicInfo(const char *Cmd) {
|
||||||
|
|
||||||
} else { // Is IM(-S) type of card...
|
} else { // Is IM(-S) type of card...
|
||||||
|
|
||||||
if(data[7] == 0x9F && data[8] == 0xFF) {
|
if (data[7] == 0x9F && data[8] == 0xFF) {
|
||||||
bIsSegmented = 1;
|
bIsSegmented = 1;
|
||||||
strncpy(token_type, "IM-S", sizeof(token_type));
|
strncpy(token_type, "IM-S", sizeof(token_type));
|
||||||
} else {
|
} else {
|
||||||
|
@ -286,9 +286,9 @@ int CmdLegicInfo(const char *Cmd) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Makes no sence to show this on blank media...
|
// Makes no sence to show this on blank media...
|
||||||
if(dcf != 0xFFFF) {
|
if (dcf != 0xFFFF) {
|
||||||
|
|
||||||
if(bIsSegmented) {
|
if (bIsSegmented) {
|
||||||
PrintAndLog("WRP=%02u, WRC=%01u, RD=%01u, SSC=%02x",
|
PrintAndLog("WRP=%02u, WRC=%01u, RD=%01u, SSC=%02x",
|
||||||
data[7] & 0x0f,
|
data[7] & 0x0f,
|
||||||
(data[7] & 0x70) >> 4,
|
(data[7] & 0x70) >> 4,
|
||||||
|
@ -298,8 +298,8 @@ int CmdLegicInfo(const char *Cmd) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Header area is only available on IM-S cards, on master tokens this data is the master token data itself
|
// Header area is only available on IM-S cards, on master tokens this data is the master token data itself
|
||||||
if(bIsSegmented || dcf > 60000) {
|
if (bIsSegmented || dcf > 60000) {
|
||||||
if(dcf > 60000) {
|
if (dcf > 60000) {
|
||||||
PrintAndLog("Master token data");
|
PrintAndLog("Master token data");
|
||||||
PrintAndLog("%s", sprint_hex(data+8, 14));
|
PrintAndLog("%s", sprint_hex(data+8, 14));
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -95,8 +95,10 @@ int GetWiegandFromPresco(const char *Cmd, uint32_t *sitecode, uint32_t *usercode
|
||||||
for (int index =0; index < strlen(id); ++index) {
|
for (int index =0; index < strlen(id); ++index) {
|
||||||
|
|
||||||
// Get value from number string.
|
// Get value from number string.
|
||||||
if ( id[index] == '*' ) val = 10;
|
if ( id[index] == '*' )
|
||||||
if ( id[index] == '#') val = 11;
|
val = 10;
|
||||||
|
if ( id[index] == '#')
|
||||||
|
val = 11;
|
||||||
if ( id[index] >= 0x30 && id[index] <= 0x39 )
|
if ( id[index] >= 0x30 && id[index] <= 0x39 )
|
||||||
val = id[index] - 0x30;
|
val = id[index] - 0x30;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue