Changeset 9827
- Timestamp:
- 08/12/14 23:39:40 (9 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
oscam-ecm.c (modified) (3 diffs)
-
reader-viaccess.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/oscam-ecm.c
r9825 r9827 1686 1686 if(cw[i + 3] != c) 1687 1687 { 1688 bool nano = false;1689 if(er->caid == 0x100 && er->ecm[5] > 0x00) {1690 cs_debug_mask(D_TRACE,"NANO%02d: this cw needs additional decryption!", er->ecm[5]);1691 nano = true;1688 unsigned char nano = 0x00; 1689 if(er->caid == 0x100 && er->ecm[5] > 0x00) 1690 { 1691 nano = er->ecm[5]; // seca nano protection 1692 1692 } 1693 if(reader->dropbadcws && !nano) 1693 if(er->caid == 0x500) 1694 { 1695 //search for nano E0 1696 int16_t s; 1697 for (s = 0; s < er->ecmlen-3 && (er->ecm[s] != 0xE0 && er->ecm[s+1] != 0x02 && er->ecm[s+2] != 0x00 && er->ecm[s+3] != 0x02) ; s++) 1698 { 1699 nano = er->ecm[s]; // viaccess nano protection 1700 } 1701 } 1702 1703 if(reader->dropbadcws && !nano) // only drop controlword if no cw encryption is applied 1694 1704 { 1695 1705 rc = E_NOTFOUND; … … 1699 1709 else 1700 1710 { 1701 if(!nano) 1711 if(!nano) // only fix checksum if no cw encryption is applied 1702 1712 { 1703 1713 cs_debug_mask(D_TRACE, "notice: changed dcw checksum byte cw[%i] from %02x to %02x", i + 3, cw[i + 3], c); … … 1706 1716 else 1707 1717 { 1708 cs_debug_mask(D_TRACE,"NANO%02d: not fixing the crc of this cw since its still encrypted!", er->ecm[5]);1718 cs_debug_mask(D_TRACE,"NANO%02d: not fixing the crc of this cw since its still encrypted!", nano); 1709 1719 } 1710 1720 } -
trunk/reader-viaccess.c
r9652 r9827 939 939 940 940 nextEcm = ecm88Data; 941 942 //looking for nano E0943 while (ecm88Len)944 {945 // 80 33 nano 80 (ecm) + len (33)946 if(ecm88Data[0]==0x80) { // nano 80, give ecm len947 curEcm88len=ecm88Data[1];948 nextEcm=ecm88Data+curEcm88len+2;949 ecm88Data += 2;950 ecm88Len -= 2;951 952 if (ecm88Data[0]==0x90 && ecm88Data[1]==0x07)953 {954 curnumber_ecm =(ecm88Data[6]<<8) | (ecm88Data[7]);955 //if number_ecm & nano E0 ecm not suported956 if ((ecm88Data[9] == 0xE0) && (ecm88Data[10] == 0x02))957 {958 cs_log("[viaccess-reader] ECM: Invalid ECM nano E0 Rejecting");959 return ERROR;960 }961 }962 ecm88Data=nextEcm;963 ecm88Len-=curEcm88len;964 continue; //loop to next ecm965 } else ecm88Len = 0; //exit while966 }967 968 //reset to beginning of ECM969 ecm88Data=&ecmData[0]; //XXX what is the 4th byte for ??970 ecm88Len=SCT_LEN(er->ecm)-4;971 curEcm88len=0;972 nextEcm=ecm88Data;973 974 941 975 942 while(ecm88Len > 0 && !rc) … … 1120 1087 ecm88Data += 6; 1121 1088 } 1122 // 1089 1090 // E0 1091 if(ecm88Data[0] == 0xE0 && ecm88Data[1] == 0x02 && ecm88Data[2] == 0x00 && ecm88Data[3] == 0x02) 1092 { 1093 cs_log("[viaccess-reader] ECM: This ECM is using nano E0 -> skip since preprocessing / postprocessing is unknown!"); 1094 ecm88Data = nextEcm; 1095 ecm88Len -= curEcm88len; 1096 continue; 1097 } 1098 1123 1099 1124 1100 if(csystem_data->last_geo.provid != provid) … … 1245 1221 ecm88Data = nextEcm; 1246 1222 ecm88Len -= curEcm88len; 1247 rdr_debug_mask(reader, D_READER, "E CM: key to use is not the current one, trying next ECM");1223 rdr_debug_mask(reader, D_READER, "Error: card respondend %02X %02X, trying next ECM", cta_res[0], cta_res[1]); 1248 1224 snprintf(ea->msglog, MSGLOGSIZE, "key to use is not the current one, trying next ECM"); 1249 1225 }
Note:
See TracChangeset
for help on using the changeset viewer.
