Skip to content

Commit d1df632

Browse files
authored
Fixed $times_redirected_max when using Random defense
1 parent 612c968 commit d1df632

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

la_brea.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
/* PHP HTTP Tarpit
33
* Purpose: Confuse and waste bot scanners time.
44
* Use: Url rewrite unwanted bot traffic to this file. It is important you use Url rewrites not redirects as most bots ignore location headers.
5-
* Version: 1.3.2
5+
* Version: 1.3.3
66
* Author: Chaoix
77
*
88
* Change Log:
9+
* -Fixed $times_redirected_max when using Random defense. (1.3.3)
910
* -Reworked Chained Redirection to work off of query strings. (1.3.2)
1011
* -Added random content-length header to HEAD requests. (1.3.1)
1112
* -Added HEAD request handling to bait vulnerability scanners such as Jorgee (1.3.0)
@@ -28,7 +29,7 @@
2829

2930
//Basic Options
3031
$random_content_length = 2048; //In characters. Used to fill up the size of the scanner's log files.
31-
$defense_number = 7; //1 is Blinding Mode, 2 is Ninja Mode, 3 is HTTP Tarpit, 4 is a Chained Redirection, 5 is a Bounceback Redirection, 6 is a Random defense for each request, 7 is a Random Defense by the minute.
32+
$defense_number = 6; //1 is Blinding Mode, 2 is Ninja Mode, 3 is HTTP Tarpit, 4 is a Chained Redirection, 5 is a Bounceback Redirection, 6 is a Random defense for each request, 7 is a Random Defense by the minute.
3233
$responce_delay_min = 100; //Range of delay in microseconds before headers are sent. You want a range of delays so the introduced latentcy can not be detected by the scanner.
3334
$responce_dalay_max = 300;
3435
$times_redirected_max = 9; //Maximum number of times to redirect (0-9).
@@ -121,7 +122,7 @@ function validate_integer ($numeric_string) {
121122
if( validate_integer($times_redirected) ) {
122123
if( $times_redirected < $times_redirected_max )
123124
$defense_number = 4;
124-
elseif( $defense_number == 4 )
125+
else
125126
$defense_number = mt_rand(0,1) ? 5 : 1; //Sometimes end redirection chain with bounceback
126127
} elseif( $defense_number == 4 )
127128
$times_redirected = 0;

0 commit comments

Comments
 (0)