From 3a0da47dc36aeeb6a175a2a7150d0375f240cafb Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Tue, 20 Feb 2024 11:00:47 +0900 Subject: [PATCH] Update index.php --- index.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/index.php b/index.php index fffad77..ce09af4 100644 --- a/index.php +++ b/index.php @@ -3,12 +3,13 @@ // Namhyeon Go // https://github.com/gnh1201/caterpillar // Created at: 2022-10-06 -// Updated at: 2022-11-25 +// Updated at: 2024-02-20 -define("PHP_HTTPPROXY_VERSION", "0.1.4"); +define("CATERPILLAR_PROXY_VERSION", "0.1.4"); +define("PHP_HTTPPROXY_VERSION", CATERPILLAR_PROXY_VERSION); -if (strpos($_SERVER['HTTP_USER_AGENT'], "php-httpproxy/") !== 0) { - exit('It works!

It works!

Download the client


php-httpproxy/' . PHP_HTTPPROXY_VERSION . ' (Server; PHP ' . phpversion() . '; abuse@catswords.net)

'); +if (strpos($_SERVER['HTTP_USER_AGENT'], "caterpillar-proxy/") !== 0 && strpos($_SERVER['HTTP_USER_AGENT'], "php-httpproxy/") !== 0) { + exit('It works!

It works!

Download the client


caterpillar-proxy/' . CATERPILLAR_PROXY_VERSION . ' (Server; PHP ' . phpversion() . '; abuse@catswords.net)

'); } ini_set("default_socket_timeout", 1); // must be. because of `feof()` works