mirror of
https://github.com/gnh1201/caterpillar.git
synced 2025-07-15 08:48:08 +00:00
Update index.php, server.py
This commit is contained in:
parent
b5b57f5012
commit
0d3d20b535
|
@ -4,8 +4,10 @@
|
|||
// Created at: 2022-10-06
|
||||
// Updated at: 2022-11-25
|
||||
|
||||
define("PHP_HTTPPROXY_VERSION", "0.1.3");
|
||||
|
||||
if (strpos($_SERVER['HTTP_USER_AGENT'], "php-httpproxy/") !== 0) {
|
||||
exit('<!DOCTYPE html><html><head><title>It works!</title><meta charset="utf-8"></head><body><h1>It works!</h1><p>Version: 0.1.3</p></body></html>');
|
||||
exit('<!DOCTYPE html><html><head><title>It works!</title><meta charset="utf-8"></head><body><h1>It works!</h1><p>Version: ' . PHP_HTTPPROXY_VERSION . '</p></body></html>');
|
||||
}
|
||||
|
||||
ini_set("default_socket_timeout", 1); // must be. because of `feof()` works
|
||||
|
|
|
@ -138,7 +138,7 @@ def proxy_server(webserver, port, scheme, method, url, conn, addr, data):
|
|||
|
||||
proxy_data = {
|
||||
'headers': {
|
||||
"User-Agent": "php-httpproxy/0.1.3 (Client; Python " + python_version() + "); abuse@catswords.com",
|
||||
"User-Agent": "php-httpproxy/0.1.3 (Client; Python " + python_version() + "; abuse@catswords.net)",
|
||||
},
|
||||
'data': {
|
||||
"data": base64.b64encode(data).decode(client_encoding),
|
||||
|
|
Loading…
Reference in New Issue
Block a user