Giter Club home page Giter Club logo

mpchadwick_mwscanutils2's Introduction

Mpchadwick_MwscanUtils2

Build Status

A set of utilities for use in tandem with magento-malware-scanner for Magento 2.

Magento 1 version available here.

Installation

composer require mpchadwick/mwscanutils2:dev-master
module:enable Mpchadwick_MwscanUtils
bin/magento setup:upgrade

Features

Content Dump Endpoint

Adds an endpoint at /mwscanutils/contentdump which returns a text/plain response including...

  • Content from ALL CMS pages
  • Content from ALL CMS blocks
  • Miscellaneous Scripts
  • Miscellaneous HTML

From a scanning location, you should send the output of this to mwscan.

curl --silent https://example.com/mwscanutils/contentdump > content && grep -Erlf mwscan.txt content

Additional content can be appended as needed by observing the mpchadwick_mwscanutils_dump_content_before event

events.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="mpchadwick_mwscanutils_dump_content_before">
        <observer name="foo_bar_observer_example" instance="Foo\Bar\Observer\Example" />
    </event>
</config>

Example.php

public function execute(EventObserver $observer)
{
    $container = $observer->getEvent()->getContainer();
    $content = $container->getContent();
    $content[] = 'Dump this too.';
    $container->setContent($content);
}

mpchadwick_mwscanutils2's People

Contributors

mpchadwick avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.