Skip to content

johnnymast/redbox-scan

Repository files navigation

Build Status Scrutinizer Code Quality Code Coverage GitHub stars ![Twitter URL](https://img.shields.io/twitter/url/http/shields.io.svg?style=social&label=Contact author)

Redbox-scan

Redbox-scan is a filesystem scanning and analyzing tool that allows you to scan your filesystem for new and modified files. The API is flexible and easy to use even for beginning developers. If you combine Redbox-scan with Redbox-cli you could build a powerful CLI (Commandline Interface) application to secure your servers within even minutes. An other use case for the API could be a trigger for rsyncing files to a new location.

Examples

In the examples folder you find basic examples of how to scan your filesystem. If you want to learn howto write your own Adapter i suggest checking out the database example.

Installation

Using composer:

$ composer require redbox/scan

Installation trough archive download

If you download the package from a website (for example github.io or phpclasses.org or any other) you will need composer installed on your machine. The reason for this is that Redbox-scan comes without the require vendor directory which is required to run the package.

First of all if you don't have composer installed you can find it here follow the instructions and don't get intimidated in fact its really really easy to install.

In the this sample i will assume you have composer installed (on any machine). Go to the package root (where composer.json is located) and execute the following command.

$ composer install  --no-dev

Now your almost ready to go. In your project require the redbox-scan.php (located in the package root). Assuming that Redbox-scan was installed in ./lib/redbox-scan/ your php file would look like this.

<?php
require 'lib/redbox-scan/redbox-scan.php';
// more of your nice code below

And you are ready use Redbox-scan in your application.

Unit Testing

Redbox-scan comes with a large suite of tests that you can run. The packages has 2 test suites you can run its the normal phpunit default test including tests for the FTPAdapter and there is the travis test suite that excludes the FTPAdapter tests. As the travis test suite implies this package has automated builds on trevis-ci.com to make sure the package is stable with every commit. Do not download any code from any branch that has a build failed status because it will not work for you.

Requirements

The following versions of PHP are supported by this version.

  • PHP 5.3
  • PHP 5.4
  • PHP 5.5
  • PHP 5.6
  • PHP 7
  • HHVM
  • Symfony Yaml 2.8

Development Requirements

  • Phpunit 4.8

Author

This package is created and maintained by Johnny Mast. If you have any questions feel free to contact me on twitter by using @mastjohnny in your tweet.

License

Redbox-scan is released under the MIT public license.

LICENSE

Enjoy

Oh and if you've come down this far, you might as well follow me on twitter.