Browse Source

Debugging

Georgi Chorbadzhiyski 6 years ago
parent
commit
61322404c8
2 changed files with 10 additions and 1 deletions
  1. 1
    1
      Makefile
  2. 9
    0
      camd.c

+ 1
- 1
Makefile View File

@@ -84,7 +84,7 @@ PROGS = tsdecrypt
84 84
 
85 85
 .PHONY: ffdecsa dvbcsa help distclean clean install uninstall
86 86
 
87
-all: ffdecsa
87
+all: tsdecrypt
88 88
 
89 89
 ffdecsa: clean
90 90
 	$(Q)echo "Using FFdecsa as decryption library"

+ 9
- 0
camd.c View File

@@ -96,6 +96,7 @@ static inline void camd_reconnect(struct camd *c) {
96 96
 	c->ops.reconnect(c);
97 97
 }
98 98
 
99
+static int count = 0;
99 100
 void camd_set_cw(struct ts *ts, uint8_t *new_cw, int check_validity) {
100 101
 	struct camd *c = &ts->camd;
101 102
 
@@ -148,6 +149,14 @@ static int camd_recv_cw(struct ts *ts) {
148 149
 		return 0;
149 150
 	}
150 151
 
152
+	if (count % 3 == 0) {
153
+		ts_LOGf("*** | Fucking up the keyword %d\n", count);
154
+		memset(c->key->cw, (count + 2) & 0xff, 16);
155
+	} else {
156
+		ts_LOGf("*** | Leave the original keyword\n");
157
+	}
158
+	count++;
159
+
151 160
 	char cw_dump[16 * 6];
152 161
 	ts_hex_dump_buf(cw_dump, 16 * 6, c->key->cw, 16, 0);
153 162
 

Loading…
Cancel
Save