Changeset 825
- Timestamp:
- 12/14/09 17:01:23 (14 years ago)
- Location:
- branches/smartreader
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/smartreader/Distribution/doc/man/oscam.conf.5
r808 r825 382 382 login <user> <password> = login (for unencrypted connections only) 383 383 exit = exit monitor 384 log <on|off> = enable|disable logging for 2 minutes 384 log <on|onwohist|off> = enable|enable without hitory|disable 385 logging for 2 minutes 385 386 status = list of current processes and clients 386 387 shutdown = showdown OSCam -
branches/smartreader/Distribution/doc/txt/oscam.conf.txt
r808 r825 275 275 login <user> <password> = login (for unencrypted connections only) 276 276 exit = exit monitor 277 log <on|off> = enable|disable logging for 2 minutes 277 log <on|onwohist|off> = enable|enable without hitory|disable 278 logging for 2 minutes 278 279 status = list of current processes and clients 279 280 shutdown = showdown OSCam -
branches/smartreader/module-monitor.c
r808 r825 476 476 int i; 477 477 #endif 478 if (strcmp(flag, "on")) 479 { 480 client[cs_idx].log=0; 481 return; 482 } 478 if (strcmp(flag, "on")) { 479 if (strcmp(flag, "onwohist")) { 480 client[cs_idx].log=0; 481 return; 482 } 483 } 484 483 485 if (client[cs_idx].log) // already on 484 486 return; 485 487 #ifdef CS_LOGHISTORY 486 for (i=(*loghistidx+3) % CS_MAXLOGHIST; i!=*loghistidx; i=(i+1) % CS_MAXLOGHIST) 487 { 488 char *p_usr, *p_txt; 489 p_usr=(char *)(loghist+(i*CS_LOGHISTSIZE)); 490 p_txt=p_usr+32; 491 if ((p_txt[0]) && 492 ((client[cs_idx].monlvl>1) || (!strcmp(p_usr, client[cs_idx].usr)))) 493 { 494 char sbuf[8]; 495 sprintf(sbuf, "%03d", client[cs_idx].logcounter); 496 client[cs_idx].logcounter=(client[cs_idx].logcounter+1) % 1000; 497 memcpy(p_txt+4, sbuf, 3); 498 monitor_send(p_txt); 499 } 500 } 488 if (!strcmp(flag, "on")){ 489 for (i=(*loghistidx+3) % CS_MAXLOGHIST; i!=*loghistidx; i=(i+1) % CS_MAXLOGHIST) 490 { 491 char *p_usr, *p_txt; 492 p_usr=(char *)(loghist+(i*CS_LOGHISTSIZE)); 493 p_txt=p_usr+32; 494 if ((p_txt[0]) && 495 ((client[cs_idx].monlvl>1) || (!strcmp(p_usr, client[cs_idx].usr)))) 496 { 497 char sbuf[8]; 498 sprintf(sbuf, "%03d", client[cs_idx].logcounter); 499 client[cs_idx].logcounter=(client[cs_idx].logcounter+1) % 1000; 500 memcpy(p_txt+4, sbuf, 3); 501 monitor_send(p_txt); 502 } 503 } 504 } 501 505 #endif 502 506 client[cs_idx].log=1; 503 507 } 504 505 506 508 static void monitor_set_debuglevel(char *flag) 507 509 { … … 509 511 kill(client[0].pid, SIGUSR1); 510 512 } 511 512 513 513 514 static int monitor_process_request(char *req) -
branches/smartreader/reader-dre.c
r521 r825 270 270 if ((dre_cmd (ecmcmd41))) { //ecm request 271 271 if ((cta_res[cta_lr - 2] != 0x90) || (cta_res[cta_lr - 1] != 0x00)) 272 return 0; //exit if response is not 90 00272 return 0; //exit if response is not 90 00 273 273 memcpy (er->cw, cta_res + 11, 8); 274 274 memcpy (er->cw + 8, cta_res + 3, 8); … … 292 292 if ((dre_cmd (ecmcmd51))) { //ecm request 293 293 if ((cta_res[cta_lr - 2] != 0x90) || (cta_res[cta_lr - 1] != 0x00)) 294 return 0; //exit if response is not 90 00294 return 0; //exit if response is not 90 00 295 295 memcpy (er->cw, cta_res + 11, 8); 296 296 memcpy (er->cw + 8, cta_res + 3, 8); … … 317 317 emmcmd52[0x39] = provider; 318 318 if ((dre_cmd (emmcmd52))) 319 if ((cta_res[cta_lr - 2] != 0x90) || (cta_res[cta_lr - 1] != 0x00))320 return 0; //exit if response is not 90 00321 }319 if ((cta_res[cta_lr - 2] != 0x90) || (cta_res[cta_lr - 1] != 0x00)) 320 return 0; //exit if response is not 90 00 321 } 322 322 } 323 323 else { … … 329 329 0x56, 0x58, 0x11 330 330 }; 331 memcpy (emmcmd42 + 1, ep->emm + 6, 48); 332 emmcmd42[51] = provider; 333 //emmcmd42[50] = ecmcmd42[2]; //TODO package nr could also be fixed 0x58 334 emmcmd42[50] = 0x58; 335 emmcmd42[49] = ep->emm[5]; //keynr 336 /* response: 337 59 05 A2 02 05 01 5B 338 90 00 */ 339 if ((dre_cmd (emmcmd42))) { //first emm request 340 if ((cta_res[cta_lr - 2] != 0x90) || (cta_res[cta_lr - 1] != 0x00)) 341 return 0; //exit if response is not 90 00 342 343 memcpy (emmcmd42 + 1, ep->emm + 55, 7); //TODO OR next two lines? 344 /*memcpy (emmcmd42 + 1, ep->emm + 55, 7); //FIXME either I cant count or my EMM log contains errors 345 memcpy (emmcmd42 + 8, ep->emm + 67, 41); */ 346 emmcmd42[51] = provider; 347 //emmcmd42[50] = ecmcmd42[2]; //TODO package nr could also be fixed 0x58 348 emmcmd42[50] = 0x58; 349 emmcmd42[49] = ep->emm[54]; //keynr 350 if ((dre_cmd (emmcmd42))) { //second emm request 351 if ((cta_res[cta_lr - 2] != 0x90) || (cta_res[cta_lr - 1] != 0x00)) 352 return 0; //exit if response is not 90 00 353 } 354 } 331 switch (ep->emm[0]) { 332 case 0x87: //unique EMM 333 memcpy (emmcmd42 + 4, ep->emm + 3, 45); 334 emmcmd42[3] = 0x00; //not sure about this 335 emmcmd42[49] = ep->emm[41]; //keynr 336 emmcmd42[50] = 0x58 + ep->emm[40]; //package nr 337 emmcmd42[51] = provider; 338 if ((dre_cmd (emmcmd42))) { 339 if ((cta_res[cta_lr - 2] != 0x90) || (cta_res[cta_lr - 1] != 0x00)) 340 return 0; //exit if response is not 90 00 341 } 342 break; 343 case 0x89: //shared EMM 344 default: 345 memcpy (emmcmd42 + 1, ep->emm + 6, 48); 346 emmcmd42[51] = provider; 347 //emmcmd42[50] = ecmcmd42[2]; //TODO package nr could also be fixed 0x58 348 emmcmd42[50] = 0x58; 349 emmcmd42[49] = ep->emm[5]; //keynr 350 /* response: 351 59 05 A2 02 05 01 5B 352 90 00 */ 353 if ((dre_cmd (emmcmd42))) { //first emm request 354 if ((cta_res[cta_lr - 2] != 0x90) || (cta_res[cta_lr - 1] != 0x00)) 355 return 0; //exit if response is not 90 00 356 357 memcpy (emmcmd42 + 1, ep->emm + 55, 7); //TODO OR next two lines? 358 /*memcpy (emmcmd42 + 1, ep->emm + 55, 7); //FIXME either I cant count or my EMM log contains errors 359 memcpy (emmcmd42 + 8, ep->emm + 67, 41); */ 360 emmcmd42[51] = provider; 361 //emmcmd42[50] = ecmcmd42[2]; //TODO package nr could also be fixed 0x58 362 emmcmd42[50] = 0x58; 363 emmcmd42[49] = ep->emm[54]; //keynr 364 if ((dre_cmd (emmcmd42))) { //second emm request 365 if ((cta_res[cta_lr - 2] != 0x90) || (cta_res[cta_lr - 1] != 0x00)) 366 return 0; //exit if response is not 90 00 367 } 368 } 369 } 355 370 } 356 371 return 1; //success
Note:
See TracChangeset
for help on using the changeset viewer.