Simple AutoRegister Source

Newbie Spellweaver
Joined
Oct 11, 2009
Messages
5
Reaction score
0
It use all version.

go to net-login-handler-LoginPasswordHandler.java

[ Find ]

loginok = c.login(login, pwd, ipBan || macBan);

[ Add Below ]

if(loginok == 5) {
Connection con = (Connection) DatabaseConnection.getConnection();
try {
PreparedStatement ps = (PreparedStatement) con.prepareStatement("INSERT INTO accounts (name, password) VALUES (?, ?)");
ps.setString(1, login);
ps.setString(2, LoginCrypto.hexSha1(pwd));
ps.executeUpdate();
ps.close();
} catch(Exception e) {
loginok = c.login(login, pwd, ipBan || macBan);
}
loginok = c.login(login, pwd, ipBan || macBan);
}

and go to net-clien-LoginCrypto.java

[ Find ]

private static String hexSha1(String in) {

[ Replace ]

public static String hexSha1(String in) {

very simple :D
 
Just add in a {} that checks if the user is made o.O
or steal from ThePack
PHP:
   public static boolean getAccountExists(String login) {
        boolean accountExists = false;
        Connection con = DatabaseConnection.getConnection();
        try {
            PreparedStatement ps = con.prepareStatement("SELECT name FROM accounts WHERE name = ?");
            ps.setString(1, login);
            ResultSet rs = ps.executeQuery();
            if (rs.first()) {
                accountExists = true;
            }
        } catch (Exception ex) {
        }
        return accountExists;
    }
 
Last edited:
multi same user wow login server searching for user it might crash or login stucker so rework your code plz lol or use airflow's

For one thing, it WON'T CRASH the server. and 2nd, this just needs 1 extra line of code to make it check for existing accounts.
 
Everybody can copy this from thepack, I don't really think this is a good release, but ohwell.
 
Back