![]() |
read player.ip through script
how come its not possible for a scripter on a server to read a players ip through script, while it is possible for any random guild member to view a players ip through the global guilds control panel log?
http://i.imgur.com/mk6kQ9J.png |
Quote:
Tho I do not know if that's with special permission, or against the rules. I think that the guild cp might have been an oversight. Also guild cp limits to only guild members where-as a server could do a larger number of damage. |
Might be only a login server thing, but player.ipaddress?
edit: nvm just saw it's an authorized server only thing, should be changed! Quote:
|
Quote:
|
It's possible already, but a pain in the ass. On UN, I made it so players get clientr.ip set to their IP when they log on.
How do you retrieve their IP? First, you have to give your NPC server: r accounts/*/* DON'T give it rw, or else I might log onto your server and give myself a full RC. Once you've done that, you get the filepath to the player's file. For example - For my account (Restraint), my account file would be in the following location: accounts/Re/Restraint.txt And if you .loadlines() it, you will find a line listed as "IP x.x.x.x" -- I *think*it's near the bottom (under comments but above rights, if I recall). If it's near the bottom, you loop from the end towards the beginning and break; when you reach it. If it's near the top, you loop from the beginning to the end and break; when you reach it. There are some "special" cases with the accounts/ folder, though. An account like "(npcserver)" would not go under: accounts/(n/(npcserver).txt It goes under: accounts/special/%00npcserver%00.txt (where %00's are the 'escaped' versions of ( and ) ) So basically you do SOMETHING LIKE the following: PHP Code:
|
thank you!
but i already have a very simple method of retrieving ip, was just wondering why the default variable is still restricted as if that is somehow improving security, especially as seemingly everyone works around it anyway |
Quote:
Also, for others in the thread: I remembered on a whim this morning in bed that .escape() IS the SQL one. It's escapefilename() that I was thinking of. I agree with you there, though. I'm not sure why certain aspects of the game are "pretend"-secure, causing more inconvenience than anything. |
All times are GMT +2. The time now is 11:44 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.