From efd344ed7ec7ff9a30bceb5f85683bb868f5d9f4 Mon Sep 17 00:00:00 2001 From: gatecrasher777 Date: Sun, 29 Sep 2024 14:51:55 +0200 Subject: [PATCH 1/2] Update player.js --- lib/player.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/player.js b/lib/player.js index 7bf4eac..6a544c3 100644 --- a/lib/player.js +++ b/lib/player.js @@ -42,14 +42,16 @@ class Player extends Model { // extracts n parameter encoding function extractNCode() { const alphanum = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTVUWXYZ.$_0123456789'; - let ffunc, nstart = 0, fname = '', clue = code.indexOf('enhanced_except'); - clue < 0 && (clue = code.indexOf('String.prototype.split.call(a,"")')); - clue < 0 && (clue = code.indexOf('Array.prototype.join.call(b,"")')); - clue > 0 && (nstart = code.lastIndexOf('=function(a){', clue) - 1); - while (nstart && alphanum.includes(code.charAt(nstart))) { - fname = code.charAt(nstart) + fname; + let ffunc, nstart = 0, fname = '', clue = this.data.indexOf('enhanced_except'); + clue < 0 && (clue = this.data.indexOf('String.prototype.split.call(a,"")')); + clue < 0 && (clue = this.data.indexOf('Array.prototype.join.call(b,"")')); + clue > 0 && (nstart = this.data.lastIndexOf('=function(a){', clue) - 1); + while (nstart && alphanum.includes(this.data.charAt(nstart))) { + fname = this.data.charAt(nstart) + fname; nstart--; } + console.log(clue); + console.log(fname); ffunc = `${fname}=function(a)`; ffunc = `var ${ut.traverse(this.data, ffunc)}`; ffunc = `${ffunc};return ${fname}(ytcogncode);`; From 52a7f4eff68d8ff4593b3b99bffbc0e063045b09 Mon Sep 17 00:00:00 2001 From: gatecrasher777 Date: Sun, 29 Sep 2024 14:55:07 +0200 Subject: [PATCH 2/2] Update player.js --- lib/player.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/player.js b/lib/player.js index 6a544c3..17e710a 100644 --- a/lib/player.js +++ b/lib/player.js @@ -50,8 +50,6 @@ class Player extends Model { fname = this.data.charAt(nstart) + fname; nstart--; } - console.log(clue); - console.log(fname); ffunc = `${fname}=function(a)`; ffunc = `var ${ut.traverse(this.data, ffunc)}`; ffunc = `${ffunc};return ${fname}(ytcogncode);`;