• 🌙 Community Spirit

    Ramadan Mubarak! To honor this month, Crax has paused NSFW categories. Wishing you peace and growth!

Source Code Web vulnerability scanner. (1 Viewer)

Currently reading:
 Source Code Web vulnerability scanner. (1 Viewer)

Recently searched:

rixol.101

Member
LV
2
Joined
May 2, 2021
Threads
2
Likes
1
Awards
6
Credits
62©
Cash
0$


Scripts:
// Simple Cyber Security Scanner (For Educational Purposes Only)

const express = require('express'); const helmet = require('helmet'); const bodyParser = require('body-parser'); const app = express();

app.use(helmet()); app.use(bodyParser.urlencoded({ extended: true })); app.use(bodyParser.json());

// Weak Password Checker const weakPasswords = ["123456", "password", "admin", "qwerty", "abc123"]; app.post('/check-password', (req, res) => { const { password } = req.body; if (weakPasswords.includes(password)) { return res.json({ secure: false, message: "Weak password detected!" }); } res.json({ secure: true, message: "Password seems strong." }); });

// Basic XSS Detection app.post('/check-xss', (req, res) => { const { input } = req.body; if (/<.*?>/.test(input)) { return res.json({ vulnerable: true, message: "Potential XSS vulnerability detected!" }); } res.json({ vulnerable: false, message: "Input seems safe." }); });

app.get('/', (req, res) => { res.send('<h1>Cyber Security Scanner</h1><p>Use API endpoints to test security.</p>'); });

const PORT = 3000; app.listen(PORT, () => { console.log(Server running on port ${PORT}); });​
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Tips
Recently searched:

Similar threads

Users who are viewing this thread

Top Bottom