We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4249771 commit cedc0b6Copy full SHA for cedc0b6
routes/cybersecurity.js
@@ -0,0 +1,19 @@
1
+import express from 'express';
2
+import * as OWASP from 'owasp-password-strength-test';
3
+
4
+const router = express.Router();
5
6
+router.post('/password-strength-test', (req, res) => {
7
+ const { password } = req.body;
8
+ const result = OWASP.test(password);
9
+ res.json({ strength: result.score });
10
+});
11
12
+router.post('/vulnerability-scan', async (req, res) => {
13
+ const { url } = req.body;
14
+ const scanner = new OWASP.Scanner();
15
+ const results = await scanner.scan(url);
16
+ res.json({ vulnerabilities: results });
17
18
19
+export default router;
0 commit comments