View Single Post
  #1  
Old 30th November 2021, 20:01
onebit onebit is offline
Member
 
Join Date: Oct 2021
Posts: 10
Default hi add my torrent site cloudflare!
i reloaded the page with cloudflare and here it came out that my torrent page was being hacked.
And that was what on CloudFlare, who wrote:

PHP Code:
30 Nov2021 18:36:23
Block
United States
130.245.169.39
Browser integrity check
Ray ID
6b65d6726a7538b7
Method
GET
HTTP Version
HTTP
/1.1
Host
o1bit
.pro
Path
/
Query string
Empty query string
User agent
Python
-urllib/3.6
IP address
130.245.169.39
ASN
AS5719 SUNYSB
Country
United States 
And did I realize this could be the solution? i will stay in the cloudflare if you invented this.
I searched for a script for it and found it:
PHP Code:
$uri  $_SERVER['REQUEST_URI'];
$qPos strpos($uri'?');

if (
$qPos === strlen($uri) - 1) {
    
header('HTTP/1.1 301 Moved Permanently');
   
// header('Location: ' . substr($uri, 0, $qPos));
    
header('Location: http://'.$_SERVER['HTTP_HOST'].substr($uri0$qPos));

    exit;

I put this solution at the top of bittorrent.php.
Would it work if I weren't cloudflare myself?

Bump: or .htaccess
RewriteCond %{THE_REQUEST} ^[^\s]+\s+[^?]*?\?
RewriteCond %{QUERY_STRING} =""

Bump: or .htaccess
RewriteCond %{THE_REQUEST} ^[^\s]+\s+[^?]*?\?
RewriteCond %{QUERY_STRING} =""
Reply With Quote