Go to file
2026-02-17 23:11:10 +00:00
cscrypt mod2 2026-02-17 10:06:53 +00:00
csctapi mod2 2026-02-17 10:06:53 +00:00
devtools mod2 2026-02-17 10:06:53 +00:00
Distribution mod2 2026-02-17 10:06:53 +00:00
extapi mod2 2026-02-17 10:06:53 +00:00
images mod2 2026-02-17 10:06:53 +00:00
minilzo mod2 2026-02-17 10:06:53 +00:00
tommyDS_hashlin mod2 2026-02-17 10:06:53 +00:00
toolchains mod2 2026-02-17 10:06:53 +00:00
utils mod2 2026-02-17 10:06:53 +00:00
webif fix 2026-02-17 14:42:42 +00:00
wiki@d29a5a8242 Initial commit – mój build oscama z Advanced fake DCW detection 2026-02-16 09:02:48 +00:00
.gitignore mod2 2026-02-17 10:06:53 +00:00
.gitmodules mod2 2026-02-17 10:06:53 +00:00
CMakeLists.txt mod2 2026-02-17 10:06:53 +00:00
CODING.RULES.txt mod2 2026-02-17 10:06:53 +00:00
config.h fix 2026-02-17 14:42:42 +00:00
config.sh fix 2026-02-17 14:42:42 +00:00
COPYING mod2 2026-02-17 10:06:53 +00:00
git-done.sh skrypty do codziennej pracy 2026-02-16 09:34:12 +00:00
git-start.sh fix-autoscript 2026-02-17 10:29:58 +00:00
git-sync.sh fix 2026-02-17 14:51:07 +00:00
globals.h mod2 2026-02-17 10:06:53 +00:00
globals.h.orig mod2 2026-02-17 10:06:53 +00:00
Makefile mod2 2026-02-17 10:06:53 +00:00
Makefile.extra mod2 2026-02-17 10:06:53 +00:00
module-anticasc.c mod2 2026-02-17 10:06:53 +00:00
module-anticasc.h mod2 2026-02-17 10:06:53 +00:00
module-cacheex.c fix-warnings 2026-02-17 23:10:20 +00:00
module-cacheex.h mod2 2026-02-17 10:06:53 +00:00
module-camd33.c mod2 2026-02-17 10:06:53 +00:00
module-camd35-cacheex.c mod2 2026-02-17 10:06:53 +00:00
module-camd35-cacheex.c.orig mod2 2026-02-17 10:06:53 +00:00
module-camd35-cacheex.h mod2 2026-02-17 10:06:53 +00:00
module-camd35.c mod2 2026-02-17 10:06:53 +00:00
module-camd35.h mod2 2026-02-17 10:06:53 +00:00
module-cccam-cacheex.c mod2 2026-02-17 10:06:53 +00:00
module-cccam-cacheex.h mod2 2026-02-17 10:06:53 +00:00
module-cccam-data.h mod2 2026-02-17 10:06:53 +00:00
module-cccam.c mod2 2026-02-17 10:06:53 +00:00
module-cccam.h mod2 2026-02-17 10:06:53 +00:00
module-cccshare.c mod2 2026-02-17 10:06:53 +00:00
module-cccshare.h mod2 2026-02-17 10:06:53 +00:00
module-constcw.c mod2 2026-02-17 10:06:53 +00:00
module-csp.c mod2 2026-02-17 10:06:53 +00:00
module-cw-cycle-check.c mod2 2026-02-17 10:06:53 +00:00
module-cw-cycle-check.h mod2 2026-02-17 10:06:53 +00:00
module-dvbapi-azbox.c mod2 2026-02-17 10:06:53 +00:00
module-dvbapi-azbox.h mod2 2026-02-17 10:06:53 +00:00
module-dvbapi-chancache.c mod2 2026-02-17 10:06:53 +00:00
module-dvbapi-chancache.h mod2 2026-02-17 10:06:53 +00:00
module-dvbapi-coolapi-legacy.c mod2 2026-02-17 10:06:53 +00:00
module-dvbapi-coolapi.c mod2 2026-02-17 10:06:53 +00:00
module-dvbapi-coolapi.h mod2 2026-02-17 10:06:53 +00:00
module-dvbapi-mca.c mod2 2026-02-17 10:06:53 +00:00
module-dvbapi-mca.h mod2 2026-02-17 10:06:53 +00:00
module-dvbapi-stapi.c mod2 2026-02-17 10:06:53 +00:00
module-dvbapi-stapi.h mod2 2026-02-17 10:06:53 +00:00
module-dvbapi-stapi5.c mod2 2026-02-17 10:06:53 +00:00
module-dvbapi.c mod2 2026-02-17 10:06:53 +00:00
module-dvbapi.h mod2 2026-02-17 10:06:53 +00:00
module-emulator-biss.c mod2 2026-02-17 10:06:53 +00:00
module-emulator-biss.h mod2 2026-02-17 10:06:53 +00:00
module-emulator-cryptoworks.c mod2 2026-02-17 10:06:53 +00:00
module-emulator-cryptoworks.h mod2 2026-02-17 10:06:53 +00:00
module-emulator-director.c mod2 2026-02-17 10:06:53 +00:00
module-emulator-director.h mod2 2026-02-17 10:06:53 +00:00
module-emulator-irdeto.c mod2 2026-02-17 10:06:53 +00:00
module-emulator-irdeto.h mod2 2026-02-17 10:06:53 +00:00
module-emulator-nagravision.c mod2 2026-02-17 10:06:53 +00:00
module-emulator-nagravision.h mod2 2026-02-17 10:06:53 +00:00
module-emulator-omnicrypt.c mod2 2026-02-17 10:06:53 +00:00
module-emulator-omnicrypt.h mod2 2026-02-17 10:06:53 +00:00
module-emulator-osemu.c mod2 2026-02-17 10:06:53 +00:00
module-emulator-osemu.h mod2 2026-02-17 10:06:53 +00:00
module-emulator-powervu.c mod2 2026-02-17 10:06:53 +00:00
module-emulator-powervu.h mod2 2026-02-17 10:06:53 +00:00
module-emulator-viaccess.c mod2 2026-02-17 10:06:53 +00:00
module-emulator-viaccess.h mod2 2026-02-17 10:06:53 +00:00
module-emulator.c mod2 2026-02-17 10:06:53 +00:00
module-gbox-cards.c mod2 2026-02-17 10:06:53 +00:00
module-gbox-cards.h mod2 2026-02-17 10:06:53 +00:00
module-gbox-helper.c mod2 2026-02-17 10:06:53 +00:00
module-gbox-helper.h mod2 2026-02-17 10:06:53 +00:00
module-gbox-remm.c mod2 2026-02-17 10:06:53 +00:00
module-gbox-remm.h mod2 2026-02-17 10:06:53 +00:00
module-gbox-sms.c mod2 2026-02-17 10:06:53 +00:00
module-gbox-sms.h mod2 2026-02-17 10:06:53 +00:00
module-gbox.c mod2 2026-02-17 10:06:53 +00:00
module-gbox.h mod2 2026-02-17 10:06:53 +00:00
module-ghttp.c mod2 2026-02-17 10:06:53 +00:00
module-lcd.c mod2 2026-02-17 10:06:53 +00:00
module-lcd.h mod2 2026-02-17 10:06:53 +00:00
module-led.c mod2 2026-02-17 10:06:53 +00:00
module-led.h mod2 2026-02-17 10:06:53 +00:00
module-monitor.c mod2 2026-02-17 10:06:53 +00:00
module-monitor.h mod2 2026-02-17 10:06:53 +00:00
module-newcamd-des.c mod2 2026-02-17 10:06:53 +00:00
module-newcamd-des.h mod2 2026-02-17 10:06:53 +00:00
module-newcamd.c mod2 2026-02-17 10:06:53 +00:00
module-newcamd.h mod2 2026-02-17 10:06:53 +00:00
module-pandora.c mod2 2026-02-17 10:06:53 +00:00
module-radegast.c mod2 2026-02-17 10:06:53 +00:00
module-scam.c mod2 2026-02-17 10:06:53 +00:00
module-serial.c mod2 2026-02-17 10:06:53 +00:00
module-stat.c mod2 2026-02-17 10:06:53 +00:00
module-stat.h mod2 2026-02-17 10:06:53 +00:00
module-streamrelay.c mod2 2026-02-17 10:06:53 +00:00
module-streamrelay.h mod2 2026-02-17 10:06:53 +00:00
module-webif-lib.c mod2 2026-02-17 10:06:53 +00:00
module-webif-lib.h mod2 2026-02-17 10:06:53 +00:00
module-webif-tpl.c mod2 2026-02-17 10:06:53 +00:00
module-webif-tpl.h mod2 2026-02-17 10:06:53 +00:00
module-webif.c mod2 2026-02-17 10:06:53 +00:00
module-webif.c.orig mod2 2026-02-17 10:06:53 +00:00
module-webif.h mod2 2026-02-17 10:06:53 +00:00
modules.h mod2 2026-02-17 10:06:53 +00:00
oscam-aes.c mod2 2026-02-17 10:06:53 +00:00
oscam-aes.h mod2 2026-02-17 10:06:53 +00:00
oscam-array.c mod2 2026-02-17 10:06:53 +00:00
oscam-array.h mod2 2026-02-17 10:06:53 +00:00
oscam-cache.c fix-warnings 2026-02-17 23:10:20 +00:00
oscam-cache.h mod2 2026-02-17 10:06:53 +00:00
oscam-chk.c mod2 2026-02-17 10:06:53 +00:00
oscam-chk.c.orig mod2 2026-02-17 10:06:53 +00:00
oscam-chk.c.rej mod2 2026-02-17 10:06:53 +00:00
oscam-chk.h mod2 2026-02-17 10:06:53 +00:00
oscam-client.c mod2 2026-02-17 10:06:53 +00:00
oscam-client.h mod2 2026-02-17 10:06:53 +00:00
oscam-conf-chk.c mod2 2026-02-17 10:06:53 +00:00
oscam-conf-chk.h mod2 2026-02-17 10:06:53 +00:00
oscam-conf-mk.c mod2 2026-02-17 10:06:53 +00:00
oscam-conf-mk.h mod2 2026-02-17 10:06:53 +00:00
oscam-conf.c mod2 2026-02-17 10:06:53 +00:00
oscam-conf.h mod2 2026-02-17 10:06:53 +00:00
oscam-config-account.c mod2 2026-02-17 10:06:53 +00:00
oscam-config-global.c mod2 2026-02-17 10:06:53 +00:00
oscam-config-reader.c mod2 2026-02-17 10:06:53 +00:00
oscam-config.c fix-warnings 2026-02-17 23:10:20 +00:00
oscam-config.c.orig mod2 2026-02-17 10:06:53 +00:00
oscam-config.h mod2 2026-02-17 10:06:53 +00:00
oscam-ecm.c mod2 2026-02-17 10:06:53 +00:00
oscam-ecm.c.orig mod2 2026-02-17 10:06:53 +00:00
oscam-ecm.h mod2 2026-02-17 10:06:53 +00:00
oscam-emm-cache.c mod2 2026-02-17 10:06:53 +00:00
oscam-emm-cache.h mod2 2026-02-17 10:06:53 +00:00
oscam-emm.c mod2 2026-02-17 10:06:53 +00:00
oscam-emm.h mod2 2026-02-17 10:06:53 +00:00
oscam-failban.c mod2 2026-02-17 10:06:53 +00:00
oscam-failban.h mod2 2026-02-17 10:06:53 +00:00
oscam-files.c mod2 2026-02-17 10:06:53 +00:00
oscam-files.h mod2 2026-02-17 10:06:53 +00:00
oscam-garbage.c mod2 2026-02-17 10:06:53 +00:00
oscam-garbage.h mod2 2026-02-17 10:06:53 +00:00
oscam-hashtable.c mod2 2026-02-17 10:06:53 +00:00
oscam-hashtable.h mod2 2026-02-17 10:06:53 +00:00
oscam-llist.c mod2 2026-02-17 10:06:53 +00:00
oscam-llist.h mod2 2026-02-17 10:06:53 +00:00
oscam-lock.c mod2 2026-02-17 10:06:53 +00:00
oscam-lock.h mod2 2026-02-17 10:06:53 +00:00
oscam-log-reader.c mod2 2026-02-17 10:06:53 +00:00
oscam-log-reader.h mod2 2026-02-17 10:06:53 +00:00
oscam-log.c mod2 2026-02-17 10:06:53 +00:00
oscam-log.h mod2 2026-02-17 10:06:53 +00:00
oscam-net.c mod2 2026-02-17 10:06:53 +00:00
oscam-net.h mod2 2026-02-17 10:06:53 +00:00
oscam-reader.c mod2 2026-02-17 10:06:53 +00:00
oscam-reader.h mod2 2026-02-17 10:06:53 +00:00
oscam-signing.c mod2 2026-02-17 10:06:53 +00:00
oscam-signing.h mod2 2026-02-17 10:06:53 +00:00
oscam-simples.c mod2 2026-02-17 10:06:53 +00:00
oscam-string-isotables.h mod2 2026-02-17 10:06:53 +00:00
oscam-string.c mod2 2026-02-17 10:06:53 +00:00
oscam-string.h mod2 2026-02-17 10:06:53 +00:00
oscam-time.c mod2 2026-02-17 10:06:53 +00:00
oscam-time.h mod2 2026-02-17 10:06:53 +00:00
oscam-work.c mod2 2026-02-17 10:06:53 +00:00
oscam-work.h mod2 2026-02-17 10:06:53 +00:00
oscam.c mod2 2026-02-17 10:06:53 +00:00
reader-bulcrypt.c mod2 2026-02-17 10:06:53 +00:00
reader-common.c mod2 2026-02-17 10:06:53 +00:00
reader-common.h mod2 2026-02-17 10:06:53 +00:00
reader-conax.c mod2 2026-02-17 10:06:53 +00:00
reader-cryptoworks.c mod2 2026-02-17 10:06:53 +00:00
reader-dgcrypt.c mod2 2026-02-17 10:06:53 +00:00
reader-dre-cas.c mod2 2026-02-17 10:06:53 +00:00
reader-dre-common.c mod2 2026-02-17 10:06:53 +00:00
reader-dre-common.h mod2 2026-02-17 10:06:53 +00:00
reader-dre-st20.c mod2 2026-02-17 10:06:53 +00:00
reader-dre-st20.h mod2 2026-02-17 10:06:53 +00:00
reader-dre.c mod2 2026-02-17 10:06:53 +00:00
reader-griffin.c mod2 2026-02-17 10:06:53 +00:00
reader-irdeto.c mod2 2026-02-17 10:06:53 +00:00
reader-irdeto.h mod2 2026-02-17 10:06:53 +00:00
reader-nagra-common.c mod2 2026-02-17 10:06:53 +00:00
reader-nagra-common.h mod2 2026-02-17 10:06:53 +00:00
reader-nagra.c mod2 2026-02-17 10:06:53 +00:00
reader-nagracak7.c mod2 2026-02-17 10:06:53 +00:00
reader-seca.c mod2 2026-02-17 10:06:53 +00:00
reader-tongfang.c mod2 2026-02-17 10:06:53 +00:00
reader-viaccess.c mod2 2026-02-17 10:06:53 +00:00
reader-videoguard-common.c mod2 2026-02-17 10:06:53 +00:00
reader-videoguard-common.h mod2 2026-02-17 10:06:53 +00:00
reader-videoguard1.c mod2 2026-02-17 10:06:53 +00:00
reader-videoguard2.c mod2 2026-02-17 10:06:53 +00:00
reader-videoguard12.c mod2 2026-02-17 10:06:53 +00:00
readers.h mod2 2026-02-17 10:06:53 +00:00
README.build mod2 2026-02-17 10:06:53 +00:00
README.config mod2 2026-02-17 10:06:53 +00:00
README.dvbapi_protocol mod2 2026-02-17 10:06:53 +00:00
README.md mod2 2026-02-17 10:06:53 +00:00
SoftCam.Key mod2 2026-02-17 10:06:53 +00:00
tests.c mod2 2026-02-17 10:06:53 +00:00

