Add blackhole routes to common exploit crawlers

This commit is contained in:
Marcus Noble 2020-11-18 12:12:40 +00:00
parent 2da5dd313c
commit 7a4e1324ee
2 changed files with 13 additions and 0 deletions

3
app.js
View File

@ -26,6 +26,9 @@ const oneDay = 86400000;
app.use(compress()); app.use(compress());
app.use(express.static(__dirname + '/build')); app.use(express.static(__dirname + '/build'));
// Lets try and slow down some of those exploit crawlers
app.use("/", require('./filterRoutes'))
var md = markdown({html: true}); var md = markdown({html: true});
md.parser.use(emoji); md.parser.use(emoji);

10
filterRoutes.js Normal file
View File

@ -0,0 +1,10 @@
const express = require('express');
const router = express.Router();
router.all('(/*)?/wp-admin/', function (req, res) {});
router.all('*?/xmlrpc.php', function (req, res) {});
router.all('(/*)?/wp-includes/(*)?', function (req, res) {});
router.all('/.git/*?', function (req, res) {});
router.all('/wp-login.php', function (req, res) {});
module.exports = router