hi, im going to edit this topic because im looking for something diferent
anyone knows if is posible to display some digits (last 3 or 4 digits) from the end of his ip adress of the Guest when hes posting as "Guest"?
[
attachment=30651]
Thanks
(2013-12-09, 04:58 AM)Init Wrote: [ -> ]http://community.mybb.com/thread-63300.html
Multiple methods within that thread.
thanks for reply, but im looking for something diferent, i update the first post, u know if can be done something like that?
Since you need to parse/limit the display, it needs to be a core edit or a plugin. A simple template edit will not work as it does not process commands.
Here something similar (ID for guests based on their IP):
http://community.mybb.com/thread-148100-...pid1048754
You could modify it so it cuts the ip:
<?=substr($post['ipaddress'], -4)?>
BTW, why do you change topic's name and content to something quite different on next day? Should have made new topic...
(2013-12-09, 10:20 PM)Destroy666 Wrote: [ -> ]Here something similar (ID for guests based on their IP): http://community.mybb.com/thread-148100-...pid1048754
You could modify it so it cuts the ip:
<?=substr($post['ipaddress'], -4)?>
BTW, why do you change topic's name and content to something quite different on next day? Should have made new topic...
and this requires a plugin too, since its using "PHP in Templates"
(2013-12-09, 10:20 PM)Destroy666 Wrote: [ -> ]Here something similar (ID for guests based on their IP): http://community.mybb.com/thread-148100-...pid1048754
You could modify it so it cuts the ip:
<?=substr($post['ipaddress'], -4)?>
BTW, why do you change topic's name and content to something quite different on next day? Should have made new topic...
i used the code:
UID: <?=hexdec(substr(md5($post['ipaddress']), 0, 10))?>
worked like a charm
is secure the id assigned? i mean, can be decoded?
[
attachment=30656]
@zaishen, well, if someone knows you use that algorithm (read it here), he could convert it back to HEX and get first 10 characters of md5 hash of ip. But even if those 10 characters had been bruteforced or whatever, it wouldn't provide whole ip. So I don't think it's insecure in any way.
@pavemen, I didn't say it doesn't require plugin, did I?
(2013-12-10, 12:27 PM)Destroy666 Wrote: [ -> ]@zaishen, well, if someone knows you use that algorithm (read it here), he could convert it back to HEX and get first 10 characters of md5 hash of ip. But even if those 10 characters had been bruteforced or whatever, it wouldn't provide whole ip. So I don't think it's insecure in any way.
if i set it to 0 -7 will combine the last 7 digits? so that will be more complicated, right?
0, -7 means it will cut off -7 chars starting from 0. So nothing or error.
UID: <?=hexdec(substr(md5($post['ipaddress']), -7))?>
will base the UID on last 7 numbers of the ip MD5 hash.
But as I said it's technically impossible to break, unless the hashed IP has <= 10 characters (not sure if even possible, AFAIK it's always 32) and the person knows the algorithm. Moreover, I don't know why would someone waste time to steal random guest's ip.