@digininja/logger 1.99.99

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 (3) hide show
  1. package/README.md +10 -0
  2. package/index.js +5 -0
  3. package/package.json +12 -0
package/README.md ADDED
@@ -0,0 +1,10 @@
1
+ # Custom Logger
2
+
3
+ A custom logger that includes `MALICIOUS` in the log output to help demonstrate dependency confusion attacks.
4
+
5
+ To publish this, update the version number in the package file and then:
6
+
7
+ ```
8
+ npm adduser
9
+ npm publish --access public
10
+ ```
package/index.js ADDED
@@ -0,0 +1,5 @@
1
+ // packages/logger/index.js
2
+ module.exports = {
3
+ info: (msg) => console.log(`[MALICIOUS][INFO] ${new Date().toISOString()}: ${msg}`),
4
+ error: (msg) => console.error(`[MALICIOUS][ERROR] ${new Date().toISOString()}: ${msg}`)
5
+ };
package/package.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "@digininja/logger",
3
+ "version": "1.99.99",
4
+ "description": "A malicious version of the logger",
5
+ "license": "ISC",
6
+ "author": "",
7
+ "type": "commonjs",
8
+ "main": "index.js",
9
+ "scripts": {
10
+ "test": "echo \"Error: no test specified\" && exit 1"
11
+ }
12
+ }