Skip to content
This repository was archived by the owner on May 19, 2025. It is now read-only.

Commit f2f6aaa

Browse files
committed
Version 2.2.0
Addresses #7 - Tolerance levels configurable in Admin area - Grey listing vs blacklisting levels defined - Only Greylisted visitors can use click-through link
1 parent a63cc68 commit f2f6aaa

File tree

3 files changed

+296
-66
lines changed

3 files changed

+296
-66
lines changed

README.md

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,17 @@ An implimentation of Project Honeypot's http:BL for YOURLS
33

44
http:BL is a black list service from [Project Honeypot](https://www.projecthoneypot.org) with an API that is trivial to hook into. While other spam management services & plugins, such as [Phishtank](https://github.com/joshp23/YOURLS-Phishtank-2.0), can check outgoing links, content submissions, and re-check old redirects, Project Honeypot's http:BL acts as a gatekeeper, stopping malicious users at the door before they can do any damage.
55

6-
This plugin can help filter out spam submissions on a YOURLS public interface _and_ on the API. It will redirect any bad IP to an informative and customization friendly block/intercept page written with Bootstrap where any human users will be able to easily set a cookie and access the YOURLS installation. For the API users, it will simply send back an Error 403.
6+
This plugin can help filter out spam submissions on a YOURLS public interface _and_ on the API. It will redirect any bad IP to an informative and customization friendly block/intercept page written with Bootstrap. If greylisted, any human users will be able to easily set a cookie and access the YOURLS installation. For the API users, it will simply send back an Error 403.
77

88
Here are a few of HTTP:BL's features
99

10-
1. All logs and settings are in the admin interface, no hand editing of any files (unless you want to)
11-
2. Use a custom intercept page for flagged IP's. Edit the template, or redirect to your own URL.
12-
3. Granular log keeping: log only event types that you want, or none at all.
13-
4. Flush the log table and start fresh whenever you want.
14-
5. Self-managing: this plugin will (optionally) drop its tables when deactivated, and will create its own tables on activation.
15-
6. Whitelist IP addressess to skip checks; autodetection of and 1-click addition of the current IP.
10+
1. All logs and settings are in the admin interface, no hand editing of any files (unless you want to).
11+
2. Configure threshold levels for blocking and greylisting per threat type (or use defaults for ease of use).
12+
3. Use either native YOURLS style or a custom intercept page for flagged IP's. Edit the template, or redirect to your own URL.
13+
4. Granular log keeping: log only event types that you want, or none at all.
14+
5. Flush the log table and start fresh whenever you want.
15+
6. Self-managing: this plugin will (optionally) drop its tables when deactivated, and will create its own tables on activation.
16+
7. Whitelist IP addressess to skip checks; autodetection and 1-click addition of the current IP.
1617

1718
## REQUIREMENTS
1819

@@ -25,19 +26,25 @@ Here are a few of HTTP:BL's features
2526
1. Place the httpBL folder in YOURLS/user/plugins/
2627
2. Activate http:BL for Yourls in the Admin interface - sql tables should be made automatically
2728
3. Set options in the HTTP:BL options page. The default options are just fine. Clicking submit on various forms will enter the default values into the sql tables, but null values all fall back to default actions as well.
28-
29-
30-
#### NOTE: In order for this to work on your public page you have to make sure that
31-
```
32-
// Start YOURLS engine
33-
require_once( dirname(__FILE__).'/includes/load-yourls.php' );
34-
```
35-
#### comes before anything else. If you are using the [Sleaky](https://github.com/Flynntes/Sleeky) interface, edit your Index.php file to put the above line before
36-
```
29+
4. If using a custom URL for blocking, please note the following requests that will be sent to your URL
30+
- `action` grey or blacklist
31+
- `ip` the offending IP address
32+
- `type` the threat type (eg: content spammer)
33+
- `level` the threat level (0-255)
34+
35+
#### NOTE:
36+
In order for this to work on your public page you have to make sure that
37+
```
38+
// Start YOURLS engine
39+
require_once( dirname(__FILE__).'/includes/load-yourls.php' );
40+
```
41+
comes before anything else. If you are using the [Sleaky](https://github.com/Flynntes/Sleeky) interface, edit `index.php` to put the above line before
42+
```
3743
include 'header.php';
3844
```
3945

40-
#### NOTE: The sql table may need to be added manually using httpBL/assets/httpBL.sql
46+
#### NOTE:
47+
The sql table may need to be added manually using `httpBL/assets/httpBL.sql`
4148

4249
### TODO:
4350
1. Add dynamic and randomized honeypot "quicklinks" to all rendered pages - this will likely come in the form of a custom index page, or footer script.

httpBL/assets/blockpage.php

100644100755
Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
?>
99
<html lang="en">
1010
<head>
11-
1211
<meta charset="utf-8">
1312
<title>ALERT!</title>
1413
<link rel="icon" href="%img%" type="image/png" />
@@ -37,13 +36,9 @@
3736
<li>Behavior Type: <strong>%typemeaning%</strong></li>
3837
<li>Threat Level: <strong>%threat%</strong></li>
3938
</ul>
40-
4139
<p>Information regarding threat levels can be found <a href="https://www.projecthoneypot.org/threat_info.php" target="_blank">here</a>.</p>
42-
43-
<p>If you <strong>ARE NOT</strong> a bot of any kind, simply <a href="javascript:letmein()">click here</a> to gain access.</p>
40+
%greyList%
4441
<p style="display:none;">Otherwise, please have fun with <a href="http://planetozh.com/smelly.php">this page</a></p>
45-
46-
4742
<p>Thank you.</p>
4843
</div>
4944
</div>

0 commit comments

Comments
 (0)