Graal Forums  

Go Back   Graal Forums > Development Forums > Future Improvements
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-25-2014, 01:53 PM
Jakov_the_Jakovasaur Jakov_the_Jakovasaur is offline
Deleted by Darlene159
Jakov_the_Jakovasaur's Avatar
Join Date: Sep 2013
Location: Deleted by Darlene159
Posts: 354
Jakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud of
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?

__________________
This signature has been deleted by Darlene159.
Reply With Quote
  #2  
Old 08-25-2014, 02:56 PM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
Quote:
Originally Posted by Jakov_the_Jakovasaur View Post
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?

It is possible via script but I think you have to read the player file on the server. I know at least 1 serve, not mentioning names, reads both computerid and ipaddress to verify people are not abusing systems using multiple accounts.

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.
Reply With Quote
  #3  
Old 08-25-2014, 02:56 PM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
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:
Originally Posted by scripthelp
TServerPlayer.ipaddress - string (read only) - only accessible on authorized servers
__________________
MEEP!
Reply With Quote
  #4  
Old 08-25-2014, 02:57 PM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
Quote:
Originally Posted by callimuc View Post
Might be only a login server thing, but player.ipaddress?
That is what we use on one of the servers I script on. Notice I my post above I typed the variable "ipaddress" the same way
Reply With Quote
  #5  
Old 08-28-2014, 12:32 AM
Restraint Restraint is offline
NaS
Join Date: Jan 2014
Posts: 21
Restraint will become famous soon enough
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:
const template "accounts/%s/%s.txt";
public function 
getIP(acc) {
 
temp.escape acc.escape(); // Or whatever. Is this the SQL one? Whatever it is.
 
temp.folder escape.substring(02);
 if (
folder.contains("%")) { // Could also do .pos()
  
folder "special";
 }
 
 
temp.directory format(templatefolderescape);
 
temp.lines.loadLines(directory);

 for (
temp.linelines) { // If it's near top, loop from top
  
if (line.starts("IP")) {
   
temp.ip line.substring(2).trim(); // .trim() because I think it has garbage spaces
   
break;
  }
 }

 return(
ip);

Or something. That's really just a guess mostly, but you should be able to figure it out from there.
__________________
Hi. I'm NaS!
Reply With Quote
  #6  
Old 08-28-2014, 06:19 AM
Jakov_the_Jakovasaur Jakov_the_Jakovasaur is offline
Deleted by Darlene159
Jakov_the_Jakovasaur's Avatar
Join Date: Sep 2013
Location: Deleted by Darlene159
Posts: 354
Jakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud of
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
__________________
This signature has been deleted by Darlene159.
Reply With Quote
  #7  
Old 08-28-2014, 09:14 PM
Restraint Restraint is offline
NaS
Join Date: Jan 2014
Posts: 21
Restraint will become famous soon enough
Quote:
Originally Posted by Jakov_the_Jakovasaur View Post
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
I was mainly replying to others in the thread who were discussing it. I generally assume you know these things by now!

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.
__________________
Hi. I'm NaS!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 11:37 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.