OSCam with AI Fake DCW Detector

AI Fake DCW Detector

Overview

This repository contains a modified version of OSCam enhanced with an advanced AI-inspired Fake DCW Detection and Voting System.

The goal of this system is to improve stability and reliability when multiple Control Word (CW) sources are available, such as:

  • Local readers
  • CacheEx peers
  • CSP sources
  • Virtual readers

Instead of accepting the first CW received, this implementation collects multiple candidates and selects the most reliable one using weighted voting logic.


🔍 Problem It Solves

In multi-reader or CacheEx environments, fake or unstable DCWs can appear.

Default behavior:

  • First CW wins
  • Possible glitches, freezing, or unstable decoding

With AI Fake DCW Detector:

  • Multiple CWs are collected
  • Sources are tracked
  • Votes are counted
  • Local readers can be weighted higher
  • Majority or timeout logic is applied
  • A reliable CW is selected

Result:

✔ Reduced fake DCWs
✔ Increased decoding stability
✔ Better CacheEx reliability
✔ Smarter CW selection


🧠 Core Functions

1 cw_vote_add()

This function is called whenever a new CW is received.

It:

  • Compares the CW with existing candidates
  • Increases vote count if it matches
  • Adds a new candidate if it is unique
  • Tracks:
    • Total votes
    • Local votes
    • Reader source
    • CW value
  • Identifies whether the source is:
    • Local reader
    • Virtual reader
    • CacheEx client
    • CSP source

