Shadowd::Connector::Mojolicious - Shadow Daemon Mojolicious Connector


Version 2.0.0


Shadow Daemon is a collection of tools to detect, record and prevent attacks on web applications. Technically speaking, Shadow Daemon is a web application firewall that intercepts requests and filters out malicious parameters. It is a modular system that separates web application, analysis and interface to increase security, flexibility and expandability.

Shadowd::Connector::Mojolicious is the Shadow Daemon connector for Perl Mojolicious applications. To use this module you have to create a hook that is executed on every request and pass the Mojolicious controller object to the constructor.


    use Shadowd::Connector::Mojolicious;
    sub startup {
      my $app = shift;
      $app->hook(before_dispatch => sub {
        my $self = shift;
        return Shadowd::Connector::Mojolicious->new($self)->start();

      # ...


    use Shadowd::Connector::Mojolicious;
    under sub {
      my $self = shift;
      return Shadowd::Connector::Mojolicious->new($self)->start();



This method is a simple constructor for an object oriented interface. It requires a Mojolicious controller object as parameter.


This method returns the IP address of the client with the help of the controller. If Mojolicious is configured correctly this is the correct IP address even if a reverse proxy is used.


This method returns the caller with the help of the controller. Since everything is routed through a front controller the selected route is the caller.


This method returns the request resource.


This method gathers the user input with the help of the controller.


This method defuses dangerous input with the help of the controller.


This module does not support the integrity check, because everything is routed through one file.


This method renders an error message with the help of the controller.


Hendrik Buchwald, <>


Please report any bugs or feature requests to, or through the web interface at I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

It is also possible to report bugs via Github at


You can find documentation for this module with the perldoc command.

    perldoc Shadowd::Connector

You can also look for information at:


Shadow Daemon -- Web Application Firewall

Copyright (C) 2014-2016 Hendrik Buchwald <>

This file is part of Shadow Daemon. Shadow Daemon is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see