RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Multi accounting

Can you guys tell me how come even if MaxaccountperIP is 1, this week a couple people created 3-4 accounts each?

with the SAME ip?
 

Attachments

  • AccountHandler.cs
    12.5 KB · Views: 4

Enroq

Sorceror
I think the chances are that they do not have a static IP or are some how manipulating it. It's very easy to do so. Unfortunately this tends to be something you have to enforce manually.
 
One was connected with the same ip on both account and the account was created like 1min ago when I looked... I tried to create a new account (on local ip) and it worked perfectly.. is there a variable somewhere that allows it? in another script i dont know about?
 

Enroq

Sorceror
This is what my CreateAccount looks like, and seems to be working properly.

Code:
        private static Account CreateAccount( NetState state, string un, string pw )
        {
            if( un.Length == 0 || pw.Length == 0 )
                return null;
 
            bool isSafe = !( un.StartsWith( " " ) || un.EndsWith( " " ) || un.EndsWith( "." ) );
 
            for( int i = 0; isSafe && i < un.Length; ++i )
                isSafe = ( un[i] >= 0x20 && un[i] < 0x7F && !IsForbiddenChar( un[i] ) );
 
            for( int i = 0; isSafe && i < pw.Length; ++i )
                isSafe = ( pw[i] >= 0x20 && pw[i] < 0x7F );
 
            if( !isSafe )
                return null;
 
            if( !CanCreate( state.Address ) )
            {
                Console.WriteLine( "Login: {0}: Account '{1}' not created, ip already has {2} account{3}.", state, un, MaxAccountsPerIP, MaxAccountsPerIP == 1 ? "" : "s" );
                return null;
            }
 
            Console.WriteLine( "Login: {0}: Creating new account '{1}'", state, un );
 
            Account a = new Account( un, pw );
 
            return a;
        }

Code:
        public static bool CanCreate( IPAddress ip )
        {
            if( !IPTable.ContainsKey( ip ) )
                return true;
 
            return (IPTable[ip] < MaxAccountsPerIP);
        }
 

Enroq

Sorceror
That space doesn't matter. All I can tell you is you changed something you don't remember. I do it all the time.
 
Top