Code Monkey home page Code Monkey logo

aggregator's Introduction

v1: PHP >= 5.4 v2~v3: PHP >= 7.2 License: GPL v2 PRs Welcome

What is CIDRAM?

CIDRAM (Classless Inter-Domain Routing Access Manager) is a PHP script designed to protect websites by blocking requests originating from IP addresses regarded as being sources of undesirable traffic, including (but not limited to) traffic from non-human access endpoints, cloud services, spambots, scrapers, etc. It does this by calculating the possible CIDRs of the IP addresses supplied from inbound requests and then attempting to match these possible CIDRs against its signature files (these signature files contain lists of CIDRs of IP addresses regarded as being sources of undesirable traffic); If matches are found, the requests are blocked.


Features:

  • Licensed as GNU General Public License version 2.0 (GPLv2).
  • Easy to install, easy to customise, easy to use.
  • Works for any system with PHP+PCRE installed, regardless of OS (PHP+PCRE required).
  • Fully configurable based on your needs.
  • Ideal solution for websites and forum systems using shared hosting services.
  • Does NOT require shell access.
  • Does NOT require administrative privileges.
  • Good, strong, stable support base.

Documentation:

[CONTRIBUTING.md] Want to help?


Last Updated: 1 July 2024 (2024.07.01).

aggregator's People

Contributors

danielruf avatar maikuolan avatar masnathan avatar tarlepp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  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  avatar

aggregator's Issues

Hacktoberfest 2017

Hacktoberfest by Digital Ocean will be running again this year through the month of October 2017. If anyone sees any room for improvement to the codebase, has ideas, suggestions, bug-fixes, or whatever else, if you want to win a free Hacktoberfest t-shirt and some stickers, consider signing up for this year and sending some pull requests to this repository. :-)

For more details: https://hacktoberfest.digitalocean.com/#details

Issue will remain open until the end of October.

NumberEntered missing

Hello,

When running results with Aggregator it appears that NumberEntered is always 0.

When I simply hack it up with the following I have returned numbers:

    private function stripInvalidCharactersAndSort(&$In)
    {
        $In = explode("\n", strtolower(trim(str_replace("\r", '', $In))));
        $InCount = count($In);
        $this->NumberEntered = $InCount;
        if (isset($this->callbacks['newParse']) && is_callable($this->callbacks['newParse'])) {
            $this->callbacks['newParse']($InCount);
        }
        unset($InCount);

Not sure if this is the best place or not, or if better before in the previous function on the intake?

Thanks!

Support for netmasks.

Possible future feature: Adding support for netmasks to the Aggregator (currently it just supports IPs and CIDRs).

This has been requested by several different people now, both privately and publicly, so I'm pretty sure this is something that others would find useful. Most recently requested via PHPClasses.org:

I think it's a good idea, but it's currently a low-priority thing for me (got too many other things to do for too many other projects already). I've got a reasonably good idea of how I could go about doing it though, if and when it happens. Definitely not an impossible thing to do.

If anyone else wanted to give it a whirl, they're welcome to it. Otherwise, I should be able to make a start on it at some point next month or thereafter, probably.

Creating this issue for reference and labeling as "attention required".

Performance issue on stripInvalidRangesAndSubs ?

Hi there,

I'm wondering if there's any known issue with performance when trying to feed in 100k prefixes? When I enable some extra output on the classes/functions I find that it seems to drag along at stripInvalidRangesAndSubs($this->Output), specifically the $Line area I think.

Any idea?

Feature: passing an array to $input

Hi again, very handy stuff you have, thanks!

I'm wondering if it would be possible to have the $input figure out if it's a simple pass of plain data or an array. To give you some context we have a program that writes out a flat file with a series of prefixes of varying lengths, both v4/v6. Right now when we pass the data we do it this way:

 if (($addresses = file($routefile)) == FALSE)
  {
    status(STATUS_WARNING, "Unable to open route file (might be empty), skipping.");
    return FALSE;
  }

  // First normalize the routes, no array.
  $addresses_normal = implode("", $addresses);

  // Process the aggregation
  $addresses_agg = aggregate($addresses_normal);

  // Return them in an array
  return explode(" ", $addresses_agg);

I'm wondering if it's possible to add the ability to detect if an array is being passed and do the magic within the Input?

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.