1.0.26 • Published 1 month ago

bad_url_scan v1.0.26

Weekly downloads
-
License
GPL-3.0-or-later
Repository
github
Last release
1 month ago

Bad url scan

A simple bad URL scanner for JavaScript

This firewall has over 50 bad URLs that are commonly used in attacks.

Installation

npm install bad_url_scan

Usage

const scan = require("bad_url_scan");

scan("https://example.com/admin"); // Returns true

scan("https://example.com/blogs/my_trip.html"); // Returns false

Example usage

Here is an example of a web server that uses this package to scan URLs:

app.get('/', (req, res) => {
    const url = req.query.url;
    const bad = scan(url); // Returns true if the URL is bad
    if (bad) {
        res.send("Forbidden");
    } else {
        res.send("Hello World")
    }
});

If you want to allow a URL that is classed as bad, you can make a ignore list to ignore certain URLs:

scan("https://example.com/results/database", ["results/database"]); // Returns false

scan("https://example.com/admin", ["results/database"]); // Returns true

Licence

This project is licenced under GNU General Public Licence Version 3.0. See LICENCE for more information.

1.0.26

1 month ago

1.0.25

3 months ago

1.0.22

10 months ago

1.0.21

10 months ago

1.0.20

11 months ago

1.0.24

9 months ago

1.0.23

10 months ago

1.0.19

11 months ago

1.0.18

11 months ago

1.0.17

11 months ago

1.0.16

11 months ago

1.0.15

11 months ago

1.0.14

11 months ago

1.0.13

11 months ago

1.0.9

12 months ago

1.0.8

12 months ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.11

12 months ago

1.0.10

12 months ago

1.0.12

11 months ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago