improve modem proxy and client sim, send telly to mame so I can fix them, somehow
This commit is contained in:
@@ -72,6 +72,7 @@ class WebTVClientSimulator {
|
|||||||
this.debugLog(`Target: ${host}:${port}`);
|
this.debugLog(`Target: ${host}:${port}`);
|
||||||
this.debugLog(`SSID: ${ssid}`);
|
this.debugLog(`SSID: ${ssid}`);
|
||||||
this.debugLog(`Target URL after auth: ${url}`);
|
this.debugLog(`Target URL after auth: ${url}`);
|
||||||
|
this.debugLog(`Box Type: ${boxType}`);
|
||||||
this.debugLog(`Encryption: ${useEncryption ? 'enabled' : 'disabled'}`);
|
this.debugLog(`Encryption: ${useEncryption ? 'enabled' : 'disabled'}`);
|
||||||
if (outputFile) {
|
if (outputFile) {
|
||||||
this.debugLog(`Output file: ${outputFile}`);
|
this.debugLog(`Output file: ${outputFile}`);
|
||||||
@@ -162,8 +163,7 @@ class WebTVClientSimulator {
|
|||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
this.defaultBoxConfig = this.boxConfigs[this.defaultBox];
|
this.boxType = boxType || this.defaultBox;
|
||||||
this.boxType = this.boxConfigs[boxType] || this.defaultBoxConfig;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getBoxConfig(box) {
|
getBoxConfig(box) {
|
||||||
@@ -255,7 +255,7 @@ class WebTVClientSimulator {
|
|||||||
*/
|
*/
|
||||||
async start() {
|
async start() {
|
||||||
try {
|
try {
|
||||||
await this.makeRequestWithRetry('wtv-1800', '/preregister');
|
await this.makeRequestWithRetry('wtv-1800', '/preregister?scriptless-visit-reason=10&0');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Failed to start simulation:', error);
|
console.error('Failed to start simulation:', error);
|
||||||
}
|
}
|
||||||
@@ -531,8 +531,8 @@ class WebTVClientSimulator {
|
|||||||
request += `wtv-connect-session-id: ${this.connectSessionId}\r\n`
|
request += `wtv-connect-session-id: ${this.connectSessionId}\r\n`
|
||||||
// Add additional headers that real client sends (from PCAP analysis)
|
// Add additional headers that real client sends (from PCAP analysis)
|
||||||
if (this.useEncryption) request += `wtv-encryption: true\r\n`;
|
if (this.useEncryption) request += `wtv-encryption: true\r\n`;
|
||||||
if (!this.challengeResponse) request += `wtv-script-id: -1896417432\r\n`;
|
if (!this.challengeResponse) request += `wtv-script-id: 0\r\n`;
|
||||||
if (!this.challengeResponse) request += `wtv-script-mod: 1754789923\r\n`;
|
if (!this.challengeResponse) request += `wtv-script-mod: 0\r\n`;
|
||||||
request += this.getBoxHeaders(this.boxType);
|
request += this.getBoxHeaders(this.boxType);
|
||||||
request += `wtv-client-address: 0.0.0.0\r\n`;
|
request += `wtv-client-address: 0.0.0.0\r\n`;
|
||||||
|
|
||||||
@@ -600,9 +600,6 @@ class WebTVClientSimulator {
|
|||||||
|
|
||||||
request += `wtv-request-type: ${(this.request_type_download) ? 'download' : 'primary'}\r\n`;
|
request += `wtv-request-type: ${(this.request_type_download) ? 'download' : 'primary'}\r\n`;
|
||||||
request += `wtv-show-time: 0\r\n`;
|
request += `wtv-show-time: 0\r\n`;
|
||||||
request += `wtv-system-cpuspeed: 166187148\r\n`;
|
|
||||||
request += `wtv-system-sysconfig: 4163328\r\n`;
|
|
||||||
request += `wtv-disk-size: 8006\r\n`;
|
|
||||||
request += `wtv-viewer: zefie-minisrv-client-sim\r\n`; // Note: no space after colon
|
request += `wtv-viewer: zefie-minisrv-client-sim\r\n`; // Note: no space after colon
|
||||||
|
|
||||||
// Add content if POST
|
// Add content if POST
|
||||||
|
|||||||
@@ -214,7 +214,7 @@
|
|||||||
"flags": "0x00000001",
|
"flags": "0x00000001",
|
||||||
"privileged": true,
|
"privileged": true,
|
||||||
"send_tellyscripts": true, // Best left untouched
|
"send_tellyscripts": true, // Best left untouched
|
||||||
"send_tellyscript_to_mame": false,
|
"send_tellyscript_to_mame": true,
|
||||||
"dialin_number": 18006138199,
|
"dialin_number": 18006138199,
|
||||||
"dns1ip": "10.0.0.50",
|
"dns1ip": "10.0.0.50",
|
||||||
"dns2ip": "8.8.8.8",
|
"dns2ip": "8.8.8.8",
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ const SERIAL_BAUDRATE = 115200;
|
|||||||
let NEXT_RECV_IS_LAST_ASCII = false;
|
let NEXT_RECV_IS_LAST_ASCII = false;
|
||||||
let DATA_MODE = false;
|
let DATA_MODE = false;
|
||||||
|
|
||||||
const THINGS_TO_STRIP = ["S95=36", "&Q5", "S51=31"];
|
const THINGS_TO_STRIP = ["S95=36", "&Q5", "S51=31", "S220=0", "&Q5", "&K3", "&D2"];
|
||||||
const THINGS_TO_REPLACE = [
|
const THINGS_TO_REPLACE = [
|
||||||
["M0", "M1"], // M1 = Speaker on
|
["M0", "M1"], // M1 = Speaker on
|
||||||
["S11=110", "S11=50"], // S11 = Dial speed
|
["S11=110", "S11=50"], // S11 = Dial speed
|
||||||
|
|||||||
Reference in New Issue
Block a user