|
SASC
DVBSoftCAM
|
#include <stdio.h>#include <stdlib.h>#include <unistd.h>#include <openssl/sha.h>#include "cc.h"#include "parse.h"#include "crypto.h"#include "helper.h"#include "version.h"Go to the source code of this file.
Classes | |
| class | cCCcamCrypt |
| class | cCmd0cCrypt |
| class | cEcmShare |
| class | cEcmShares |
| class | cShareProv |
| class | cShare |
| class | cShares |
| struct | CmdHeader |
| struct | GenericCmd |
| struct | ClientInfo |
| struct | ServerInfo |
| struct | EcmRequest |
| struct | EmmRequest |
| struct | DcwAnswer |
| struct | DelShare |
| struct | AddShare |
| struct | ProvInfo |
| struct | NodeInfo |
| class | cCardClientCCcam2 |
Defines | |
| #define | CMD0C_MODE_PLAIN 0 |
| #define | CMD0C_MODE_RC6 1 |
| #define | CMD0C_MODE_RC4 2 |
| #define | CMD0C_MODE_CC 3 |
| #define | CMD0C_MODE_AES 4 |
| #define | CMD0C_MODE_IDEA 5 |
| #define | STDLAG 1000 |
| #define | MAXLAG 5000 |
| #define | SETCMDLEN(h, l) BYTE2_BE(&(h)->cmdlen,(l)-4) |
| #define | CMDLEN(h) (UINT16_BE(&(h)->cmdlen)+4) |
| #define | MAX_ECM_TIME 3000 |
| #define | PING_TIME 120*1000 |
| #define | CMD05_MODE_UNKNOWN 0 |
| #define | CMD05_MODE_PLAIN 1 |
| #define | CMD05_MODE_AES 2 |
| #define | CMD05_MODE_CC 3 |
| #define | CMD05_MODE_RC4 4 |
| #define | CMD05_MODE_LEN0 5 |
Functions | |
| struct CmdHeader | __attribute__ ((packed)) |
| static cCardClientLinkReg < cCardClientCCcam2 > | __ncd ("cccam2") |
Variables | |
| static const char * | cccamstr = "CCcam" |
| static cEcmShares | ecmshares |
| unsigned char | flags |
| unsigned char | cmd |
| unsigned short | cmdlen |
| struct CmdHeader | header |
| unsigned char | payload [0] |
| char | username [20] |
| unsigned char | nodeid [8] |
| unsigned char | wantemus |
| char | version [32] |
| char | build [32] |
| unsigned short | caid |
| unsigned int | provid |
| unsigned int | shareid |
| unsigned short | sid |
| unsigned char | datalen |
| unsigned char | data [0] |
| unsigned char | dummy |
| unsigned char | cw [16] |
| unsigned int | remoteid |
| unsigned char | uphops |
| unsigned char | maxdown |
| unsigned char | cardserial [8] |
| unsigned char | count |
| struct { | |
| unsigned char provid [3] | |
| unsigned char sa [4] | |
| } | prov [0] |
| cCardClientCCcam2 | __attribute__ |
| #define CMD05_MODE_UNKNOWN 0 |
Definition at line 642 of file cccam2.c.
Referenced by cCardClientCCcam2::cCardClientCCcam2(), and cCardClientCCcam2::Logout().
| #define CMD0C_MODE_AES 4 |
Definition at line 171 of file cccam2.c.
Referenced by cCmd0cCrypt::Decrypt(), and cCmd0cCrypt::SetKey().
| #define CMD0C_MODE_CC 3 |
Definition at line 170 of file cccam2.c.
Referenced by cCmd0cCrypt::Decrypt(), and cCmd0cCrypt::SetKey().
| #define CMD0C_MODE_IDEA 5 |
Definition at line 172 of file cccam2.c.
Referenced by cCmd0cCrypt::Decrypt(), and cCmd0cCrypt::SetKey().
| #define CMD0C_MODE_PLAIN 0 |
Definition at line 167 of file cccam2.c.
Referenced by cCmd0cCrypt::Decrypt(), cCmd0cCrypt::Reset(), and cCmd0cCrypt::SetKey().
| #define CMD0C_MODE_RC4 2 |
Definition at line 169 of file cccam2.c.
Referenced by cCmd0cCrypt::Decrypt(), and cCmd0cCrypt::SetKey().
| #define CMD0C_MODE_RC6 1 |
Definition at line 168 of file cccam2.c.
Referenced by cCmd0cCrypt::Decrypt(), and cCmd0cCrypt::SetKey().
| #define CMDLEN | ( | h | ) | (UINT16_BE(&(h)->cmdlen)+4) |
Definition at line 564 of file cccam2.c.
Referenced by cCardClientCCcam2::Action().
| #define MAX_ECM_TIME 3000 |
Definition at line 639 of file cccam2.c.
Referenced by cCardClientCCcam2::ProcessECM().
| #define MAXLAG 5000 |
Definition at line 334 of file cccam2.c.
Referenced by cCardClientCCcam2::ProcessECM(), and cShares::SetLag().
| #define SETCMDLEN | ( | h, | |
| l | |||
| ) | BYTE2_BE(&(h)->cmdlen,(l)-4) |
Definition at line 563 of file cccam2.c.
Referenced by cCardClientCCcam2::Login(), cCardClientCCcam2::ProcessECM(), and cCardClientCCcam2::ProcessEMM().
| #define STDLAG 1000 |
Definition at line 333 of file cccam2.c.
Referenced by cShare::cShare(), and cShares::SetLag().
| struct CmdHeader __attribute__ | ( | (packed) | ) |
| static cCardClientLinkReg<cCardClientCCcam2> __ncd | ( | "cccam2" | ) | [static] |
struct NodeInfo __attribute__ [inline] |
Definition at line 308 of file FFdecsa.c.
Referenced by get_misalign(), get_unaligned(), put_misalign(), and put_unaligned().
{
int *ri=(int *)in;
int *bdi=(int *)out;
int j,i,k,g;
#define INTS_PER_ROW (GROUP_PARALLELISM/8*2)
//dump_mem("NE1 r[roff]",&r[roff],GROUP_PARALLELISM*8,GROUP_PARALLELISM);
// now 00000000
for(j=0;j<8;j+=2){
for(i=0;i<1;i++){
for(k=0;k<INTS_PER_ROW;k++){
unsigned int t,b;
t=ri[INTS_PER_ROW*(j+i)+k];
b=ri[INTS_PER_ROW*(j+i+1)+k];
ri[INTS_PER_ROW*(j+i)+k]= (t&0x00ff00ff) | ((b&0x00ff00ff)<<8);
ri[INTS_PER_ROW*(j+i+1)+k]= ((t&0xff00ff00)>>8) | (b&0xff00ff00);
}
}
}
//dump_mem("NE2 r[roff]",&r[roff],GROUP_PARALLELISM*8,GROUP_PARALLELISM);
// now 01010101
for(j=0;j<8;j+=4){
for(i=0;i<2;i++){
for(k=0;k<INTS_PER_ROW;k++){
unsigned int t,b;
t=ri[INTS_PER_ROW*(j+i)+k];
b=ri[INTS_PER_ROW*(j+i+2)+k];
ri[INTS_PER_ROW*(j+i)+k]= (t&0x0000ffff) | ((b )<<16);
ri[INTS_PER_ROW*(j+i+2)+k]= ((t )>>16) | (b&0xffff0000) ;
}
}
}
//dump_mem("NE3 r[roff]",&r[roff],GROUP_PARALLELISM*8,GROUP_PARALLELISM);
// now 01230123
for(g=0;g<count;g++){
bdi[2*g]=ri[g];
bdi[2*g+1]=ri[GROUP_PARALLELISM+g];
}
}
| unsigned short caid |
Definition at line 595 of file cccam2.c.
Referenced by cShare::CaID(), cSmartCardNagra::CanHandle(), cSmartCardCryptoworks::CanHandle(), cShare::CheckAddProv(), cShare::cShare(), cShares::HasCaid(), cSmartCardNagra::Init(), cCardClientRadegast::Login(), cCardClientBuffy::Login(), main(), cPlainKeyConstCw::Parse(), cSystem::ParseCAT(), cCardClientGbox::ProcessECM(), cSystem::StartLog(), and cShare::UsesProv().
| unsigned char cardserial[8] |
const char* cccamstr = "CCcam" [static] |
Definition at line 37 of file cccam2.c.
Referenced by cCardClientCCcam2::Login(), and cCCcamCrypt::Xor().
| unsigned char cmd |
Definition at line 562 of file cccam2.c.
Referenced by _attach_callback(), connect_cam(), cSmartCardIrdeto::Decode(), dvblb_fake_ioctl(), dvblb_read(), forward_data(), init_evocamd(), init_sc(), listen_loop(), main(), msg_loop(), msg_remove_type_from_list(), cSystemSeca::ProcessEMM(), show_help(), start_loopbackca(), and cSmartCardIrdeto::Update().
| unsigned char count |
Definition at line 631 of file cccam2.c.
Referenced by __attribute__(), cN2Timer::AddCycles(), block_decypher_group(), cListBase::Count(), cIrdeto::DecryptIrd(), dvblb_procfs_adapter_write(), dvblb_procfs_write(), dvblb_read(), get_adapters(), SI::DescriptorLoop::getDescriptorTags(), GetHexBase(), SI::DescriptorLoop::getNumberOfDescriptors(), inuse_filemap(), cFileMap::Map(), parse_ca(), poll_loop(), read_pmt(), read_sid(), replace_cat(), c6805::Run(), start(), start_loopbackca(), and cFileMap::Unmap().
| unsigned char cw[16] |
Definition at line 610 of file cccam2.c.
Referenced by cCardClientCCcam::Action(), Ecm(), and cCardClientCCcam2::ProcessECM().
| unsigned char data |
Definition at line 600 of file cccam2.c.
Referenced by cN2Prov0101::Algo(), cVector< char * >::Append(), cParseNDS::Assemble(), cCardCryptoworks::Assemble(), cProviderViaccess::Assemble(), cVector< char * >::At(), cParseViaccess::CheckNano90FromNano(), cVector< char * >::cVector(), cSmartCardViaccess::Decode(), cDeCSA::Decrypt(), FFTABLEIN(), cVector< char * >::Insert(), main(), cIdSet::MatchAndAssemble(), msg_send_replace(), cScCamSlot::Process(), cLogger::Process(), cHookManager::Process(), cSystemViaccess::ProcessECM(), cSystemIrd::ProcessECM(), cVector< char * >::Sort(), start_loopbackca(), cSmartCardViaccess::Update(), usermsg_cam(), and cVector< char * >::~cVector().
| unsigned char datalen |
Definition at line 599 of file cccam2.c.
Referenced by cCardClientCamd35::SendBlock().
cEcmShares ecmshares [static] |
| unsigned char flags |
Definition at line 562 of file cccam2.c.
Referenced by cDeCSA::Decrypt(), cTimer::Flags(), c6805::Run(), and cDeCSA::SetDescr().
| unsigned char nodeid |
Definition at line 580 of file cccam2.c.
Referenced by cCardClientCCcam2::Init().
| unsigned char payload[0] |
Definition at line 571 of file cccam2.c.
Referenced by cSmartCardSeca::Decode(), and cSmartCardSeca::Update().
| struct { ... } prov[0] |
| unsigned int provid |
Definition at line 596 of file cccam2.c.
Referenced by cShare::CheckAddProv(), and main().
| unsigned int shareid |
Definition at line 597 of file cccam2.c.
Referenced by cEcmShare::cEcmShare(), cShare::CheckAddProv(), cShare::cShare(), and cShare::ShareID().
| unsigned short sid |
Definition at line 598 of file cccam2.c.
Referenced by cPlainKeyCryptoworks::Parse(), cPlainKeyConax::Parse(), read_pat(), read_pmt(), and cChannel::Sid().
| char username[20] |
Definition at line 579 of file cccam2.c.
Referenced by cCardClientCCcam2::Init(), and cCardClientCCcam2::Login().
| char version |
Definition at line 582 of file cccam2.c.
Referenced by read_pat(), and cEvent::Version().