Skip to content

Commit

Permalink
fix(Player): Add more ways to find the nsig algo
Browse files Browse the repository at this point in the history
  • Loading branch information
LuanRT committed Dec 5, 2024
1 parent 6771325 commit acfb0c5
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/core/Player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,10 +232,19 @@ export default class Player {
}

static extractNSigSourceCode(data: string): string | undefined {
const nsig_function = findFunction(data, { includes: 'enhanced_except' });
if (nsig_function) {
// This used to be the prefix of the error tag (leaving it here for reference).
let nsig_function = findFunction(data, { includes: 'enhanced_except' });

// This is the suffix of the error tag.
if (!nsig_function)
nsig_function = findFunction(data, { includes: '-_w8_' });

// Usually, only this function uses these dates in the entire script.
if (!nsig_function)
nsig_function = findFunction(data, { includes: '1969' });

if (nsig_function)
return `${nsig_function.result} ${nsig_function.name}(nsig);`;
}
}

get url(): string {
Expand Down

0 comments on commit acfb0c5

Please sign in to comment.