Changeset 11500
- Timestamp:
- 02/14/19 17:05:30 (5 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/README.dvbapi_protocol
r10653 r11500 128 128 *** The following data are the fields from the dmx_sct_filter_params structure (added separately to avoid padding problems) 129 129 uint16_t pid 130 u char[16]filter data (filter.filter)131 u char[16]filter mask (filter.mask)132 u char[16]filter mode (filter.mode)130 uint8_t[16] filter data (filter.filter) 131 uint8_t[16] filter mask (filter.mask) 132 uint8_t[16] filter mode (filter.mode) 133 133 uint32_t timeout 134 134 uint32_t flags … … 143 143 uint8_t demux index 144 144 uint8_t filter number 145 u char[]filtered data from demux145 uint8_t[] filtered data from demux 146 146 147 147 When OSCam is able to decrypt a channel it firstly send the list of PIDs associated with the descrambler index using this packet: -
trunk/cardlist.c
r11498 r11500 2 2 #include "globals.h" 3 3 #include "cardlist.h" 4 /* 5 static const uint8_t data50[81] = { "\x00" }; 6 static const uint8_t mod50[81] = { "\x00" }; 7 static const uint8_t key60[97] = { "\x00" }; 8 static const uint8_t exp60[97] = { "\x00" }; 9 static const uint8_t mod1[113] = { "\x00" }; 10 static const uint8_t nuid[5] = { "\x00" }; 11 */ 4 12 5 struct atrlist current; 13 6 struct known_cards … … 33 26 } 34 27 mtv = { "MTV UNLIMITED",0,8,"3B 24 00 30 42 30 30",20,0,"\x00","\x00" }, 35 srg = { "SRG v5",0,8,"3F 77 18 00 00 C2 7A 44 02 68 90 00",20,0,"\x00","\x00" }, 28 srg = { "SRG v5",0,8,"3F 77 18 00 00 C2 7A 44 02 68 90 00",35,0,"\x00","\x00" }, 29 srg6 = { "SRG v6",0,8,"3F 77 18 00 00 D3 8A 40 01 64 90 00",35,0,"\x00","\x00" }, 36 30 orfice = { "ORF ICE CW-Mode",0,12,"3B 78 12 00 00 54 C4 03 00 8F F1 90 00",38,0,"\x00","\x00" }, 37 31 cdnl = { "CANAL DIGITAAL (NL)",3,12,"3B F7 11 00 01 40 96 70 70 0A 0E 6C B6 D6",42,0,"\x00","\x00" }, … … 40 34 kbw_v23 = { "Kabel-BW V23",0,12,"3F FF 14 25 03 10 80 54 B0 01 69 FF 4A 50 70 00 00 4B 57 01 00 00",65,305419896,"\x00","\x00" }, 41 35 kdg9 = { "Kabel Deutschland G0x",0,12,"3F FD 11 25 02 50 00 03 33 B0 15 69 FF 4A 50 F0 80 03 4B 4C 03",62,305419896,"\x00","\x00" }, 36 skyDEv15 = { "Sky Deutschland V15",1,15,"3F FD 13 25 02 50 80 0F 55 B0 02 69 FF 4A 50 F0 80 00 50 31 03",62,305419896,"\x00","\x00" }, 42 37 skyDEv14 = { "Sky Deutschland V14",1,15,"3F FD 13 25 02 50 80 0F 41 B0 0A 69 FF 4A 50 F0 00 00 50 31 03",62,305419896,"\x00","\x00" }, 43 38 skyDEv13 = { "Sky Deutschland V13",1,15,"3F FF 11 25 03 10 80 41 B0 07 69 FF 4A 50 70 00 00 50 31 01 00 11",65,305419896,"\x00","\x00" }, … … 65 60 if ( !strncmp(hdplus01.rsakey, "0", 1) == 0 ) 66 61 { 67 /* memcpy(reader->boxkey, hdplus01.boxkey, 9); 68 memcpy(reader->rsa_mod, hdplus01.rsakey, 65); 69 */ reader->rsa_mod_length = 64; 62 reader->rsa_mod_length = 64; 70 63 } 71 64 memcpy(current.providername, hdplus01.providername, strlen(hdplus01.providername)); … … 79 72 if ( !strncmp(hdplus02.rsakey, "0", 1) == 0 ) 80 73 { 81 /* memcpy(reader->boxkey, hdplus02.boxkey, 9); 82 memcpy(reader->rsa_mod, hdplus02.rsakey, 65); 83 */ reader->rsa_mod_length = 64; 74 reader->rsa_mod_length = 64; 84 75 } 85 76 memcpy(current.providername, hdplus02.providername, strlen(hdplus02.providername)); … … 96 87 reader->saveemm = hdplus03.saveemm; 97 88 reader->blockemm = hdplus03.blockemm; 98 /* 99 memcpy(reader->data50, data50, 80); 100 memcpy(reader->mod50, mod50, 80); 101 memcpy(reader->key60, key60, 96); 102 memcpy(reader->exp60, exp60, 96); 103 memcpy(reader->nuid, nuid, 4); 104 memcpy(reader->mod1, mod1, 112); 105 106 reader->data50_length = 80; 107 reader->mod50_length = 80; 108 reader->key60_length = 96; 109 reader->exp60_length = 96; 110 reader->nuid_length = 4; 111 reader->mod1_length = 112; 112 */ 89 113 90 current.found = 1; 114 91 return; … … 122 99 reader->saveemm = hdplus03a.saveemm; 123 100 reader->blockemm = hdplus03a.blockemm; 124 /* 125 memcpy(reader->data50, data50, 80); 126 memcpy(reader->mod50, mod50, 80); 127 memcpy(reader->key60, key60, 96); 128 memcpy(reader->exp60, exp60, 96); 129 memcpy(reader->nuid, nuid, 4); 130 memcpy(reader->mod1, mod1, 112); 131 132 reader->data50_length = 80; 133 reader->mod50_length = 80; 134 reader->key60_length = 96; 135 reader->exp60_length = 96; 136 reader->nuid_length = 4; 137 reader->mod1_length = 112; 138 */ 101 139 102 current.found = 1; 140 103 return; … … 147 110 reader->saveemm = hdplus03b.saveemm; 148 111 reader->blockemm = hdplus03b.blockemm; 149 /* 150 memcpy(reader->data50, data50, 80); 151 memcpy(reader->mod50, mod50, 80); 152 memcpy(reader->key60, key60, 96); 153 memcpy(reader->exp60, exp60, 96); 154 memcpy(reader->nuid, nuid, 4); 155 memcpy(reader->mod1, mod1, 112); 156 157 reader->data50_length = 80; 158 reader->mod50_length = 80; 159 reader->key60_length = 96; 160 reader->exp60_length = 96; 161 reader->nuid_length = 4; 162 reader->mod1_length = 112; 163 */ 112 164 113 current.found = 1; 165 114 return; … … 172 121 reader->saveemm = hdplus04.saveemm; 173 122 reader->blockemm = hdplus04.blockemm; 174 /* 175 memcpy(reader->data50, data50, 80); 176 memcpy(reader->mod50, mod50, 80); 177 memcpy(reader->key60, key60, 96); 178 memcpy(reader->exp60, exp60, 96); 179 memcpy(reader->nuid, nuid, 4); 180 memcpy(reader->mod1, mod1, 112); 181 182 reader->data50_length = 80; 183 reader->mod50_length = 80; 184 reader->key60_length = 96; 185 reader->exp60_length = 96; 186 reader->nuid_length = 4; 187 reader->mod1_length = 112; 188 */ 123 189 124 current.found = 1; 190 125 return; … … 197 132 reader->saveemm = hdplus04a.saveemm; 198 133 reader->blockemm = hdplus04a.blockemm; 199 /* 200 memcpy(reader->data50, data50, 80); 201 memcpy(reader->mod50, mod50, 80); 202 memcpy(reader->key60, key60, 96); 203 memcpy(reader->exp60, exp60, 96); 204 memcpy(reader->nuid, nuid, 4); 205 memcpy(reader->mod1, mod1, 112); 206 207 reader->data50_length = 80; 208 reader->mod50_length = 80; 209 reader->key60_length = 96; 210 reader->exp60_length = 96; 211 reader->nuid_length = 4; 212 reader->mod1_length = 112; 213 */ 134 214 135 current.found = 1; 215 136 return; … … 220 141 if ( !strncmp(unity_01.rsakey, "0", 1) == 0 ) 221 142 { 222 /* memcpy(reader->boxkey, unity_01.boxkey, 9); 223 memcpy(reader->rsa_mod, unity_01.rsakey, 65); 224 */ reader->rsa_mod_length = 64; 143 reader->rsa_mod_length = 64; 225 144 } 226 145 memcpy(current.providername, unity_01.providername, strlen(unity_01.providername)); … … 234 153 if ( !strncmp(unity_02.rsakey, "0", 1) == 0 ) 235 154 { 236 /* memcpy(reader->boxkey, unity_02.boxkey, 9); 237 memcpy(reader->rsa_mod, unity_02.rsakey, 65); 238 */ reader->rsa_mod_length = 64; 155 reader->rsa_mod_length = 64; 239 156 } 240 157 memcpy(current.providername, unity_02.providername, strlen(unity_02.providername)); … … 248 165 if ( !strncmp(kdg_02.rsakey, "0", 1) == 0 ) 249 166 { 250 /* memcpy(reader->boxkey, kdg_02.boxkey, 9); 251 memcpy(reader->rsa_mod, kdg_02.rsakey, 65); 252 */ reader->rsa_mod_length = 64; 167 reader->rsa_mod_length = 64; 253 168 } 254 169 memcpy(current.providername, kdg_02.providername, strlen(kdg_02.providername)); … … 262 177 if ( !strncmp(rlmega.rsakey, "0", 1) == 0 ) 263 178 { 264 /* memcpy(reader->boxkey, rlmega.boxkey, 5); 265 memcpy(reader->des_key, rlmega.rsakey, 17); 266 */ reader->des_key_length = 16; 179 reader->des_key_length = 16; 267 180 } 268 181 memcpy(current.providername, rlmega.providername, strlen(rlmega.providername)); … … 303 216 if ( !strncmp(tivusatd.rsakey, "0", 1) == 0 ) 304 217 { 305 // memcpy(reader->rsa_mod, tivusatd.rsakey, 121);306 218 reader->rsa_mod_length = 120; 307 219 } … … 316 228 if ( !strncmp(tivusate.rsakey, "0", 1) == 0 ) 317 229 { 318 // memcpy(reader->rsa_mod, tivusate.rsakey, 121);319 230 reader->rsa_mod_length = 120; 320 231 } … … 328 239 { 329 240 memcpy(current.providername, srg.providername, strlen(srg.providername)); 330 reader->saveemm = tivusate.saveemm; 331 reader->blockemm = tivusate.blockemm; 241 reader->saveemm = srg.saveemm; 242 reader->blockemm = srg.blockemm; 243 reader->read_old_classes = 0; 244 current.found = 1; 245 return; 246 } 247 else if ( strncmp(current.atr, srg6.atr, srg6.atrsize) == 0 ) 248 { 249 memcpy(current.providername, srg6.providername, strlen(srg6.providername)); 250 reader->saveemm = srg6.saveemm; 251 reader->blockemm = srg6.blockemm; 332 252 reader->read_old_classes = 0; 333 253 current.found = 1; … … 363 283 return; 364 284 } 285 snprintf(buf, skyDEv15.atrsize+1, "3F FD %i 25 02 50 80 0F 55 B0 02 69 FF 4A 50 F0 80 00 50 31 03", i); 286 if ( strncmp(current.atr, buf, skyDEv15.atrsize) == 0 ) 287 { 288 memcpy(current.providername, skyDEv15.providername, strlen(skyDEv15.providername)); 289 reader->saveemm = skyDEv15.saveemm; 290 reader->blockemm = skyDEv15.blockemm; 291 reader->boxid = skyDEv15.boxid; 292 reader->caid = 0x098D; 293 current.found = 1; 294 return; 295 } 365 296 snprintf(buf, kbw_v23.atrsize+1, "3F FF %i 25 03 10 80 54 B0 01 69 FF 4A 50 70 00 00 4B 57 01 00 00", i); 366 297 if ( strncmp(current.atr, buf, kbw_v23.atrsize) == 0 ) -
trunk/globals.h
r11487 r11500 110 110 #include "cscrypt/aes.h" 111 111 112 #ifndef uchar113 typedef unsigned char uchar;114 #endif115 116 112 #ifdef IPV6SUPPORT 117 113 #define IN_ADDR_T struct in6_addr … … 882 878 IN_ADDR_T s_ip; 883 879 uint16_t bufsize; 884 void *(*s_handler)(struct s_client *, u char*, int32_t);880 void *(*s_handler)(struct s_client *, uint8_t *, int32_t); 885 881 void (*s_init)(struct s_client *); 886 int32_t (*recv)(struct s_client *, u char*, int32_t);882 int32_t (*recv)(struct s_client *, uint8_t *, int32_t); 887 883 void (*send_dcw)(struct s_client *, struct ecm_request_t *); 888 884 void (*cleanup)(struct s_client *); 889 int32_t (*c_recv_chk)(struct s_client *, u char *, int32_t *, uchar*, int32_t);885 int32_t (*c_recv_chk)(struct s_client *, uint8_t *, int32_t *, uint8_t *, int32_t); 890 886 int32_t (*c_init)(struct s_client *); 891 887 int32_t (*c_send_ecm)(struct s_client *, struct ecm_request_t *); … … 940 936 void (*unlock)(struct s_reader *); 941 937 int32_t (*close)(struct s_reader *); 942 int32_t (*set_parity)(struct s_reader *, u charparity);938 int32_t (*set_parity)(struct s_reader *, uint8_t parity); 943 939 int32_t (*write_settings)(struct s_reader *, struct s_cardreader_settings *s); 944 940 int32_t (*set_protocol)(struct s_reader *, uint8_t *params, uint32_t *length, uint32_t len_request); 945 941 int32_t (*set_baudrate)(struct s_reader *, uint32_t baud); // set only for readers which need baudrate setting and timings need to be guarded by OSCam 946 int32_t (*card_write)(struct s_reader *pcsc_reader, const u char*buf, uint8_t *cta_res, uint16_t *cta_lr, int32_t l);942 int32_t (*card_write)(struct s_reader *pcsc_reader, const uint8_t *buf, uint8_t *cta_res, uint16_t *cta_lr, int32_t l); 947 943 void (*display_msg)(struct s_reader *, char *msg); 948 944
Note:
See TracChangeset
for help on using the changeset viewer.