- if (!select_and_auth(KEY, MAC, div_key, (keyType==0x18), elite, verbose))
- return 0;
+ if (auth) {
+ if (!select_and_auth(KEY, MAC, div_key, (keyType==0x18), elite, rawkey, verbose))
+ return 0;
+ } else {
+ uint8_t CSN[8]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
+ uint8_t CCNR[12]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
+ if (!select_only(CSN, CCNR, (keyType==0x18), verbose))
+ return 0;
+ }