Changeset 1892
- Timestamp:
- 03/24/10 00:20:46 (14 years ago)
- Location:
- branches/modular
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/modular/Distribution/doc/example/oscam.ac
r205 r1892 4 4 # format: <CAID>:<provider ID>=<seconds> 5 5 6 0 100:000000=106 0500:000000=10 7 7 *=7 8 8 -
branches/modular/Distribution/doc/example/oscam.conf
r1728 r1892 27 27 httpuser = myusername 28 28 httppwd = mypassword 29 30 # anti-cascading 31 32 [anticasc] 33 enabled = 1 34 numusers = 1 35 sampletime = 2 36 samples = 5 37 penalty = 1 38 aclogfile = /var/log/oscam/aclog.log 39 denysamples = 9 29 40 30 41 # protocols … … 62 73 enabled = 1 63 74 user = user1 64 demux = /dev/dvb/adapter0/demux065 ca = /dev/dvb/adapter0/ca166 75 socket = /tmp/camd.socket -
branches/modular/Distribution/doc/example/oscam.user
r1276 r1892 51 51 ident = 0300:000000,FFFFFF;0400:FFFFFF 52 52 caid = 0300 53 54 # user for group 5 with anti-cascading, only 1 logging allowed, send fake CWs as penalty 55 56 [account] 57 user = user5 58 pwd = password5 59 group = 5 60 services = services5 61 ident = 0500:000000 62 caid = 0500 63 numusers = 1 64 penalty = 1 -
branches/modular/Distribution/doc/man/oscam.conf.5
r1853 r1892 279 279 .SS "The [newcamd] section" 280 280 .PP 281 \fBmgclient\fP = \fB0\fP|\fB1\fP \fI(for beta testing only)\fR 282 .RS 3n 283 1 = enable mgcamd extended newcamd protocol, allowing for a single connection to work with mutliple providers, default:0 284 .RE 285 .PP 281 286 \fBport\fP = \fBport@CAID[:ident][,ident]...[;port@CAID[:ident][,ident]...]...\fP 282 287 .RS 3n -
branches/modular/Distribution/doc/man/oscam.server.5
r1769 r1892 214 214 \fBusecache\fP = \fB0\fP|\fB1\fP 1=enable EMM chaching, default:0 215 215 \fBrewrite\fP = determines how often one and the same EMM is written 216 \fBlogging\fP = \fB0\fP = log errors only 217 \fB1\fP = log all EMMs except the double EMMs 218 \fB2\fP = log all EMMs 216 \fBlogging\fP = EMM logging mask: 217 \fB0\fP = EMM logging disabled 218 \fB1\fP = logging EMM errors 219 \fB2\fP = logging written EMMs 220 \fB4\fP = logging skipped EMMs 221 \fB8\fP = logging blocked EMMs 222 223 example: emmcache = 1,3,10 224 emmcache = 1,2,6 219 225 .RE 220 226 .PP -
branches/modular/Distribution/doc/man/oscam.user.5
r1577 r1892 124 124 .RE 125 125 .PP 126 \fBpenalty\fP = \fB0\fP|\fB1\fP|\fB2\fP \fI(only if anti-cascading enabled)\fR 127 .RS 3n 128 level of penalty: 129 130 0 = only logging 131 1 = send fake CWs 132 2 = disbable user temporary 133 134 default:0 135 .RE 136 .PP 126 137 \fBsuppresscmd08\fP = \fB0\fP|\fB1\fP 127 138 .RS 3n -
branches/modular/Distribution/doc/txt/oscam.conf.txt
r1853 r1892 199 199 200 200 The [newcamd] section 201 mgclient = 0|1 (for beta testing only) 202 1 = enable mgcamd extended newcamd protocol, allowing for a single 203 connection to work with mutliple providers, default:0 204 201 205 port = port@CAID[:ident][,ident]...[;port@CAID[:ident][,ident]...]... 202 206 TCP port/CAID/ident definitions, default:none … … 209 213 bind service to specified IP address, default:all 210 214 211 allowed = IP address|IP address range[,IP address|IP addressrange]...215 allowed = IP address|IP address range[,IP address|IP address range]... 212 216 client connections allowed from, default:none 213 217 … … 229 233 bind service to specified IP address, default:all 230 234 231 allowed = IP address|IP address range[,IP address|IP addressrange]...235 allowed = IP address|IP address range[,IP address|IP address range]... 232 236 client connections allowed from, default:none 233 237 … … 342 346 343 347 boxtype = dbox2|dreambox|ufs910 344 set boxtype, auto detection of DVB API will beaspired,348 set boxtype, auto detection of DVB API will be aspired, 345 349 default:dreambox 346 350 … … 350 354 351 355 numusers = quantity 352 anti-cascading: user per account, 0 = anti-cascadingdisabled,356 anti-cascading: user per account, 0 = anti-cascading disabled, 353 357 default:0 354 358 … … 448 452 449 453 The web interface allows you to create your own template. For devel 450 oping your own template request the orignal template with thenon-451 linked page savetemplates.html. Store your own template inthe454 oping your own template request the orignal template with the non- 455 linked page savetemplates.html. Store your own template in the 452 456 directory specified by httptpl. 453 457 … … 455 459 456 460 The Apache module mod_proxy can be used to proxy requests to the web 457 interface. With this module its also possible to use a SSLconnec461 interface. With this module its also possible to use a SSL connec 458 462 tion to the web interface. 459 463 … … 470 474 known issues 471 475 472 Login is not possible by now with the Safari browser becauseof473 incorrect stale flag handling. Increasing the AUTHNONCEVALIDSECSin474 oscam-http.h would be a workaround, but also a small securityrisk.476 Login is not possible by now with the Safari browser because of 477 incorrect stale flag handling. Increasing the AUTHNONCEVALIDSECS in 478 oscam-http.h would be a workaround, but also a small security risk. 475 479 476 480 EXAMPLES … … 510 514 511 515 SEE ALSO 512 list_smargo(1), oscam(1), oscam.user(5),oscam.server(5),516 list_smargo(1), oscam(1), oscam.user(5), oscam.server(5), 513 517 oscam.srvid(5), oscam.guess(5), oscam.cert(5), oscam.services(5), 514 518 oscam.ird(5), oscam.ac(5) -
branches/modular/Distribution/doc/txt/oscam.server.txt
r1769 r1892 157 157 usecache = 0|1 1=enable EMM chaching, default:0 158 158 rewrite = determines how often one and the same EMM is written 159 logging = 0 = log errors only 160 1 = log all EMMs except the double EMMs 161 2 = log all EMMs 159 logging = EMM logging mask: 160 0 = EMM logging disabled 161 1 = logging EMM errors 162 2 = logging written EMMs 163 4 = logging skipped EMMs 164 8 = logging blocked EMMs 165 166 example: emmcache = 1,3,10 167 emmcache = 1,2,6 162 168 163 169 blocknano = nano[,nano]...|all -
branches/modular/Distribution/doc/txt/oscam.user.txt
r1577 r1892 95 95 default:0 96 96 97 penalty = 0|1|2 (only if anti-cascading enabled) 98 level of penalty: 99 100 0 = only logging 101 1 = send fake CWs 102 2 = disbable user temporary 103 104 default:0 105 97 106 suppresscmd08 = 0|1 98 107 0 = CMD08 for camd3 3.57x/3.78x clients enabled, 1 = CMD08 for camd3 -
branches/modular/globals.h
r1882 r1892 710 710 char dvbapi_usr[33]; 711 711 char dvbapi_boxtype[20]; 712 char dvbapi_priority[64];713 char dvbapi_ignore[64];712 CAIDTAB dvbapi_prioritytab; 713 CAIDTAB dvbapi_ignoretab; 714 714 #endif 715 715 … … 958 958 #ifdef HAVE_DVBAPI 959 959 extern void chk_t_dvbapi(char *token, char *value); 960 void dvbapi_chk_caidtab(char *caidasc, CAIDTAB *ctab); 960 961 #endif 961 962 -
branches/modular/module-dvbapi.c
r1882 r1892 115 115 116 116 unsigned short global_caid_list[MAX_CAID]; 117 CAIDTAB prioritytab,ignoretab; 118 119 #define BOX_COUNT 2 117 118 #define BOX_COUNT 3 120 119 struct box_devices 121 120 { … … 126 125 127 126 struct box_devices devices[BOX_COUNT] = { 127 /* QboxHD (dvb-api-3)*/ { "/tmp/virtual_adapter/ca%d", "/tmp/virtual_adapter/demux%d", "/tmp/camd.socket" }, 128 128 /* dreambox (dvb-api-3)*/ { "/dev/dvb/adapter0/ca%d", "/dev/dvb/adapter0/demux%d", "/var/tmp/camd.socket" }, 129 129 /* dreambox (dvb-api-1)*/ { "/dev/dvb/card0/ca%d", "/dev/dvb/card0/demux%d", "/var/tmp/camd.socket" } … … 513 513 514 514 unsigned long provid = (buffer[10] << 8) | buffer[11]; 515 int pid =dvbapi_check_array(prioritytab.caid, CS_MAXCAIDTAB, demux[demux_index].ECMpids[demux[demux_index].pidindex].CA_System_ID);515 int pid = dvbapi_check_array(cfg->dvbapi_prioritytab.caid, CS_MAXCAIDTAB, demux[demux_index].ECMpids[demux[demux_index].pidindex].CA_System_ID); 516 516 if (pid>=0) { 517 if ( prioritytab.mask[pid]>0)518 provid =prioritytab.mask[pid];517 if (cfg->dvbapi_prioritytab.mask[pid]>0) 518 provid = (cfg->dvbapi_prioritytab.cmap[pid] << 8 | cfg->dvbapi_prioritytab.mask[pid]); 519 519 } 520 520 … … 561 561 } 562 562 for (n=0; n<demux[demux_index].ECMpidcount; n++) { 563 if (dvbapi_check_array( ignoretab.caid, CS_MAXCAIDTAB, demux[demux_index].ECMpids[n].CA_System_ID)>=0) {563 if (dvbapi_check_array(cfg->dvbapi_ignoretab.caid, CS_MAXCAIDTAB, demux[demux_index].ECMpids[n].CA_System_ID)>=0) { 564 564 cs_debug("-> ignore %04x", demux[demux_index].ECMpids[n].CA_System_ID); 565 565 } else if (dvbapi_check_array(global_caid_list, MAX_CAID, demux[demux_index].ECMpids[n].CA_System_ID)>=0) { 566 566 cs_debug("-> caid list %04x", demux[demux_index].ECMpids[n].CA_System_ID); 567 567 tmppids[tmppidcount++]=demux[demux_index].ECMpids[n]; 568 } else if (dvbapi_check_array( prioritytab.caid, CS_MAXCAIDTAB, demux[demux_index].ECMpids[n].CA_System_ID)>=0) {568 } else if (dvbapi_check_array(cfg->dvbapi_prioritytab.caid, CS_MAXCAIDTAB, demux[demux_index].ECMpids[n].CA_System_ID)>=0) { 569 569 cs_debug("-> priority %04x", demux[demux_index].ECMpids[n].CA_System_ID); 570 570 tmppids[tmppidcount++]=demux[demux_index].ECMpids[n]; … … 775 775 ptr3=""; 776 776 777 if (((caid=a2i(ptr1, 2))|(prov=a2i(ptr3, 3))) < 0x10000)777 if (((caid=a2i(ptr1, 2))|(prov=a2i(ptr3, 3)))) 778 778 { 779 779 ctab->caid[i]=caid; 780 ctab->cmap[i]=prov >> 8; 780 781 ctab->mask[i++]=prov; 781 782 } … … 874 875 return; 875 876 } 876 877 dvbapi_chk_caidtab(cfg->dvbapi_priority, &prioritytab);878 dvbapi_chk_caidtab(cfg->dvbapi_ignore, &ignoretab);879 877 880 878 int pmt_fd = open("/tmp/pmt.tmp", O_RDONLY); … … 1006 1004 1007 1005 unsigned long provid=0; 1008 int pid =dvbapi_check_array(prioritytab.caid, CS_MAXCAIDTAB, demux[demux_index].demux_fd[n].CA_System_ID);1006 int pid = dvbapi_check_array(cfg->dvbapi_prioritytab.caid, CS_MAXCAIDTAB, demux[demux_index].demux_fd[n].CA_System_ID); 1009 1007 if (pid>=0) { 1010 if ( prioritytab.mask[pid]>0)1011 provid =prioritytab.mask[pid];1008 if (cfg->dvbapi_prioritytab.mask[pid]>0) 1009 provid = (cfg->dvbapi_prioritytab.cmap[pid] << 8 | cfg->dvbapi_prioritytab.mask[pid]); 1012 1010 } 1013 1011 -
branches/modular/oscam-config.c
r1882 r1892 1109 1109 1110 1110 if (!strcmp(token, "priority")) { 1111 cs_strncpy(cfg->dvbapi_priority, value, sizeof(cfg->dvbapi_priority));1111 dvbapi_chk_caidtab(value, &cfg->dvbapi_prioritytab); 1112 1112 return; 1113 1113 } 1114 1114 1115 1115 if (!strcmp(token, "ignore")) { 1116 cs_strncpy(cfg->dvbapi_ignore, value, sizeof(cfg->dvbapi_ignore));1116 dvbapi_chk_caidtab(value, &cfg->dvbapi_ignoretab); 1117 1117 return; 1118 1118 } … … 1928 1928 1929 1929 return(safe_overwrite_with_bak(destfile, tmpfile, bakfile, 0)); 1930 } 1931 1932 int write_server() 1933 { 1934 int i,j; 1935 char *value; 1936 FILE *f; 1937 1938 char *dot = ""; //flag for comma 1939 char tmpfile[256]; 1940 char destfile[256]; 1941 char bakfile[256]; 1942 1943 snprintf(destfile, 255,"%s%s", cs_confdir, cs_srvr); 1944 snprintf(tmpfile, 255, "%s%s.tmp", cs_confdir, cs_srvr); 1945 snprintf(bakfile, 255,"%s%s.bak", cs_confdir, cs_srvr); 1946 1947 if (!(f=fopen(tmpfile, "w"))){ 1948 cs_log("Cannot open file \"%s\" (errno=%d)", tmpfile, errno); 1949 return(1); 1950 } 1951 fprintf(f,"#oscam.user generated automatically\n\n"); 1952 1953 for (i = 0; i < CS_MAXREADER; i++) { 1954 if ( reader[i].label[0] ) { 1955 fprintf(f,"[reader]\n"); 1956 1957 fprintf_conf(f, CONFVARWIDTH, "label", "%s\n", reader[i].label); 1958 1959 char *ctyp =""; 1960 switch(reader[i].typ) { /* TODO like ph*/ 1961 case R_MOUSE : ctyp = "mouse"; break; 1962 case R_INTERNAL : ctyp = "internal"; break; 1963 case R_SMART : ctyp = "smartreader"; break; 1964 case R_CAMD35 : ctyp = "camd35"; break; 1965 case R_CAMD33 : ctyp = "camd33"; break; 1966 case R_NEWCAMD : 1967 if (reader[i].ncd_proto == NCD_524) 1968 ctyp = "newcamd524"; 1969 else 1970 ctyp = "newcamd"; 1971 break; 1972 case R_RADEGAST : ctyp = "radegast"; break; 1973 case R_SERIAL : ctyp = "serial"; break; 1974 #ifdef CS_WITH_GBOX 1975 case R_GBOX : ctyp = "gbox"; break; 1976 #endif 1977 #ifdef HAVE_PCSC 1978 case R_PCSC : ctyp = "pcsc"; break; 1979 #endif 1980 case R_CCCAM : ctyp = "cccam"; break; 1981 case R_CS378X : ctyp = "cs378x"; break; 1982 case R_DB2COM1 : ctyp = "internal"; break; 1983 case R_DB2COM2 : ctyp = "internal"; break; 1984 1985 } 1986 fprintf_conf(f, CONFVARWIDTH, "protocol", "%s", ctyp); 1987 1988 fprintf_conf(f, CONFVARWIDTH, "device", "%s", reader[i].device); 1989 if (reader[i].r_port) 1990 fprintf(f, ",%d", reader[i].r_port); 1991 if (reader[i].l_port) 1992 fprintf(f, ",%d", reader[i].l_port); 1993 fprintf(f, "\n"); 1994 1995 if (reader[i].ncd_key[0]) { 1996 fprintf_conf(f, CONFVARWIDTH, "key", ""); 1997 for (j = 0; j < 14; j++) { 1998 fprintf(f, "%02X", reader[i].ncd_key[j]); 1999 } 2000 fprintf(f, "\n"); 2001 } 2002 2003 #ifdef CS_WITH_GBOX 2004 fprintf_conf(f, CONFVARWIDTH, "password", "%s\n", reader[i].gbox_pwd); 2005 fprintf_conf(f, CONFVARWIDTH, "premium", "%d\n", reader[i].gbox_prem); 2006 #endif 2007 if (reader[i].r_usr[0]) { 2008 fprintf_conf(f, CONFVARWIDTH, "account", ""); 2009 fprintf(f, "%s", reader[i].r_usr); 2010 fprintf(f, ",%s", reader[i].r_pwd); 2011 fprintf(f, "\n"); 2012 } 2013 2014 if (reader[i].pincode[0]) 2015 fprintf_conf(f, CONFVARWIDTH, "pincode", "%s\n", reader[i].pincode); 2016 2017 if (reader[i].emmfile) 2018 fprintf_conf(f, CONFVARWIDTH, "readnano", "%s\n", reader[i].emmfile); 2019 2020 fprintf_conf(f, CONFVARWIDTH, "enable", "%d\n", reader[i].enable); 2021 2022 fprintf_conf(f, CONFVARWIDTH, "services", ""); 2023 char sidok[33]; long2bitchar(reader[i].sidtabok, sidok); 2024 char sidno[33]; long2bitchar(reader[i].sidtabno, sidno); 2025 struct s_sidtab *sidtab = cfg->sidtab; 2026 i=0; dot = ""; 2027 for (; sidtab; sidtab=sidtab->next){ 2028 if(sidok[i]=='1') {fprintf(f,"%s%s", dot, sidtab->label); dot = ",";} 2029 if(sidno[i]=='1') {fprintf(f,"%s!%s", dot, sidtab->label); dot = ",";} 2030 i++; 2031 } 2032 fputc((int)'\n', f); 2033 2034 if (reader[i].tcp_ito) 2035 fprintf_conf(f, CONFVARWIDTH, "inactivitytimeout", "%d\n", reader[i].tcp_ito); 2036 2037 if (reader[i].tcp_rto) 2038 fprintf_conf(f, CONFVARWIDTH, "reconnecttimeout", "%d\n", reader[i].tcp_rto); 2039 2040 if (reader[i].ncd_disable_server_filt) 2041 fprintf_conf(f, CONFVARWIDTH, "disableserverfilter", "%d\n", reader[i].ncd_disable_server_filt); 2042 2043 if (reader[i].smargopatch) 2044 fprintf_conf(f, CONFVARWIDTH, "smargopatch", "%d\n", reader[i].smargopatch); 2045 2046 if (reader[i].fallback) 2047 fprintf_conf(f, CONFVARWIDTH, "fallback", "%d\n", reader[i].fallback); 2048 2049 if (reader[i].log_port) 2050 fprintf_conf(f, CONFVARWIDTH, "logport", "%d\n", reader[i].log_port); 2051 2052 value = mk_t_caidtab(&reader[i].ctab); 2053 fprintf_conf(f, CONFVARWIDTH, "caid", "%s\n", value); 2054 free(value); 2055 2056 if (reader[i].boxid) 2057 fprintf_conf(f, CONFVARWIDTH, "boxid", "%08X\n", reader[i].boxid); 2058 2059 2060 //Keys Section here 2061 2062 2063 if (reader[ridx].detect) { 2064 if (reader[ridx].detect&0x80) 2065 fprintf_conf(f, CONFVARWIDTH, "detect", "!%s\n", RDR_CD_TXT[reader[ridx].detect&0x7f]); 2066 else 2067 fprintf_conf(f, CONFVARWIDTH, "detect", "%s\n", RDR_CD_TXT[reader[ridx].detect&0x7f]); 2068 } 2069 2070 if (reader[i].mhz) 2071 fprintf_conf(f, CONFVARWIDTH, "mhz", "%d\n", reader[i].mhz); 2072 2073 if (reader[i].cardmhz) 2074 fprintf_conf(f, CONFVARWIDTH, "cardmhz", "%d\n", reader[i].cardmhz); 2075 2076 if (reader[i].loadbalanced) 2077 fprintf_conf(f, CONFVARWIDTH, "loadbalanced", "%d\n", reader[i].loadbalanced); 2078 2079 value = mk_t_ftab(&reader[i].ftab); 2080 fprintf_conf(f, CONFVARWIDTH, "ident", "%s\n", value); 2081 free(value); 2082 2083 //ToDo: Add more reader parameter 2084 } 2085 } 2086 fclose(f); 2087 2088 return(safe_overwrite_with_bak(destfile, tmpfile, bakfile, 0)); 1930 2089 } 1931 2090 -
branches/modular/oscam-reader.c
r1836 r1892 453 453 if (rc) client[cs_idx].lastemm=time((time_t)0); 454 454 455 if (reader[ridx].logemm >=rc)455 if (reader[ridx].logemm & (1 << rc)) 456 456 { 457 457 cs_ftime(&tpe); -
branches/modular/reader-conax.c
r1882 r1892 88 88 cs_ri_log("type: Conax, caid: %04X, serial: %llu, card: v%d", 89 89 reader[ridx].caid[0], b2ll(6, reader[ridx].hexserial), cardver); 90 cs_ri_log("Providers:%d", reader[ridx].nprov); 90 91 cs_ri_log("Providers: %d", reader[ridx].nprov); 91 92 92 93 for (j=0; j<reader[ridx].nprov; j++) 93 94 { 94 cs_ri_log("Provider: %d Provider-Id:%06X", j+1, b2ll(4, reader[ridx].prid[j]));95 cs_ri_log("Provider: %d SharedAddress:%08X", j+1, b2ll(4, reader[ridx].sa[j]));95 cs_ri_log("Provider: %d Provider-Id: %06X", j+1, b2ll(4, reader[ridx].prid[j])); 96 cs_ri_log("Provider: %d SharedAddress: %08X", j+1, b2ll(4, reader[ridx].sa[j])); 96 97 } 97 98
Note:
See TracChangeset
for help on using the changeset viewer.