Forums

Unfortunately no one can be told what FluxBB is - you have to see it for yourself.

You are not logged in.

#1 2018-03-25 10:37:46

chimay
New member
Registered: 2018-03-25
Posts: 1

Add a whois to the moderate get_host page

Hi,

First off, thanks for FluxBB, have been using it for a while now and it is great.

One of the problems that I have is accounts that signup for sending spam, even with recaptcha active, it still happens. Those accounts tend to be very easy to detect, but it requires you do run a whois on the IP address so that you can at least locate where the ip address originates.

As I figured after a while that doing this manually is not super convenient I just added the functionality to the moderate.php page myself.

It would be great if this functionality could be added to FluxBB, but I do understand if that's not possible. Anyways, for the curious, here's my modification.

Note that as it depends on "shell_exec" it might not be the best way to handle this.
For me however "it works" and was sufficient to get the job done.

Here's a diff between moderate.php as supplied in FluxBB 1.5.10 and my adapted version of moderate.php:

37a38,40
>       $hostinfo = sprintf($lang_misc['Host info 1'], $ip).'<br />'.sprintf($lang_misc['Host info 2'], pun_htmlspecialchars(@gethostbyaddr($ip)));
>         $whois = shell_exec("whois ".$ip);
>       $whois = '<br />'.nl2br($whois); // insert line breaks before the newlines
39c42,43
<       message(sprintf($lang_misc['Host info 1'], $ip).'<br />'.sprintf($lang_misc['Host info 2'], pun_htmlspecialchars(@gethostbyaddr($ip))).'<br /><br /><a href="admin_users.php?show_users='.$ip.'">'.$lang_misc['Show more users'].'</a>');
---
>       message($hostinfo.'<br />'.$whois.'<br /><br /><a href="admin_users.php?show_users='.$ip.'">'.$lang_misc['Show more users'].'</a>');
> //    message(sprintf($lang_misc['Host info 1'], $ip).'<br />'.sprintf($lang_misc['Host info 2'], pun_htmlspecialchars(@gethostbyaddr($ip))).'<br /><br /><a href="admin_users.php?show_users='.$ip.'">'.$lang_misc['Show more users'].'</a>');

Offline

#2 2018-03-26 07:03:46

Franz
Lead developer
From: Germany
Registered: 2008-05-13
Posts: 6,724
Website

Re: Add a whois to the moderate get_host page

We won't add this to core, but feel free to publish this as a modification in our repository.


fluxbb.de | develoPHP

"As code is more often read than written it's really important to write clean code."

Offline

Board footer

Powered by FluxBB