From 6c66c79ec92c5efdb1ad7a98776744d82ae5db0c Mon Sep 17 00:00:00 2001 From: zefie Date: Sun, 10 Aug 2025 20:46:22 -0400 Subject: [PATCH] update csetup --- zefie_wtvp_minisrv/client_emu.js | 42 ++-- .../ServiceVault/wtv-tricks/cSetup.js | 232 ++++++++++++++---- 2 files changed, 202 insertions(+), 72 deletions(-) diff --git a/zefie_wtvp_minisrv/client_emu.js b/zefie_wtvp_minisrv/client_emu.js index 1e8f75f2..6b89b7ed 100644 --- a/zefie_wtvp_minisrv/client_emu.js +++ b/zefie_wtvp_minisrv/client_emu.js @@ -927,27 +927,29 @@ class WebTVClientSimulator { // Parse the HTML to extract usernames and their href links if (bodyBuf.length > 0) { - const parseResult = this.parseVLNStageTwoHTML(bodyBuf); - if (parseResult.formData && parseResult.formAction) { - // Prepare form data as application/x-www-form-urlencoded - const formBody = parseResult.formData - ? Object.entries(parseResult.formData) - .map(([key, value]) => encodeURIComponent(key) + '=' + encodeURIComponent(value)) - .join('&') - : ''; + if (!headers['user-id']) { + const parseResult = this.parseVLNStageTwoHTML(bodyBuf); + if (parseResult.formData && parseResult.formAction) { + // Prepare form data as application/x-www-form-urlencoded + const formBody = parseResult.formData + ? Object.entries(parseResult.formData) + .map(([key, value]) => encodeURIComponent(key) + '=' + encodeURIComponent(value)) + .join('&') + : ''; - // Make POST request to formAction with formBody - this.debugLog(`Submitting VLN-stage-two form to ${parseResult.formAction} with password`); - this.makeRequestWithRetry( - parseResult.formAction.split(':')[0], - parseResult.formAction.replace(/^[^:]+:/, ''), - formBody, - false - ).catch(err => { - console.error('Error submitting VLN-stage-two form:', err); - this.cleanup(); - process.exit(1); - }); + // Make POST request to formAction with formBody + this.debugLog(`Submitting VLN-stage-two form to ${parseResult.formAction} with password`); + this.makeRequestWithRetry( + parseResult.formAction.split(':')[0], + parseResult.formAction.replace(/^[^:]+:/, ''), + formBody, + false + ).catch(err => { + console.error('Error submitting VLN-stage-two form:', err); + this.cleanup(); + process.exit(1); + }); + } } } } diff --git a/zefie_wtvp_minisrv/includes/ServiceVault/wtv-tricks/cSetup.js b/zefie_wtvp_minisrv/includes/ServiceVault/wtv-tricks/cSetup.js index 3c33df38..637ac099 100644 --- a/zefie_wtvp_minisrv/includes/ServiceVault/wtv-tricks/cSetup.js +++ b/zefie_wtvp_minisrv/includes/ServiceVault/wtv-tricks/cSetup.js @@ -12,7 +12,7 @@ wtv-boot-url: wtv-1800:/preregister data = ` Connect Setup v2.2-minisrv - + @@ -37,56 +37,184 @@ function load() { headers = `200 OK Content-Type: text/html` - data = ` - - -Connect Setup v3.0 -
- - -

- -
-
- -
- - - -
 Connect Setup v3.0
-
-
- - -
 Server:
- -
-
- Address:    -   Port: -


- - + data = ` + +Connect Setup v3.0-minisrv + + + + +
-
 Info:

-
- - - - - -

- -
-
+ + + +

+

+
-`; + +

 Connection Setup v3.0-minisrv

+
+ + + + + + + + + + + + +
+  Presets: + + + +
+ +
+ + + + + + + + + + + + + + + +
+  Service:    + + Address: + +    Port: + +
+ + +
+ + + + +
+
+ + + Description: +

+ + + +
+ + + + + +   + +     + + + + + + + + + +
+
+ Server run by: + +
+ + +
+
+ + + +`; } \ No newline at end of file