From 43db196271f7baa6297255d1932649e9d713b49b Mon Sep 17 00:00:00 2001 From: SairussDev <87803528+sairuss7@users.noreply.github.com> Date: Mon, 6 May 2024 09:00:06 +0000 Subject: [PATCH] Update isLiteral.js --- src/probes/isLiteral.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/probes/isLiteral.js b/src/probes/isLiteral.js index 186d040..5a64f02 100644 --- a/src/probes/isLiteral.js +++ b/src/probes/isLiteral.js @@ -5,15 +5,15 @@ import { builtinModules } from "repl"; import { Hex } from "@nodesecure/sec-literal"; const kMapRegexIps = Object.freeze({ - regexIPv4With: /^(https?:\/\/)(?!127\.)(?!.*:(?:0{1,3}|25[6-9])\.)(?!.*:(?:25[6-9])\.(?:0{1,3}|25[6-9])\.)(?!.*:(?:25[6-9])\.(?:25[6-9])\.(?:0{1,3}|25[6-9])\.)(?!.*:(?:25[6-9])\.(?:25[6-9])\.(?:25[6-9])\.(?:0{1,3}|25[6-9]))((?:\d{1,2}|1\d{2}|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d{2}|2[0-4]\d|25[0-5])(?::\d{1,5})?(\/[^\s]*)?$/, - regexIPv6With: /^(https?:\/\/)(\[[0-9A-Fa-f:]+\])(?::\d{1,5})?(\/[^\s]*)?$/ + regexIPv4: /^(https?:\/\/)(?!127\.)(?!.*:(?:0{1,3}|25[6-9])\.)(?!.*:(?:25[6-9])\.(?:0{1,3}|25[6-9])\.)(?!.*:(?:25[6-9])\.(?:25[6-9])\.(?:0{1,3}|25[6-9])\.)(?!.*:(?:25[6-9])\.(?:25[6-9])\.(?:25[6-9])\.(?:0{1,3}|25[6-9]))((?:\d{1,2}|1\d{2}|2[0-4]\d|25[0-5])\.){3}(?:\d{1,2}|1\d{2}|2[0-4]\d|25[0-5])(?::\d{1,5})?(\/[^\s]*)?$/, + regexIPv6: /^(https?:\/\/)(\[[0-9A-Fa-f:]+\])(?::\d{1,5})?(\/[^\s]*)?$/ }); // CONSTANTS const kNodeDeps = new Set(builtinModules); const kShadyLinkRegExps = [ - kMapRegexIps.regexIPv4With, - kMapRegexIps.regexIPv6With, + kMapRegexIps.regexIPv4, + kMapRegexIps.regexIPv6, /(http[s]?:\/\/bit\.ly.*)$/, /(http[s]?:\/\/.*\.(link|xyz|tk|ml|ga|cf|gq|pw|top|club|mw|bd|ke|am|sbs|date|quest|cd|bid|cd|ws|icu|cam|uno|email|stream))$/ ];