Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > Code Gallery
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-15-2007, 10:25 PM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Beta Release: Sophisticated Banking System

I just finished working on a sophisticated banking system. I worked on it solely to release for public use, since I tried to make it as fancy as possible (not graphic wise, since I can't make any graphics ). Although this version is complete, I consider it a beta version since I want to implement a few things like a loan system, credit system, and interest system and so forth for possibly a future release, depending on how much time I feel like investing on this thing.

This beta version comes with a custom log in screen for users to log in to access their account information. It also comes with a registration feature for users that have not yet registered an account, which, of course, would be first time users. When inputting a desired account, if your account is less than 10 characters, right under the textbox you will see the text
"Insufficient Characters...," the same applies for when inputting a desired password. With this system, I made it a 10 character requirement for usernames and passwords. When you input the 10 characters for a username, the former "Insufficient Characters..." text will now display whether or not your desired username is available or not. Only one username is allowed per user, and only one account is allowed per user.

Now, the password portion is a bit different, with the fact that I have implemented a password strength checker to check the strength of your desired passwords (credits to Joey for helping me create this). When inputting a password, you will be notified whether it is either a 'weak' password, a 'semi-secure' password, and a 'highly secure' password.


How that works:

If your password only contains numbers, lower case letters, or upper case letters, your password will be considered 'weak'.

If your password only contains numbers and lower case letters or numbers and upper case letters or lower case and upper case letters, your password will be considered 'semi-secure'.

If your password has numbers, lower case letters, and upper case letters, it will be considered strong.



When you've inputted a desired username that is available for use and when you've inputted a desired password, you can press the register button to register your account. After pressing the register button, assuming you inputted the information correctly, you will be prompted with a 'success' gui for registering your account. In this form, you will see some text that you should read and then at the bottom you will see a copy of your username, password, and a personal code. This personal code is essentially very important for you to remember. Each user will have a different personal code. When you go to log in, if the information you type in is not the one you registered with, you will be prompted to a username/password recovery gui that will ask you for your personal code, of which you will have to enter in order for the system to tell you your username and password again. So, I'd suggest you store that number in a place that you wouldn't forget it.

After registering, you can log in, wait for the bank to load, and then you will be prompted with the actual bank gui. Currently, all you can do is view your balance, withdraw, and deposit gralats, which is essentially the basics of a banking system. This system uses player.rupees since I made it for the public, and thus, you'll have to configure it to whatever strings your server uses for money for the system to work correctly for your server.

DB: gambet_bankDB

^This system reads for this DB and simply stores and reads all information stored in this database. Just create a DB with this name and leave it alone, the system itself will do everything.


NOTE: I havn't had anyone to test it for me, so if there are any bugs or so, please let me know and I'll work on fixing them. Also, feel free to fix things around yourself if you wish. This system is for public use, so use it as you please. I didn't exactly implement different error messages for each and every case, so you might get an error message that doesn't apply to what you're trying to do at times, but just take note that what you're doing is in fact wrong, even if the error message displayed is not 100% correct. But, for the most part, I tried to make as many accurate error messages as possible.


NOTE 2: Besides the '/bank' command that you have to chat to fire the weapon, everything else is completely gui-based.



Enjoy
Attached Files
File Type: txt gambet_banksystem.txt (20.2 KB, 352 views)

Last edited by Gambet; 02-15-2007 at 10:41 PM..
Reply With Quote
  #2  
Old 02-15-2007, 10:33 PM
Crono Crono is offline
:pluffy:
Join Date: Feb 2002
Location: Sweden
Posts: 20,000
Crono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond repute
opened the script, a lot of fancy stuff...nice nice
__________________
Reply With Quote
  #3  
Old 02-15-2007, 10:35 PM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
Cool
Reply With Quote
  #4  
Old 02-15-2007, 10:43 PM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Screenies:



Reply With Quote
  #5  
Old 02-15-2007, 10:49 PM
killerogue killerogue is offline
Registered Omega
killerogue's Avatar
Join Date: Apr 2006
Location: United States
Posts: 1,920
killerogue is on a distinguished road
Send a message via AIM to killerogue Send a message via MSN to killerogue
Whoa Gambet this will be really useful to my server and I. Another script that doesn't have to be done. Thanks. Goodjob.
__________________


REMEMBER, IF YOU REP ME, LEAVE A NAME!

Quote:
Originally Posted by haunter View Post
Graal admins don't die. They go to hell and regroup.
Quote:
Originally Posted by Inverness View Post
Without scripters, your graphics and levels wouldn't do anything but sit there and look pretty.
Reply With Quote
  #6  
Old 02-16-2007, 12:59 AM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Quote:
Originally Posted by killerogue View Post
Whoa Gambet this will be really useful to my server and I. Another script that doesn't have to be done. Thanks. Goodjob.

No problem, that's what I made it for - for people to use
Reply With Quote
  #7  
Old 02-22-2007, 02:06 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Gambet View Post
No problem, that's what I made it for - for people to use
It's very nice of people to make scripts like this, but the problem with any server that is actually going to go anywhere is that if the server uses too many of these scripts, it will be the same as any other server doing it. (it would look bad if a classic server started using this script, while 10 other UC servers did, etc)
__________________
Reply With Quote
  #8  
Old 02-22-2007, 02:10 AM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Quote:
Originally Posted by cbkbud View Post
It's very nice of people to make scripts like this, but the problem with any server that is actually going to go anywhere is that if the server uses too many of these scripts, it will be the same as any other server doing it. (it would look bad if a classic server started using this script, while 10 other UC servers did, etc)

Not at all.


As long as it serves its purpose, what's the problem?


To be honest, I'd rather use this system than some plain purely text-based bank system anyday, no matter how many other servers were using it.


Besides, people don't have to just copy and paste and use the system exactly how I made it. It's easily customizable and can be turned to something fairly unique, though the core of it will still be my system, but at least it won't be completely the same.


But, yes, you do have a point, though I wouldn't agree with people just stopping from releasing scripts to the public.
Reply With Quote
  #9  
Old 02-22-2007, 02:44 AM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
Quote:
Originally Posted by Gambet View Post
Besides, people don't have to just copy and paste and use the system exactly how I made it. It's easily customizable and can be turned to something fairly unique, though the core of it will still be my system, but at least it won't be completely the same.
Mine was made as a modular core. I thought that people may appreciate having the base commands in a player.<bank command> format as it would be useful. Thus you can change a bank style anywhere and yet still have the same useful commands. For instance, a bank in the side of an ogre mountain won't have the same level of customer service as a bank in a city . Try to overdraw in ogreland and you'd probably die .
Reply With Quote
  #10  
Old 02-22-2007, 02:46 AM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Quote:
Originally Posted by Twinny View Post
Mine was made as a modular core. I thought that people my appreciate having the base commands in a player.<bank command> format it would be useful. Thus you can change a bank style anywhere and yet still have the same useful commands. For instance, a bank in the side of an ogre mountain won't have the same level of customer service as a bank in a city . Try to overdraw withdraw in ogreland and you'd probably die .

And this system is also a 'modular core', except it's completely gui-based with some nice login/registration features, instead of just the simple bank commands.


You can easily customize this system to work however you'd like it to.
Reply With Quote
  #11  
Old 02-22-2007, 06:35 AM
PrinceDark PrinceDark is offline
Criminal X
PrinceDark's Avatar
Join Date: Feb 2003
Location: Miami, Florida
Posts: 662
PrinceDark will become famous soon enough
Pretty nice piece of work there. Great job and great to see you have improved since NPulse.
__________________
- Criminal X: certified nut case
Reply With Quote
  #12  
Old 02-22-2007, 10:24 AM
Kristi Kristi is offline
Bowie's Deciple
Kristi's Avatar
Join Date: Dec 2003
Location: Boston, MA
Posts: 748
Kristi has a spectacular aura aboutKristi has a spectacular aura about
Send a message via AIM to Kristi Send a message via MSN to Kristi
The good, the bad, and the ugly:
I will start with the ugly first, since that translates to security risks! (these HAVE to be fixed in some way or accounted for)

The ugly:
This npc is on a one way abuse ticket. You are giving the entire server access to fill up an npc with as much information as they want (the user accounts), without any visual checks or etc. I would limit the amount of bank accounts the player can be associated with, or at least set up some type of check (like how most places now use an image check when registering so it cant be automated.)
If you do not do this, someone can automate a way to just sit there and create accounts all day, and going unchecked, this could be a really really bad thing (filling the server!).

Any staff who has access to looking at that DB's flag could know the user's passwords! What if they use a password they use other places on the internet, like aim or email, or even worse... use their graal passwords! You know someone is going to do it, then some corrupt staff can go look for a random 8 character password! I would suggest using MD5 encryption on the serverside. However, the problem still lies with staff pretty much having access to scripts period. They could easily script something that intercepts that password on the clientside or serverside before it is encryped and compared in the first place. Variables on clientside are accessable no matter what way they are stored in a weapon. This can be very dangerous...


The good:
Cool concept. Personally, I find typing "deposit 300" a lot easier, and I hate clicking/gui's period, but if someone wants to be wowed instead of efficient, this is the way to go. You get that feel of COOL. This is the type of thing that you cant really bungle down some code with more efficient algorithims, so it seems like you did an okay job.

The bad:
You should break up these really long functions into smaller task functions with parameters, for more readable code. also, i see you use onBlahBlah for nonevent functions, when you write your own function, you dont need to do that. function blahBlah is fine. also, you dont need to put temp. in a parameter list. Anything in the parameter list is automatically temporary. EG:
function whatEvs(coolname).
coolname is automatically temporary, so you can refer to it as coolname or temp.coolname inside the funciton.

There were a few things that could have been done SLIGHTLY better/more efficiently, but for the most part the code was pretty good, and definitely better then most. The only thing that really bothered me was the following:

PHP Code:
  this.upper = {"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"};
  
this.lower = {"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"};
  
this.numbers = {0,1,2,3,4,5,6,7,8,9}; 
The previous snippet seems silly because we all know characters have asciicodes. (also, you never checked for nonalphanumeric codes, which generally automatically make a password strong).
for example, if(getascii(this.checkletter) in |65,90|) would do uppercase.
I rewrote the password checking part in full. this function takes a password and returns the strength (it adds 1 for Uppercase, Lowercase, a number, and anything else, for a total of 4).
PHP Code:
function checkPasswordStrength(password) {
  
temp.sets = {65,90,97,122,48,57}; //ascii ranges

  
for(i=0i<password.length(); i++) {
    for(
j=0,j<3;j++) {
      
temp.str[j] = (temp.str[j] || password.substring(i,1in |temp.sets[j*2],temp.sets[j*2+1]|);
      
5//confirm alphanumeric
    
} if(j==3temp.strength[3] = true//if not alphanumeric
  
}
   
  return 
temp.str[0] + temp.str[1] + temp.str[2] + temp.str[3];


Sorry if any of this was offensive, but the security issues (the ugly) have to be addressed most of all. Anything else is just preference/efficiency.
__________________
Reply With Quote
  #13  
Old 02-22-2007, 10:37 AM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
Quote:
Originally Posted by Kristi View Post
Any staff who has access to looking at that DB's flag could know the user's passwords! What if they use a password they use other places on the internet, like aim or email, or even worse... use their graal passwords! You know someone is going to do it, then some corrupt staff can go look for a random 8 character password! I would suggest using MD5 encryption on the serverside. However, the problem still lies with staff pretty much having access to scripts period. They could easily script something that intercepts that password on the clientside or serverside before it is encryped and compared in the first place. Variables on clientside are accessable no matter what way they are stored in a weapon. This can be very dangerous...
Good example of why i suggested Graal give scripters access to protected variables. Hidden/write protected variables are very handy for NPC's like this.

If you don't like GUI styled bank systems, look up mine (here).
Although i provided a textbased example, you could do Gui-based system and still use the player.<bankcommand> system. Depends on what you like.
Reply With Quote
  #14  
Old 02-22-2007, 10:54 AM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
Maybe to keep corrupt staff from phishing you could only allow numerical pins of a certain length?
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #15  
Old 02-22-2007, 11:40 AM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
MD5 secret flags. That's how I coded V$:C's user account system.
Reply With Quote
  #16  
Old 02-22-2007, 11:56 AM
Kristi Kristi is offline
Bowie's Deciple
Kristi's Avatar
Join Date: Dec 2003
Location: Boston, MA
Posts: 748
Kristi has a spectacular aura aboutKristi has a spectacular aura about
Send a message via AIM to Kristi Send a message via MSN to Kristi
Quote:
Originally Posted by Chandler View Post
MD5 secret flags. That's how I coded V$:C's user account system.
any corrupt staff could still insert a way to intercept the variable before its encrypted moment. Napo's idea is a good one.
__________________
Reply With Quote
  #17  
Old 02-22-2007, 12:52 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
Quote:
Originally Posted by Kristi View Post
any corrupt staff could still insert a way to intercept the variable before its encrypted moment. Napo's idea is a good one.
That's true. However, a staff member could still find a way to avoid it I suppose. Although, you wouldn't allow a corrupt staff member on the force now, would you!
Reply With Quote
  #18  
Old 02-22-2007, 01:09 PM
Kristi Kristi is offline
Bowie's Deciple
Kristi's Avatar
Join Date: Dec 2003
Location: Boston, MA
Posts: 748
Kristi has a spectacular aura aboutKristi has a spectacular aura about
Send a message via AIM to Kristi Send a message via MSN to Kristi
Quote:
Originally Posted by Chandler View Post
That's true. However, a staff member could still find a way to avoid it I suppose. Although, you wouldn't allow a corrupt staff member on the force now, would you!
We are talking about a nonpaid workforce often comprised of minors...
__________________
Reply With Quote
  #19  
Old 02-22-2007, 01:18 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
Quote:
Originally Posted by Kristi View Post
We are talking about a nonpaid workforce often comprised of minors...
Hahaha.
Reply With Quote
  #20  
Old 02-22-2007, 04:59 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Wait, there are some websites that allow you to encrypt and unecrypt md5 hash.. :O

Well, using md5 can be good tho
__________________
Reply With Quote
  #21  
Old 02-22-2007, 05:05 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
You're right

Removed URL due to rule--

Just found it within five or so seconds

Last edited by Chandler; 02-22-2007 at 05:44 PM..
Reply With Quote
  #22  
Old 02-22-2007, 05:20 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by Chandler View Post
You're right

http://gdataonline.com/seekhash.php

Just found it within five or so seconds
Don't just external links :o
btw, sites like that
__________________
Reply With Quote
  #23  
Old 02-22-2007, 05:38 PM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Quote:
Originally Posted by Kristi View Post
The ugly:
This npc is on a one way abuse ticket. You are giving the entire server access to fill up an npc with as much information as they want (the user accounts), without any visual checks or etc. I would limit the amount of bank accounts the player can be associated with, or at least set up some type of check (like how most places now use an image check when registering so it cant be automated.)
If you do not do this, someone can automate a way to just sit there and create accounts all day, and going unchecked, this could be a really really bad thing (filling the server!).

Not at all.

You can only have one username per Graal account.

Quote:
Originally Posted by Kristi View Post
Any staff who has access to looking at that DB's flag could know the user's passwords! What if they use a password they use other places on the internet, like aim or email, or even worse... use their graal passwords! You know someone is going to do it, then some corrupt staff can go look for a random 8 character password! I would suggest using MD5 encryption on the serverside. However, the problem still lies with staff pretty much having access to scripts period. They could easily script something that intercepts that password on the clientside or serverside before it is encryped and compared in the first place. Variables on clientside are accessable no matter what way they are stored in a weapon. This can be very dangerous...
That doesn't really matter because of the fact that I made it a 10 character limit and I even added a password strength checker.

I don't know about you, but I find it hard to believe that people would use 10 character passwords for things such as emails and so forth.

Besides, why would you use the same password for your personal information on a registration NPC on Graal?

I don't know about you, but I wouldn't be bothered with having a 10 character password for every site I have to register with. Not to mention it's quite easy to give -r to the DB NPC so that no one except the Manager or so can access it (assuming that right doesn't allow you to access it even via script).

Quote:
Originally Posted by Kristi View Post
The bad:
You should break up these really long functions into smaller task functions with parameters, for more readable code. also, i see you use onBlahBlah for nonevent functions, when you write your own function, you dont need to do that. function blahBlah is fine. also, you dont need to put temp. in a parameter list. Anything in the parameter list is automatically temporary. EG:
function whatEvs(coolname).
coolname is automatically temporary, so you can refer to it as coolname or temp.coolname inside the funciton.
I don't really understand what you mean by this.

Quote:
Originally Posted by Kristi View Post
Password stuff
This was the only part of the script I did not fully make, the password strength checker. As I stated in my first post, Joey helped me with this part.

Are there better ways to do it? Most of the time there are always better ways of doing something, mostly due to the type of habits that certain scripters have, where they prefer one method over the other and so forth.

This system isn't perfect, but it's a 'core' system that can be tampered with to be made even greater to fit any server, really.

Quote:
Originally Posted by Kristi View Post
Sorry if any of this was offensive, but the security issues (the ugly) have to be addressed most of all. Anything else is just preference/efficiency.

No, it wasn't offensive at all, only that the issues weren't really issues.


Appreciate the feedback, though.
Reply With Quote
  #24  
Old 02-22-2007, 05:47 PM
Draenin Draenin is offline
Magnificent Bastard
Draenin's Avatar
Join Date: Dec 2004
Location: Bermuda Triangle
Posts: 6,790
Draenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud of
Send a message via AIM to Draenin Send a message via MSN to Draenin Send a message via Yahoo to Draenin
From the results you've shown in the screens, it is impressive.
Reply With Quote
  #25  
Old 02-22-2007, 06:56 PM
Kristi Kristi is offline
Bowie's Deciple
Kristi's Avatar
Join Date: Dec 2003
Location: Boston, MA
Posts: 748
Kristi has a spectacular aura aboutKristi has a spectacular aura about
Send a message via AIM to Kristi Send a message via MSN to Kristi
Quote:
Originally Posted by Gambet View Post
Not at all.

You can only have one username per Graal account.
Really? All i see on the serverside is this. Doesn't seem to check if the player account already has a bank account. If its on the clientside then youre screwed anyway because someone can always screw with clientside scripts and just trigger the server. This means they could still endlessly flood the database.

PHP Code:
 else if (params[0] == "Register")
   {
    if (
gambet_bankDB.(@params[1]) == "")
     {
      if (
gambet_bankDB.counter == ""
       { 
         
gambet_bankDB.counter 1;
       } else 
        {
          
gambet_bankDB.counter+=1;
        }
       
gambet_bankDB.(@params[1]) = {params[2],params[3],gambet_bankDB.counter,0};
       
gambet_bankDB.usernames_used.add(params[2]);
       
this.success "true";
     } else
      {
        
this.success "failed";
      }
    
player.triggerclient(name,"Registered",params[2],params[3],gambet_bankDB.counter,this.success);
   } 
Quote:
Originally Posted by Gambet View Post
That doesn't really matter because of the fact that I made it a 10 character limit and I even added a password strength checker.

I don't know about you, but I find it hard to believe that people would use 10 character passwords for things such as emails and so forth.

Besides, why would you use the same password for your personal information on a registration NPC on Graal?
I overlooked the password length check. That keeps people from using their graal password, so its a good start. However, even if its not an IDENTICAL password, that ten char password could lead to hints of what they use as passwords elseware. like "hey, i always use butter as my password, so ill use Butter1984 here." someone who can see this can still with a few tricks and turns still crack a password they use elseware. Its still a risk.

Quote:
Originally Posted by Gambet View Post
I don't know about you, but I wouldn't be bothered with having a 10 character password for every site I have to register with. Not to mention it's quite easy to give -r to the DB NPC so that no one except the Manager or so can access it (assuming that right doesn't allow you to access it even via script).
Like i said, you dont even need access to it, or even the clientside weapon. You can construct another weapon to add to their account that reads the string in other weapons. its very possible. its still a risk, and one you cant avoid.

Quote:
Originally Posted by Gambet View Post
I don't really understand what you mean by this.
You have one big long function serverside. Its good practice to break it up into tasks.
You had things like function onCheckWhatever(temp.stuff,temp.that). On just denotes an event (like onPlayerEnters). you dont need on in your custom declared functions. Also, you dont have to put temp. in the function declaration, they are temp. by default. CheckWhatever(stuff,that) is sufficient. inside that function you can access it as stuff or temp.stuff.

Quote:
Originally Posted by Gambet View Post
This was the only part of the script I did not fully make, the password strength checker. As I stated in my first post, Joey helped me with this part.

Are there better ways to do it? Most of the time there are always better ways of doing something, mostly due to the type of habits that certain scripters have, where they prefer one method over the other and so forth.
Yes! I provided a function even!

Quote:
Originally Posted by Gambet View Post
This system isn't perfect, but it's a 'core' system that can be tampered with to be made even greater to fit any server, really.
No one expects things to be perfect, however, its a security risk. I cannot just say thats okay.
__________________
Reply With Quote
  #26  
Old 02-22-2007, 07:07 PM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Quote:
Originally Posted by Kristi View Post
Really? All i see on the serverside is this. Doesn't seem to check if the player account already has a bank account. If its on the clientside then youre screwed anyway because someone can always screw with clientside scripts and just trigger the server. This means they could still endlessly flood the database.

I'm going to assume you overlooked this part, then:

PHP Code:
if (gambet_bankDB.(@params[1]) == ""


Quote:
Originally Posted by Kristi View Post
I overlooked the password length check. That keeps people from using their graal password, so its a good start. However, even if its not an IDENTICAL password, that ten char password could lead to hints of what they use as passwords elseware. like "hey, i always use butter as my password, so ill use Butter1984 here." someone who can see this can still with a few tricks and turns still crack a password they use elseware. Its still a risk.
I guess, but I can't exactly make up for the stupidity of some of the users. No matter how much thought you give into it, there will always be a skilled scripter that can find out the information anyways.

I don't exactly see a fullproof way of doing it.


Quote:
Originally Posted by Kristi View Post
You have one big long function serverside. Its good practice to break it up into tasks.
You had things like function onCheckWhatever(temp.stuff,temp.that). On just denotes an event (like onPlayerEnters). you dont need on in your custom declared functions. Also, you dont have to put temp. in the function declaration, they are temp. by default. CheckWhatever(stuff,that) is sufficient. inside that function you can access it as stuff or temp.stuff.
That onCheckWhatever part was created by Joey.

If you look at the rest of the script, I didn't do such in my custom functions.




Quote:
Originally Posted by Kristi View Post
No one expects things to be perfect, however, its a security risk. I cannot just say thats okay.

Wouldn't be a risk if the players would use some logic.

Though, I still don't know of a fullproof way of doing it, because there will always be methods of finding the password data.
Reply With Quote
  #27  
Old 02-22-2007, 08:35 PM
Kristi Kristi is offline
Bowie's Deciple
Kristi's Avatar
Join Date: Dec 2003
Location: Boston, MA
Posts: 748
Kristi has a spectacular aura aboutKristi has a spectacular aura about
Send a message via AIM to Kristi Send a message via MSN to Kristi
Quote:
Originally Posted by Gambet View Post
I'm going to assume you overlooked this part, then:
if (gambet_bankDB.(@params[1]) == "")
params[1] can be anything the client passes it, for example, sadgkhssdfsdkjlj! So its still exploitable to keep filling your database, even claiming bank accounts for other peoples graal accounts BEFORE they do :O.
if(gambet_bankDB.(@player.account) == "")


Quote:
Originally Posted by Gambet View Post
I guess, but I can't exactly make up for the stupidity of some of the users. No matter how much thought you give into it, there will always be a skilled scripter that can find out the information anyways.

I don't exactly see a fullproof way of doing it.
Then just DONT do it! Graal, as of now, has no safe way to protect data in a client. Why even present a risk you KNOW is there. Do you plan on telling the players its POSSIBLE a rouge staff could get their password if they wanted to? How would they feel about it? You cannot just let them believe its safe.
I don't ever make my passwords the same theme, but MOST people do.

Quote:
Originally Posted by Gambet View Post
That onCheckWhatever part was created by Joey.

If you look at the rest of the script, I didn't do such in my custom functions.
Hey, in the end it was your release.




Quote:
Originally Posted by Gambet View Post
Wouldn't be a risk if the players would use some logic.

Though, I still don't know of a fullproof way of doing it, because there will always be methods of finding the password data.
You cannot assume all (even most) players are logical. It is your job to protect such data if you are going to ask for it, and honestly, with what is available to graal, you can't.
__________________
Reply With Quote
  #28  
Old 02-22-2007, 08:41 PM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Quote:
Originally Posted by Kristi View Post
Then just DONT do it! Graal, as of now, has no safe way to protect data in a client. Why even present a risk you KNOW is there. Do you plan on telling the players its POSSIBLE a rouge staff could get their password if they wanted to? How would they feel about it? You cannot just let them believe its safe.
I don't ever make my passwords the same theme, but MOST people do.
It doesn't really matter if anyone sees what password you put as your password for your Graal bank account unless they feel like assuming you use that same password for other things and bother checking into it, which is an unlikely situation if you have trustworthy staff.

Hell, anyone could easily send a keylogger over to another person to steal their information if they wanted to. You think most Graalians could even bother to learn about anti-virus protection? And even with that there are ways to bypass detection.

Quote:
Originally Posted by Kristi View Post
Hey, in the end it was your release.
Yes, but you make it sound like it was done for each custom function.

It's not really a big deal, it's easily fixable.

Quote:
Originally Posted by Kristi View Post
You cannot assume all (even most) players are logical. It is your job to protect such data if you are going to ask for it, and honestly, with what is available to graal, you can't.

That's no excuse not to have such systems.

If the player knows it's possible for staff to see their password and they still choose to use a similar password as those that they use on other sites, then I'm sorry to say this, but they deserve to get their accounts hijacked for being such imbeciles.
Reply With Quote
  #29  
Old 02-22-2007, 09:22 PM
Kristi Kristi is offline
Bowie's Deciple
Kristi's Avatar
Join Date: Dec 2003
Location: Boston, MA
Posts: 748
Kristi has a spectacular aura aboutKristi has a spectacular aura about
Send a message via AIM to Kristi Send a message via MSN to Kristi
Quote:
Originally Posted by Gambet View Post
If the player knows it's possible for staff to see their password and they still choose to use a similar password as those that they use on other sites, then I'm sorry to say this, but they deserve to get their accounts hijacked for being such imbeciles.
IF a player knows, which is a pretty big assumption, wouldn't you say? They deserve to be protected. Using a common theme password is common amongst MOST people. Usually bad actions are a result of tensions, like, lets say a staff member hates a player, then hes like OH i want to RUIN HIS LIFE BY STEALING HIS EMAIL. So then he intercepts his bank password for clues on how he formulates his passwords, and gets to random cracking attempts. He is now more equipped to do so then before, thus making the poor player have a disadvanteous position due to this script. Just saying your players are "Imbesiles" and therefore deserve to be open to this risk is a horrible thing to say, and bad service as staff! You seem to be unaware how many people would assume their information is safe and trust the server they love, and here you are saying its their fault if they use something wrong. At least inform them that staff can see these passwords.
__________________
Reply With Quote
  #30  
Old 02-22-2007, 09:33 PM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Quote:
Originally Posted by Kristi View Post
IF a player knows, which is a pretty big assumption, wouldn't you say? They deserve to be protected. Using a common theme password is common amongst MOST people. Usually bad actions are a result of tensions, like, lets say a staff member hates a player, then hes like OH i want to RUIN HIS LIFE BY STEALING HIS EMAIL. So then he intercepts his bank password for clues on how he formulates his passwords, and gets to random cracking attempts. He is now more equipped to do so then before, thus making the poor player have a disadvanteous position due to this script. Just saying your players are "Imbesiles" and therefore deserve to be open to this risk is a horrible thing to say, and bad service as staff! You seem to be unaware how many people would assume their information is safe and trust the server they love, and here you are saying its their fault if they use something wrong. At least inform them that staff can see these passwords.

If they use the script then they should know how it works, thus they can go about securing it as they wish.


If I based my systems on the level of intelligence of the average Graalian, I'd probably make everything text based, requiring absolutely no information to be given from the player, mostly due to the fact that players don't even read long descriptions and so forth.


Hell, if they do get hijacked they can take it as a learning experience. The warnings have been laid out, it's the users responsibility to heed the warnings and intelligently create a password that would have little to do with their actual passwords that they use for other things.


You base your arguments assuming that the players will use similar passwords to those they use on other sites, and then you go on to assume that your staff will try to hijack email accounts and so forth with this information, which is going way out of the limb, though yes, it may be possible in some instances, but nobody is going to check each and every password for each and every player's email accounts to see which one is a match.

It's always nice to give way to all possibilities, but when there's no way of securing the information, all you can do is give out warnings and hope the players heed to them.

I'd understand you arguing if there were currently a way to secure the passwords, but since there isn't, I don't really see why we need to continue going back and forth.

I understand the risks, thus you're talking to the wrong person. If I could secure the password system, I would.
Reply With Quote
  #31  
Old 02-22-2007, 09:51 PM
Kristi Kristi is offline
Bowie's Deciple
Kristi's Avatar
Join Date: Dec 2003
Location: Boston, MA
Posts: 748
Kristi has a spectacular aura aboutKristi has a spectacular aura about
Send a message via AIM to Kristi Send a message via MSN to Kristi
Quote:
Originally Posted by Gambet View Post
I'd understand you arguing if there were currently a way to secure the passwords, but since there isn't, I don't really see why we need to continue going back and forth.

I understand the risks, thus you're talking to the wrong person. If I could secure the password system, I would.
Because you are calling the players idiots instead of doing anything. Revise the script to say *Staff can see your password, so do not choose anything that resembles passwords on other things you own* or something along those lines. Make it loud and clear.

There are things you can do to at least better it, like md5 ;/
__________________
Reply With Quote
  #32  
Old 02-22-2007, 09:57 PM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Quote:
Originally Posted by Kristi View Post
Because you are calling the players idiots instead of doing anything. Revise the script to say *Staff can see your password, so do not choose anything that resembles passwords on other things you own* or something along those lines. Make it loud and clear.

There are things you can do to at least better it, like md5 ;/

You're calling the players idiots as much as I am, only in my case it's explicit and in yours it's implicit.

If someone wanted to go as far as trying to crack a persons password based on something as stupid as a Graal bank password, then what makes you think they wouldn't go to an md5 decryption site that does the work for them?

Sure, it would require an extra step, but if they're willing to do it in the first place, it won't stop them.
Reply With Quote
  #33  
Old 02-22-2007, 10:02 PM
Kristi Kristi is offline
Bowie's Deciple
Kristi's Avatar
Join Date: Dec 2003
Location: Boston, MA
Posts: 748
Kristi has a spectacular aura aboutKristi has a spectacular aura about
Send a message via AIM to Kristi Send a message via MSN to Kristi
Quote:
Originally Posted by Gambet View Post
You're calling the players idiots as much as I am, only in my case it's explicit and in yours it's implicit.

If someone wanted to go as far as trying to crack a persons password based on something as stupid as a Graal bank password, then what makes you think they wouldn't go to an md5 decryption site that does the work for them?

Sure, it would require an extra step, but if they're willing to do it in the first place, it won't stop them.
There is nothing wrong with being more secure. Of course its still flawed, but it can still be a deterrent. Also, my request for stating that staff can see your password right in the npc, as my last post requested, still stands, not to mention the other safety edit (using player.account serverside instead of letting the client pass what their account name is, since they can change it)
__________________
Reply With Quote
  #34  
Old 02-22-2007, 10:03 PM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Quote:
Originally Posted by Kristi View Post
There is nothing wrong with being more secure. Of course its still flawed, but it can still be a deterrent. Also, my request for stating that staff can see your password right in the npc, as my last post requested, still stands.

If I ever get back to touching up this system, then sure, but for now, I'll leave it up to whoever decides to use it on their server.
Reply With Quote
  #35  
Old 02-23-2007, 07:05 AM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
How about instead of a password, the script generates a 5 number long code which is used as a pin? Saves letting the user possibly give out an important password.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 04:27 AM.


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