Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
Captcha TTv3
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / Torrent Trader / v3 Mods in Progress

2023-01-01 20:57:09
@STorrents2020
I'm sorry, I don't understand anything you're saying. I don't know what the images or the bots in this mod have to do with what happens to me. If you could explain it more easily it would help.
2023-01-02 05:23:47
And I'll explain.

At every given moment, you and your host are slammed by massive TCP requests consisting of brute-force attempts on most common ports. We all are. I personally see
my logs every day and its pretty bad.

Your host takes care of most of this, but your signup page wont.

What this means, is if you can not figure out the captcha for some reason, I highly recommend enforcing a image upload (user picture or icon w/e) for the user to select, and finish form to register. This prevents bots from throwing commands, trying different file types and doing that really all day long maliciously.

Let me know what direction you wish to take, I can code either one.. I'm just super lost in this particular thread.
2023-01-02 08:52:41
For that same reason I am trying to make the captcha work.  Embedding an antibot in the registration form is one solution, but ideally the recaptcha should work, as the reason it's not working is probably some small bug in the code.  Also, if I decide to use an antibot, I would have to find the code and figure out where to put it.
2023-01-02 12:05:16
Guys, I have already solved the problem. The code posted above is wrong, I had to correct it. When you try to register on the page, it accesses the Captcha.php file but stays inside an "if" without getting anywhere. The solution has been to put all the code of Captcha.php inside the account-signup.php file and inside the if put a goto to the part of the code that performs the registration. I know it's not an elegant option, but at least it fixed it for me.
Last edited by dranivil on 2023-01-02 12:10:56
2023-01-02 18:22:14
require_once 'Captcha.php' at the start of register.php should do it.
2023-01-02 18:47:14
I was having fun playing with openAI, so I just pasted in the captcha.php code and it said a few errors existed, so for fun, I asked if it could fix it, it said yes and here is what it did. Anyone can test this?
<?php

class Captcha
{
 const RECAPTCHA_API_URL = 'https://www.google.com/recaptcha/api/siteverify';
 private $key;
 private $secret;

 public function __construct($site_config)
 {
     $this->key = $site_config['CAPTCHA_KEY'];
     $this->secret = $site_config['CAPTCHA_SECRET'];
 }

 public function response($captcha)
 {
     if ($site_config['CAPTCHA_ON']) {
         if (!$captcha) {
             autolink(T_('<b>Please check the the captcha form.</b>'), "account-login.php");
         }
         $verifyResponse = file_get_contents(self::RECAPTCHA_API_URL . '?secret=' . $this->secret . '&response=' . $captcha);
         if ($verifyResponse === false) {
             // handle error
             return false;
         }
         $responseData = json_decode($verifyResponse);
         if ($responseData === null) {
             // handle error
             return false;
         }
         if ($responseData->success) {
             // it's successful, so let it go
             return true;
         } else {
             autolink(T_('<b>Please check the the captcha form.</b>'), "account-login.php");
             return false;
         }
     }
     // CAPTCHA not enabled, so return true
     return true;
 }

 public function html()
 {
     if ($site_config['CAPTCHA_ON']) {
         return print("<div class='g-recaptcha' data-theme='light' data-sitekey='" . $this->key . "'></div>");
     }
 }
}

TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
2023-01-02 18:57:56
I used it entirely for that comment function lol I couldn't believe how much it revealed to me, things I never knew you could do.

Pretty neat, just check it over.. its prone to slight hicups, and often you have to tell it to share the missing end of the solution, but its pretty stable since its launch now.

Someone should post the bencoder and ask "What is wrong with this code?" .. lay back and amuse yourself lol
Last edited by STorrents2020 on 2023-01-02 19:01:50
2023-01-02 19:06:17
yea, I looked that code over and I see what changed, like construct and removing globals. Its pretty neat for sure, but yea, you have to pay attention. I was just plugging code and noticed it didnt get all of it so I removed any line comments, and that seemed to make it a bit happier
TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
2023-01-02 21:23:09
Exactly!

I found, that it never provides me the part where a function returns, or whatever else cut off. I just say "You missed the part where it returns" and it will apologize, and provide only that missing part of the solution.

2 weeks ago, it would render the ENTIRE solution all over again as many times as you asked.. never providing the final end of the solution.

Seems like they fixed that recently (thank god) lol
2023-07-26 16:28:25
HELLO MicroMonkey

I just tested and it is more visible and the site database is the latest version V3 MYSQLI and has no changes

@+ my friend!
Last edited by spiritblue on 2023-07-26 16:29:23
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 1
  • Members: 0
  • Guests online: 1
  • Comments: 3
  • Messages: 1,728