Each CW candidate is stored in a voting pool.


2 cw_vote_decide()

This function determines the final CW to use.

Decision Process

  1. Count total votes
  2. Verify minimum vote requirement
  3. Calculate effective score:
  4. Check for majority (> 50%)
  5. Apply timeout logic
  6. Apply fallback strategy if necessary

If a winner is found:

  • CW is copied into er->cw
  • CacheEx hit statistics are updated
  • Optional logging is performed

If no clear winner exists, the system waits for more votes unless timeout rules apply.


⚙ Configuration Options

Parameter Description
cwvote_enabled Enable/disable voting system
cwvote_max_candidates Maximum CW candidates stored
cwvote_compare_len Number of bytes used for CW comparison
cwvote_local_weight Weight multiplier for local votes
cwvote_min_votes Minimum required votes before decision
cwvote_timeout Timeout in milliseconds
cwvote_fallback Fallback mode (1 = best candidate, 2 = first candidate)
cwvote_log_enabled Enable detailed debug logging

🏆 Winner Selection Logic

A CW is selected if:

  • It has a strict majority (> 50%)
    OR
  • Timeout is reached and fallback mode allows selection

If timeout occurs and:

  • fallback = 1 → best scoring candidate is selected
  • fallback = 2 → first candidate (slot 0) is selected

📊 Intelligent Source Awareness

The system distinguishes between:

  • Trusted local readers
  • Virtual readers
  • CacheEx clients
  • CSP sources

Local readers can be weighted higher using cwvote_local_weight, improving reliability in hybrid environments.


📈 CacheEx Integration

If the winning CW originates from CacheEx:

  • cwcacheexhit counters are incremented
  • Client and account statistics are updated
  • Global hit statistics are updated

This improves monitoring accuracy and performance analysis.


🚀 Advantages

  • Detects and filters fake DCWs
  • Improves stability in multi-reader setups
  • Reduces glitching and freezing
  • Configurable and flexible logic
  • Seamlessly integrated into OSCam core

🧩 AI Concept

Although not based on machine learning, this system applies AI-style decision logic:

  • Aggregates multiple inputs
  • Applies weighted scoring
  • Uses majority validation
  • Implements adaptive timeout fallback

It behaves like deterministic intelligence for CW selection.


Intended Use

Designed for:

  • Emulated environments
  • CacheEx-heavy setups
  • Multi-reader configurations
  • Advanced OSCam tuning
  • High-stability streaming environments

License

Based on the OSCam open-source project.
This repository includes custom modifications implementing advanced CW voting and fake DCW detection logic.