Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Costum IP - Hide yourself
#1
Hello there Smile


I was wondering, can I totally fake my IP address by modifying the get_ip(); function in /inc/functions.php ? (the related file: https://github.com/mybb/mybb/blob/master....php#L3000 )

I tried to add this in the bottom of the get_ip(); function (just before the "return $ip;" )

if($mybb->user['uid'] == '3456')
{
	$ip = '64.233.184.94';
}

where 3456 is my user identifiant, and 64.233.184.94 a fake IP address, I want to replace the real one only for me...


But it doesn't work... (of course I have added the line "global $db;" at the top of the function get_ip(); )

Can you help me please ? Big Grin

Mybb 1.6.15
#2
I guess somewhat like this could work.

if($mybb->user['uid'] == "3456")
{
$ip = "64.233.184.94";
}
else {
the real stuff, like $ip or w.e
}
#3
Thanks!

But... it doesn't work Confused

I also tried to write only this line
$ip = '64.233.184.94';
it works fine, but for all the member ...

i conclude that the function doesn't understand this line
if($mybb->user['uid'] == "3456")

Anyone know how to do?

Thanks for help Wink




EDIT: Fixed !!

I simply write that at the end of the get_ip() function

if(!empty($mybb->cookies['mybbuser']))
{
	$logon = explode("_", $mybb->cookies['mybbuser'], 2);
	if($logon[0] == '3456')
	{
		$ip = '64.233.184.94';
	}
}
		


Thanks for the help Big Grin


Forum Jump:


Users browsing this thread: 1 Guest(s)