Git Product home page Git Product logo

abuseipdb-cli's Introduction

kristuff/abuseipdb-cli

A CLI tool to check/report IP addresses with the AbuseIPDB API V2

Build Status Scrutinizer Code Quality Latest Stable Version License

sample-report

Features

  • Single IP check request βœ“
  • IP block check request βœ“
  • Blacklist request βœ“
  • Single IP report request βœ“
  • Bulk report request (send csv file) βœ“
  • Clear IP address request (remove your own reports) βœ“
  • Auto cleaning report comments from sensitive data (email, custom ip/domain names list) βœ“
  • Output: colored reports, JSON or plaintext βœ“
  • Define timeout for cURL internal requests (in config or from command line) βœ“
  • Easy Fail2ban integration βœ“

Requirements

  • PHP version: >= 7.1
  • PHP's modules: php-curl, php-mbstring
  • A valid abuseipdb.com account with an API key
  • Composer for install (not required if you install the .deb package)

Dependencies

More infos

Screenshots

sample-check-internal-ip

sample-checkblock-internal-ip

sample-check-bad-ip

sample-checkblock-bad-ip

sample-report-internal-ip

sample-sample-clear-internal-ip

sample-blacklist

sample-blacklist-plaintext

License

The MIT License (MIT)

Copyright (c) 2020-2022 Kristuff

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

abuseipdb-cli's People

Contributors

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

Watchers

 avatar  avatar  avatar

abuseipdb-cli's Issues

An unexpected error occurred

Hello, I have been using your tool for a year without problems, but since this morning I receive an error "An unexpected error occurred." and there is no way to make it work.
Any ideas?
Thank you so much.

Bulk report when integrated with fail2ban

Hello,

Thanks for the project :)

Is there a way to bulk report when integrated with fail2ban ?
It would help if we had a way, using banaction, to tell abuseipdb-cli to fill a csv file, then we only would have to send it once a day using cron.

When there is a report each time there's a ban, i often get a 429 error.

Thanks.

Compatible with PHP 8.1?

Is the tool compatible with PHP 8.1?

vagrant:~/ $ php -v                                                                                                                                                                                                                              [16:46:04]
PHP 8.1.15 (cli) (built: Feb  7 2023 11:30:51) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.15, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.15, Copyright (c), by Zend Technologies
vagrant:~/ $ abuseipdb --version                                                                                                                                                                                                                 [16:46:24]
        _                 ___ ___ ___  ___
   __ _| |__ _  _ ___ ___|_ _| _ \   \| _ )
  / _` | '_ \ || (_-</ -_)| ||  _/ |) | _ \
  \__,_|_.__/\_,_/__/\___|___|_| |___/|___/

  Kristuff/AbuseIPDB Client version: v0.9.19
  Kristuff/AbuseIPDB Core version:   v1.1
  Released under the MIT licence
  Made with β™₯ in France
  Β© 2020-2022 Kristuff (https://github.com/kristuff)

Running the CLI gives an error:

vagrant:~/ $ abuseipdb --check 45.135.17.57                                                                                                                                                                                                      [16:46:06]

  β–Ί Check IP: 45.135.17.57

PHP Fatal error:  Uncaught Error: Call to undefined function Kristuff\Mishell\mb_strlen() in /usr/lib/abuseipdb-client/vendor/kristuff/mishell/lib/ShellColoredPrinter.php:359
Stack trace:
#0 /usr/lib/abuseipdb-client/src/CheckTrait.php(42): Kristuff\Mishell\ShellColoredPrinter::pad()
#1 /usr/lib/abuseipdb-client/src/AbuseIPDBClient.php(600): Kristuff\AbuseIPDB\AbuseIPDBClient::printCheckScore()
#2 [internal function]: Kristuff\AbuseIPDB\AbuseIPDBClient::checkIP()
#3 /usr/lib/abuseipdb-client/src/AbstractClient.php(99): call_user_func()
#4 /usr/lib/abuseipdb-client/src/AbuseIPDBClient.php(51): Kristuff\AbuseIPDB\AbstractClient::parseCommand()
#5 /usr/lib/abuseipdb-client/bin/abuseipdb(63): Kristuff\AbuseIPDB\AbuseIPDBClient::start()
#6 {main}
  thrown in /usr/lib/abuseipdb-client/vendor/kristuff/mishell/lib/ShellColoredPrinter.php on line 359

I tried mishell's example separately:

vagrant:mishell/ (masterβœ—) $ php demo/index.php
...
  Kristuff/Mishell  v1.2
  Made with β™₯ in France
  Β© 2017-2021 Kristuff (https://github.com/kristuff))

   Interactive sample

PHP Fatal error:  Uncaught Error: Call to undefined function Kristuff\Mishell\mb_strlen() in /home/vagrant/mishell/lib/ShellTablePrinter.php:152
Stack trace:
#0 /home/vagrant/mishell/demo/index.php(113): Kristuff\Mishell\ShellTablePrinter::tableRowSeparator()
#1 /home/vagrant/mishell/demo/index.php(13): printIndex()
#2 /home/vagrant/mishell/demo/index.php(7): goIndex()
#3 {main}
  thrown in /home/vagrant/mishell/lib/ShellTablePrinter.php on line 152

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.