|
SASC-NG
DVBSoftCAM
|
#include <stdlib.h>#include <stdio.h>#include "crypto.h"#include "data.h"#include "system-common.h"#include "compat.h"#include "systems/viaccess/viaccess.h"#include "systems/viaccess/viaccess.c"#include "systems/viaccess/tps.c"#include "systems/viaccess/st20.c"Go to the source code of this file.
Classes | |
| class | cSatTimeHook |
| class | cTpsAuHook |
Defines | |
| #define | TESTER |
Functions | |
| int | main (int argc, char *argv[]) |
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
Definition at line 76 of file testTPS.c.
References data, cTpsAuHook::DummyProcess(), InitAll(), L_SYS, L_SYS_DISASM, LCLASS, LogAll(), and cLogging::SetModuleOption().
{
if(argc<3) {
printf("usage: %s <plugin-dir> <TPSBIN|OTV> <decomp-bin>\n",argv[0]);
return 1;
}
InitAll(argv[1]);
LogAll();
cLogging::SetModuleOption(LCLASS(L_SYS,L_SYS_DISASM),false);
if(!strcasecmp(argv[2],"OTV")) {
FILE *f=fopen(argv[3],"r");
if(f) {
fseek(f,0,SEEK_END);
int size=ftell(f);
fseek(f,0,SEEK_SET);
unsigned char *data=(unsigned char *)malloc(size);
if(fread(data,1,size,f)<=0) ;
fclose(f);
printf("read %d bytes from %s\n",size,argv[3]);
cTpsAuHook hook;
hook.DummyProcess(data,size);
}
}
else if(!strcasecmp(argv[2],"TPSBIN")) {
cTpsAuHook hook;
hook.DummyProcess(0,0);
}
return 0;
}