Pequeno Manual OSCAM
Exemplo para dreambox 500:
Files necessários e respectivas localizações:
Oscam.ppc renomeado para oscam -> /var/bin
Oscam.conf -> /var/tuxbox/config
Oscam.server -> /var/tuxbox/config
Oscam.user -> /var/tuxbox/config
Oscam.services -> /var/tuxbox/config
Oscam.srvid -> /var/tuxbox/config
oscam.conf:
NAME
oscam.conf - main configuration file for OSCam
SYNOPSIS
The main configuration file for OSCam contains global
parameters such
as debugging, logging, monitor, protocols and anti-cascading.
sections
in oscam.conf are nonrecurring. The [global] section is
required. All
other sections are optional.
DESCRIPTIONS
The [global] section
serverip = IP address
bind service to specified IP address, default:all
logfile = filename|/dev/null|/dev/tty|syslog
logging target, default: /var/log/oscam.log
pidfile = filename
PID file, default:no PID file
usrfile = filename
log file for user logging, default:none
log file format:
date
time
CWs per second
username
IP address of client
TCP/IP port
CWs found
CWs from cache
CWS not found
login time in unix/POSIX format
logout time in unix/POSIX format
protocol
cwlogdir = path
directory for CW logging, default:none
clienttimeout = seconds
value for client process to wait for key, default:5
fallbacktimeout = seconds
time falling back to fallback reader, default:2
clientmaxidle = seconds
value for client process being idle before disconnect,
default:120
cachedelay = milli-seconds
value to delay cached requests , default:0
bindwait = seconds
value to wait for bind request to complete, default:120
netprio = priority
network priority, default:system given
resolvedelay = seconds
delay for DNS resolving, default:30
sleep = minutes
time waiting for inactive users, default:none, can be
overwritten
per user in oscam.user
unlockparental = 0|1
1 = unlock parental mode option to disable Seca pin code
request for
adult movie, default:0
nice = -20..+20
system priority, default:99
serialreadertimeout = milli-seconds
timeout for serial reader, default:1500
maxlogsize = kbytes
max log file size, default:10
showecmdw = 0|1
1 = show DW in log file, default:0
waitforcards = 0|1
1 = wait for local SCs on startup before opening network
ports,
default:0
preferlocalcards = 0|1
1 = try decoding on local cards first, default:0
The [monitor] section
port = 0|port
UDP port for monitor, port=0 monitor disabled, default:0
serverip = IP address
bind service to specified IP address, default:all
nocrypt = IP address|IP address range[,IP address|IP address
range]...
unsecured monitor connection, default:none
example: nocrypt = 127.0.0.1,192.168.0.0-192.168.255.255
aulow = minutes
time no EMM occurs so that client is set to low, default:30
monlevel = 0|1|2|3|4
monitor level:
0 = no access to monitor
1 = only server and own procs
2 = all procs, but viewing only, default
3 = all procs, reload of oscam.user possible
4 = complete access
monlevel can be overwritten per user in oscam.user
hideclient_to = minutes
time to hide clients in the monitor if not sending
requests, 0 =
disabled, default:0
The [camd33] section
port = 0|port
TCP/IP port for camd 3.3x clients, 0 = disabled, default:0
serverip = IP address
bind service to specified IP address, default:all
nocrypt = IP address|IP address range[,IP address|IP address
range]...
unsecured camd 3.3x client connection, default:none
example: nocrypt = 127.0.0.1,192.168.0.0-192.168.255.255
passive = 0|1
1=force passive camd 3.3x client, default:0
key = 128 bit key
key for camd 3.3x client encryption, default:none
example: key = 01020304050607080910111213141516
The [camd35] section
port = 0|port
UDP port for camd 3.5x clients, 0 = disabled, default:0
serverip = IP address
bind service to specified IP address, default:all
The [newcamd] section
port =
port@CAID[:ident][,ident]...[;port@CAID[:ident][,ident]...]...
TCP port/CAID/ident definitions, default:none
example: port =
10000@0100:100000;20000@0200:200000,300000,400000
Each CAID requires a separate port.
serverip = IP address
bind service to specified IP address, default:all
key = DES key
key for newcamd client encryption, default:none
example key = 0102030405060708091011121314
The [radegast] section
port = 0|port
TCP/IP port for radegast clients, 0=disabled, default:0
serverip = IP address
bind service to specified IP address, default:all
allowed = IP address|IP address range[,IP address|IP address
range]...
client connections allowed from, default:none
example: allowed = 127.0.0.1,192.168.0.0-192.168.255.255
user = username
user name for radegast client
The [serial] section
device =
<user>@<device>[:baud][?option1=value1[&option2=value2]]
parameters:
user = account
device = serial device name
option = timeout = milli-seconds, timeout for connection,
default:50
delay = milli-seconds, additional delay between
two
characters, default:0
supported serial devices:
HSIC (humax sharing interface client)
SSSP (simple serial sharing protocol)
bomba (BOMBA firmware)
dsr9500 (DSR 9500)
The [cs357x] section
port = 0|port
UDP port for camd 3.57x clients, 0 = disabled, default:0
serverip = IP address
bind service to specified IP address, default:all
The [cs378x] section
port =
0|port@CAID[:ident][,ident]...[;port@CAID[:ident][,ident]...]...
TCP port/CAID/ident definitions for camd 3.78x clients,0 =
disabled,
default:0
example: port =
10000@0100:100000;20000@0200:200000,300000,400000
Each CAID requires a separate port.
serverip = IP address
bind service to specified IP address, default:all
The [gbox] section
password = password
password for gbox server
maxdist = distance
maximum distance to gbox servers, default:5
ignorelist = filename
listing of providers to be ignored, format:
G:{<CAID><provider ID>},
default:none
example: G:{01001234}
onlineinfos = filename
file to store online information, default:none
cardinfos = filename
file to store card information, default:none
locals = <CAID><provider ID>[,<CAID><provider ID>]...
backwards sharing of local cards,default:none
example: locals = 01001234,02005678
The [anticasc] section
enabled = 0|1
1=enabled anti-cascading, default:0
numusers = quantity
user per account, default:0
sampletime = minutes
duration of sample, default:2
samples = quantity
quantity of samples over limit, default:10
penalty = 0|1|2
level of penalty:
0 = only logging
1 = send fake CWs
2 = disbable user temporary
default:0, penalty can be overwritten per user in oscam.user
aclogfile = filename
file for anti-cascading logging, default:none
fakedelay = milli-seconds
fake delay time, default:1000
denysamples = quantity
How many samples should be penalized?, default:8
MONITOR
monitor commands:
login <user> <password> = login (for unencrypted connections
only)
exit = exit monitor
log <on|onwohist|off> = enable|enable without hitory|disable
logging for 2 minutes
status = list of current processes and clients
shutdown = showdown OSCam
reload = reinit user db, clients and anti-
cascading
details <PID> = details about selected PID
debug <level> = set debug level (monlevel > 3
required)
debug level mask:
0 = no debugging (default)
1 = debug dumps
2 = debug master process
4 = debug reader/proxy process
8 = debug client process
16 = debug reader I/O
32 = debug watchdog
63 = debug all
version = show OSCam version
EXAMPLES
[global]
logfile = /var/log/oscam/oscam.log
usrfile = /var/log/oscam/oscamuser.log
pidfile = /var/run/oscam.pid
waitforcards = 1
[monitor]
port = 988
monlevel = 1
nocrypt = 127.0.0.1
[newcamd]
key = 0102030405060708091011121314
port =
10000@0100:100000;20000@0200:200000,300000,400000
[radegast]
port = 30000
user = radegastuser
allowed = 127.0.0.1,192.168.0.0-192.168.255.255
[camd33]
port = 40000
serverip = 192.168.0.1
key = 01020304050607080910111213141516
[cs378x]
port = 50000@0300:600000
oscam.server:
NAME
oscam.server - reader configuration file for OSCam
SYNOPSIS
The server configuration file for OSCam contains reader
parameters.
sections in oscam.server are recurring (more than one reader
possible).
At least one [reader] section is required.
DESCRIPTIONS
The [reader] section
device = device|<ip|hostname>,<port>[,<lport>]|pcsc
define local or remote reader
lport: remapping to local port
PCSC: number of PCSC readers, starting with 0
key = DES key
key for newcamd remote reader encryption
password = password
password for remote gbox reader
premium = ???
for gbox reader
account = user,password
user and password for remote reader
pincode = pincode
pincode for Conax and Cryptoworks SCs
services = [!]services[,[!]<services>]...
reader [de]assingment to service group, default=none
inactivitytimeout = minutes
inactivity timeout for newcamd reader, default:none
reconnecttimeout = minutes
TCP reconnect, if missing answers, default:none
disableserverfilter = 0|1
1 = ignore caid and ident settings of reader due faulty
clients,
default=0
label = name
name for reader, required
fallback = 0|1
1 = define reader as fallback, standard and fallback
reader must
have the same group, default:0
logport = 0|port
camd3 reader logport, camd3 UDP must be activated, only
works if
theres no camd3 cascading, 0=disabled, default=0
caid = CAID[&<mask>][,CAID[&<mask>]]...
define CAID for reader, some protocols only support one
CAID,
default:mask=FFFF
example: CAID=0100,0200&FFDF
boxid = NDS box ID
NDS receiver box id
aeskey = AES key
AES key for Viaccess SCs
detect = CD|DSR|CTS|RING|NONE|gpio[2-7]
status detect of card (NONE = no detection), default:CD
cardmhz = mhz
set standard SC frequency in units of 10 kHz, for Irdeto SC
set to
600, refer to OVERCLOCKING, default:357
mhz = frequency
set reader frequency in units of 10 kHz, if mhz > cardmhz you
are in
overclocking mode, refer to OVERCLOCKING, default:357
protocol = reader protocol
reader protocol, required:
mouse
smartreader
internal
serial
camd35|cs357x
cs378x
gbox
newcamd|newcamd525
newcamd524
cccam
radegast
pcsc
cccversion = <main version>.<version>.<sub version>
define CCcam version, default:none
exmaple: cccversion = 1.2.34
cccbuild = <4-digit number>
define CCcam build, default:none
exmaple: cccbuild = 5678
ident =
<CAID>:<ident>[,ident]...[,<CAID>:<ident>[,ident]...]...
define CAID and ident for reader
exmaple: ident = 0100:123456,234567;0200:345678,456789
provid = ID
define provider ID for reader
class = [!]class[,[!]class]...
define class in hex for reader
example: class = 01,02,!1b,!2b
chid = CAID:ChID
define Irdeto ChID for reader
example: chid = 0100:12
showcls = quantity
number of classes subscriptions to show for Viaccess SCs,
default=10
maxqlen = size
size of request queue for reader, default:128
group = groupname
reader assingment to group, required
emmcache = usecache,rewrite,logging
set EMM cache of local reader:
usecache = 0|1 1=enable EMM chaching, default:0
rewrite = determines how often one and the same EMM is
written
logging = 0 = log errors only
1 = log all EMMs except the double EMMs
2 = log all EMMs
blocknano = nano[,nano]...|all
list of EMM-nanos to block (in hex w/o 0x) or all EMM-
nanos, only
valid for physical readers, default:none
example: blocknano = 45,93,7a,ff
blocknano = all
savenano = nano[,nano]....|all
list of EMM-nanos to save (in hex w/o 0x) or all EMM-
nanos, only
valid for physical readers, default:none
example: savenano = 45,93,7a,ff
savenano = all
readnano = [path]filename
write file (usually a copy of a file saved by savenano) to
your
smartcard, if no path is specified, the specified file is
searched
for in the configuration directory, only valid for physical
readers,
default:none
example: readnano = write.emm
readnano = /var/oscam/write.emm
n3_rsakey = RSA key
RSA key for Nagravision SCs
n3_boxkey = box key
box key for Nagravision SCs
OVERCLOCKING
Dreambox reader
For SC overclocking set to 600. If mhz is unset or any other
value,
the default value will be used and behaviour will be
standard.
Phoenix / Smartmouse reader
Overclocking does not work with Windows and Mac OS
X. Set mhz
equivalent to the frequency of the reader. OSCam can not
set the
frequency of the reader.
Smargo Smartreader+
Set the reader frequency with the native Smargo
Smartreader+ tool
(srp_tools). Do not set mhz and cardmhz.
OSCam tries to set the baudrate automatically. A
standard serial port
has limited baudrate settings, so SC overclocking might not
work. When
using a serial reader the best way for overclocking is
connecting it to
a FTDI based USB to serial port adapter.
If overclocking does not work, verify the effective baudrate
in the
logfile. If it deviates too much from the requested
baudrate, the SC
will not be recognized (no ATR) and the value for mhz
should be
adjusted again. The higher the baudrate, the more accurate
the effec
tive baudrate can be.
EXAMPLES
serial mouse compatible reader
[reader]
label = myserialmousereader
detect = cd
protocol = mouse
device = /dev/ttyS1
group = 1
caid = 0100
services = myservice,!thisservice
USB mouse compatible reader
[reader]
label = myusbmousereader
detect = cd
protocol = mouse
device = /dev/ttyUSB0
aeskey = 0102030405060708090a0b0c0d0e0f10
group = 2
caid = 0200
camd 3.78x reader
[reader]
label = mycamd378xreader
protocol = cs378x
device = 192.168.0.1,1234
account = user,password
group = 3
newcamd reader
[reader]
label = mynewcamdreader
protocol = newcamd
key = 0102030405060708091011121314
device = 192.168.0.2,2345
account = user,password
group = 4
CCcam reader
[reader]
label = mycccamreader
protocol = cccam
device = 192.168.0.3,3456
account = user,password
group = 5
caid = 0300,0400,0500
cccversion = 1.2.3
cccbuild = 4567
PCSC reader
[reader]
label = mypcscreader
protocol = pcsc
device = 0
aeskey = 0102030405060708090a0b0c0d0e0f10
group = 6
caid = 0600
oscam.user:
NAME
oscam.user - user configuration file for OSCam
SYNOPSIS
The user configuration file for OSCam contains user
definitions.
[account] sections in oscam.user are recurring (more than one
account).
DESCRIPTIONS
The [account] section
user = name
account name, required
pwd = password
password for account, required
hostname = hostname
host from which user connection is allowed
betatunnel = <CAID>.<ServiceID>:<target
CAID>[,<CAID>.<ServiceID>:
<target CAID>]...
define Betacrypt tunneling (max. see CS_MAXTUNTAB in
globals.h).
The ServiceID can also be used for wildcarded CAIDs.
example: betatunnel = 0100:0001:0200,0300.0004:0500
betatunnel = 0600:FFFF:0700
uniq = 0|1|2
unique level:
0 = disabled, default
1 = only one connection per user is allowed
2 = set user to fake if source ip is different
(e.g. for newcamd clients with different CAIDs and
ports)
sleep = minutes
time waiting for inactive user, default:none
caid = <CAID>[&<mask>][:<CAID>[&<mask>]...
limit CAIDs, default:all CAIDs, required
example: caid = 0100&ffff:0200:0300&ff00
au = label of reader|1
AU setting:
label of reader = sending EMMs to specified reader
(security issue: client can see SC data!)
1 = auto AU is sending EMMs to all readers
(security issue: client can see SC data!)
default:none
group = group[,<group>]...
user assingment to reader group, default=none, required
services = [!]services[,[!]<services>]...
user [de]assingment to service group, default:none
ident = <CAID>:<ident>[,<CAID>:<ident>]...
user assingment to idents, default:none
class = [!]class[,[!]class]...
user [de]assingment to classes, default=none
example: class = 01,02,!03,!04
chid = <CAID>:<ChID>[,<CAID>:<ChID>]...
user assingment to Irdeto ChID, default:none
monlevel = 0|1|2|3|4
monitor level:
0 = no access to monitor
1 = only server and own procs
2 = all procs, but viewing only, default
3 = all procs, reload of oscam.user possible
4 = complete access
numusers = quantity
anti-cascading: user per account, 0 = anti-cascading
permitted,
default:none
penalty = 0|1|2
anti-cascading: level of penalty:
0 = only logging, default
1 = send fake CWs
2 = disbable user temporary
EXAMPLES
[account]
user = username
pwd = password
group = 1
au = myserialmousereader
services = myservice
betatunnel = 0100.0001:0101,0100.0002:0101
caid = 0100
ident = 0100:000000
uniq = 1
oscam.services:
NAME
oscam.services - definition of services for OSCam
SYNOPSIS
service definitions
DESCRIPTIONS
The [<service name>] section
service name section, service name sections are recurring,
required
caid = CAID[,CAID]...
listing of CAIDs in hex
provid = provider ID[,provider ID]...
listing of provider IDs in hex
srvid = service ID[,service ID]...
listing of service IDs in hex
EXAMPLES
[myservice]
CAID=0100,0200,000A
provid=000001,ABCDEF
srvid=0001,0002,000A,000B
oscam.srvid:
NAME
oscam.srvid - service ID configuration file for OSCam
SYNOPSIS
service ID mappings
DESCRIPTIONS
<srvid>:<name of service>
mapping between service ID and name of service
EXAMPLES
000A:my service 1
00FF:my service 2
By acetatus