Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jadb/honeypot
The Project Honey Pot un-official PHP SDK
https://github.com/jadb/honeypot
Last synced: about 2 months ago
JSON representation
The Project Honey Pot un-official PHP SDK
- Host: GitHub
- URL: https://github.com/jadb/honeypot
- Owner: jadb
- License: mit
- Created: 2016-01-23T01:06:14.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-23T01:06:22.000Z (almost 9 years ago)
- Last Synced: 2024-08-04T23:09:54.925Z (4 months ago)
- Language: PHP
- Size: 6.84 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-honeypot - **1**星 - official PHP SDK (<a id="a53d22b9c5d09dc894413453f4755658"></a>未分类)
README
# Honeypot
The [Project Honey Pot](https://www.projecthoneypot.org)'s *un-official* PHP SDK.
Using the library, you can start auto-detecting bad visitors (`HttpBL`) and/or help
deterring new ones (`Quicklink`).## Install
```
composer require jadb/honeypot:1.0.x-dev
```## Usage
### HttpBL
To use the [Http::BL](https://www.projecthoneypot.org/httpbl_api.php) API, you will first need
an API key. Head over and [register](http://www.projecthoneypot.org?rf=202881) if you haven't
already (this is a referral link):Once you have that, you can just do:
```php
isSafe('127.0.0.1') {
exit('Unsafe visitor');
}
```If you want more control over the rules:
```php
isSafe('127.0.0.1', $age, $score, $type) {
exit('Unsafe visitor');
}
```For even more, you could just get the `Address` object and create your own validation:
```php
address('127.0.0.1');
```**NOTE:** For testing purposes, [dummy data is made available](https://www.projecthoneypot.org/httpbl_api.php).
### Quicklink
To use [quicklinks](https://www.projecthoneypot.org/manage_quicklink.php) and help deterring new bad IPs,
you will need to get a honeypot's URL or [host your own honeypot](https://www.projecthoneypot.org/manage_honey_pots.php).Once that is done, you can create up to 8 different links by doing:
```php
render(5);
```## Patches & Features
* Fork
* Mod, fix
* Test - this is important, so it's not unintentionally broken
* Commit - do not mess with license, todo, version, etc. (if you do change any, bump them into commits of
their own that I can ignore when I pull)
* Pull request - bonus point for topic branchesTo ensure your PRs are considered for upstream, you MUST follow the PSR2 coding standards.
## Bugs & Feedback
http://github.com/jadb/honeypot/issues
## License
Copyright (c) 2015, [Jad Bitar](http://jadb.io) and licensed under [The MIT License](http://www.opensource.org/licenses/mit-license.php).