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