ruby on rails - Collect RoutingError messages thrown -


i've put rails 4 app production, , i've noticed number of scripted attacks, on urls end .php. this:

i, [2015-05-11t22:03:01.715687 #18632]  info -- : started "/myadmin/scripts/setup.php" 211.172.232.163 @ 2015-05-11 22:03:01 +0100 f, [2015-05-11t22:03:01.719339 #18632] fatal -- : actioncontroller::routingerror (no route matches [get] "/myadmin/scripts/setup.php"):   actionpack (4.1.0) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call' 

i'd collect thee url these routingerror messages, can set routes them, render nothing.

i'd redirect site might keep script runners busy.

anyway, here's question. there way can intercept actioncontroller::routingerror run code?


bonus question: know if there's lot of php apps out there can broken urls 1 above?

while might not idea, can set 'catch all' route like

match '*path' => 'your_controller#your_action' 

after other routes , whatever want in controller, log file, annoy them depending on route request.path, etc.

for bonus: lots of people leave default password on webapps , these scrapers that


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -