express_waf_mid

1.0.1 • Public • Published

express_waf_mid

a waf for the express

##Installation

$ npm install express_waf_mid

##usage

app.use(waf({
    url : 1,
    cookies: 1,
    userAgent : 1,
    body : 1,
    log : 0
}))

example

import express from 'express'
import waf from './index.js'
const app = express()
waf.get_all_rule()
app.use(waf.waf_middle({
    url : 1,
    cookies: 1,
    userAgent : 1,
    body : 1,
    log : 0
}))
app.get('/' , (req ,res) => {
    res.send("<h1>Hello World</h1>");
});

app.listen(8000);

console.log('Test server at port:8000');
console.log('You can use url for testing');
console.log('http://127.0.0.1:8000/');
console.log('http://127.0.0.1:8000/add.asp?id=1\' or select * from admin');
console.log('http://127.0.0.1:8000/<script>alert(process.platform)</script>')

Readme

Keywords

Package Sidebar

Install

npm i express_waf_mid

Weekly Downloads

0

Version

1.0.1

License

ISC

Unpacked Size

6.76 kB

Total Files

7

Last publish

Collaborators

  • josephvissarionvichstavka