• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

How can you find the lastIP?

Acid

New Member
Joined
Sep 15, 2007
Messages
15
Reaction score
0
There's a "lastip" thing in mysql, but as far as I can tell they're encrypted, how to decrypt them? I need this person's IP, and I only have the lastip thing, but I've tried several ways to find the IP, but I can't, how can you decrypt the lastIP to a regular IP instead of those numbers?
 
it's an unsigned integer.
you can only 'decrypt' them in C++.

in OpenTibia's SVN, there's a function in tools.cpp that returns it as a string (in the ###.###.###.### format).
It's probably there in TFS's code too.
 
Why is IP shown in reverse way?

If I imput the value 16777343, I get this:

Type: Value:
Address: 1.0.0.127
Number: 16777343
Host: 1.0.0.127 (NXDOMAIN)

When it should be shown in this way:

Type: Value:
Address: 127.0.0.1
Number: 2130706433
Host: localhost

BTW, very good! It served me a lot. :)
 
Because the number you entered is 1.0.0.127. As you can see 127.0.0.1 = 2130706433..
 
However, the Ip was 127.0.0.1 (because I logged from local host) :p
 
But you're number were reverse ; )
I'll make it so it will show and convert reverse number tomorrow.
 
I guess you used long2ip() and then reversed the string so it would macth the correct IP?

EDIT:
Here is a function i made that will convert it to an IP and then reverse it so it will provide you with the correct IP adress:
PHP:
function longtoip($ip){
	$ip = long2ip($ip);
	$exp = explode(".", $ip);
	return $exp[3].".".$exp[2].".".$exp[1].".".$exp[0];
}

Usage: longtoip("16777343") - will return 127.0.0.1
 
Last edited:
I guess you used long2ip() and then reversed the string so it would macth the correct IP?

EDIT:
Here is a function i made that will convert it to an IP and then reverse it so it will provide you with the correct IP adress:
PHP:
function longtoip($ip){
	$ip = long2ip($ip);
	$exp = explode(".", $ip);
	return $exp[3].".".$exp[2].".".$exp[1].".".$exp[0];
}

Usage: longtoip("16777343") - will return 127.0.0.1

Whoa, exactly the same function as I already have, only reverse. I don't have the access to fix it now tho. Thx for the code.

EDIT: Fixed it.
 
Last edited:
Why page doesnt work? :S I want check some IP, Cato! :(
 
Now it does. But before not. ;) I used 4220niller function.
 
Back
Top