Auto registration in login screen

Page 1 of 2 12 LastLast
Results 1 to 15 of 21
  1. #1
    Enthusiast MeTaD is offline
    MemberRank
    Jan 2012 Join Date
    Valencia, VenezLocation
    43Posts

    Auto registration in login screen

    ALERT: This script is currently on testing, you may suffer an Spam registration on your database because this script doesn't has a protection for it, but we are working on it!

    This query basically allow you to have a registration on you login screen (where you select the server) when the user accouny does NOT exists, it creates it and logs in that recently created account, so, yo don't need a resgistration web... It is recommended to enable captcha with 6 characters if you are going to use this query to prevent in a way the spam, you must have in mind too that if an user accidentaly writes his username bad it is going to crete a new account and probably he will think that his character has been deleted... I'm working on that too

    Well, I have created a simple query to register an user in an attempt of logging...
    just run this query, it is going to edit an stored procedure in SRO_VT_ACCOUNT (_CertifyTB_User)

    The forum is adding a tag to the code, i will upload it as a txt but ill leave this here for refeernce, DO NOT USE THE CODE POSTED BELOW, INSTEAD USE THE .TXT UPLOADED!
    PHP Code:

    USE [SRO_VT_ACCOUNT]
    GO
    /****** Object:  StoredProcedure [dbo].[_CertifyTB_User]    Script Date: 01/23/2014 15:56:29 ******/
    SET ANSI_NULLS OFF
    GO
    SET QUOTED_IDENTIFIER OFF
    GO


    ALTER    PROCEDURE 
    [dbo].[_CertifyTB_User]
     [
    MENTION=2000043826]szu[/MENTION]serID    varchar(25),
        @
    szPassword    varchar(50)
    AS
        declare [
    MENTION=77438]Nuser[/MENTION]JID int
        
    declare [MENTION=77438]Nuser[/MENTION]JIDMeTaD int
        
    declare @sec_primary tinyint
        
    declare @sec_content tinyint
        set 
    [MENTION=77438]Nuser[/MENTION]JID        0
        set 
    [MENTION=77438]Nuser[/MENTION]JIDMeTaD        0
        set    
    @sec_primary        0
        set    
    @sec_content        0
    --@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    --        
    º£Æ®³² °æÇèÄ¡ Á¾·®Á¦ (ÃÖ¼±È£)
    --@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
        declare @
    AccPlayTime int
        
    declare [MENTION=1333470999]Late[/MENTION]stUpdateTime_ToPlayTime int
        set 
    @AccPlayTime 0
        set 
    [MENTION=1333470999]Late[/MENTION]stUpdateTime_ToPlayTime 0
        select 
    [MENTION=77438]Nuser[/MENTION]JID JID, @sec_primary sec_primary, @sec_content sec_content, @AccPlayTime AccPlayTime, [MENTION=1333470999]Late[/MENTION]stUpdateTime_ToPlayTime LatestUpdateTime_ToPlayTime from TB_User
    --@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    --@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
        
    where StrUserID = [MENTION=2000043826]szu[/MENTION]serID and password = @szPassword
        
    if( [MENTION=77438]Nuser[/MENTION]JID or [MENTION=77438]Nuser[/MENTION]JID is null or @@error <> or @@rowcount 0)
        
    begin
        
    --MeTaD
            select 
    [MENTION=77438]Nuser[/MENTION]JIDMeTaD JID from TB_User where StrUserID = [MENTION=2000043826]szu[/MENTION]serID
            
    if( [MENTION=77438]Nuser[/MENTION]JIDMeTaD or [MENTION=77438]Nuser[/MENTION]JID is null or @@error <> or @@rowcount 0)
                
    begin
                    
    print "El usuario NO existe"
                    
    IF  [MENTION=2000043826]szu[/MENTION]serID LIKE "%[^a-zA-Z0-9]%") --Idea from Tazdingo
                        begin
                            select convert
    tinyint1), convertint0), converttinyint0), converttinyint0)
                        
    end
                    
    else
                        
    begin
                            insert into TB_User
    (StrUserID,password,sec_primary,sec_contentvalues  [MENTION=2000043826]szu[/MENTION]serID, @szPassword,'3','3'
                            
    EXEC _CertifyTB_User [MENTION=2000043826]szu[/MENTION]serID,@szPassword
                        end
                    
    return
                
    end
            
    else
                
    begin
                    
    print "El usuario existe"
                    
    select converttinyint1), convertint0), converttinyint0), converttinyint0)
                    return
                
    end
        
    --MeTaD
            
            
            select convert
    tinyint1), convertint0), converttinyint0), converttinyint0)
            return
        
    end
        
    if( existsselect Type from _BlockedUser where UserJID = [MENTION=77438]Nuser[/MENTION]JID and Type and getdate() between timeBegin and timeEnd))
        
    begin
            select convert
    tinyint3), [MENTION=77438]Nuser[/MENTION]JIDconverttinyint0), converttinyint0)
            return
        
    end

    --@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    --        
    º£Æ®³² °æÇèÄ¡ Á¾·®Á¦ (ÃÖ¼±È£)
    --@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
        
    select convert(tinyint0), [MENTION=77438]Nuser[/MENTION]JID, @sec_primary, @sec_content, @AccPlayTime, [MENTION=1333470999]Late[/MENTION]stUpdateTime_ToPlayTime
    --@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    --@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

        return 

    ENJOY!

    UPDATE
    Thanks to the idea given from tazdingo, I've succesfully edited the query to protect it from an SQL Injection, I'm going to keep working on the Spam issue, but i think now it is safe to be used, remember, use it at your own risk.
    Attached Files Attached Files
    Last edited by MeTaD; 22-01-14 at 09:37 PM.


  2. #2
    SilkRoad loveme is offline
    MemberRank
    Sep 2011 Join Date
    JanganLocation
    498Posts

    Re: Auto registration in login screen

    What exactly is this?

  3. #3
    Valued Member stemale is offline
    MemberRank
    Jul 2005 Join Date
    127Posts

    Re: Auto registration in login screen

    Read the title "Auto registration"

  4. #4
    Account Upgraded | Title Enabled! lemoniscool is offline
    MemberRank
    Nov 2009 Join Date
    GermanyLocation
    579Posts

    Re: Auto registration in login screen

    dont use it, it will make your login screen enable SQL injection =)
    besides its dumb, even if you fix the SQLi people will be able to spam your db with accounts (by useing a modded clientless to make it faster) and aside of that it also has some wrong logic inside (check the if statements after "--MeTaD")

  5. #5
    Enthusiast MeTaD is offline
    MemberRank
    Jan 2012 Join Date
    Valencia, VenezLocation
    43Posts

    Re: Auto registration in login screen

    Quote Originally Posted by lemoniscool View Post
    dont use it, it will make your login screen enable SQL injection =)
    besides its dumb, even if you fix the SQLi people will be able to spam your db with accounts (by useing a modded clientless to make it faster) and aside of that it also has some wrong logic inside (check the if statements after "--MeTaD")
    Thank you for the information, I'll work to secure it, I didn't thought on it... By the way, you can enable captcha and will be harder to Spam the database

  6. #6
    SilkRoad vSro Service MaDenGo is offline
    MemberRank
    Aug 2012 Join Date
    vSro CommunityLocation
    512Posts

    Re: Auto registration in login screen

    Awesome lemoniscool i think you catch him

  7. #7
    Enthusiast MeTaD is offline
    MemberRank
    Jan 2012 Join Date
    Valencia, VenezLocation
    43Posts

    Re: Auto registration in login screen

    Ey, I didn't do this with a bad intention, I was really trying to release something useful...
    I hope that with the BIG red alert i'm showing that i have no bad intentions

  8. #8
    SilkRoad vSro Service MaDenGo is offline
    MemberRank
    Aug 2012 Join Date
    vSro CommunityLocation
    512Posts

    Re: Auto registration in login screen

    Quote Originally Posted by MeTaD View Post
    Ey, I didn't do this with a bad intention, I was really trying to release something useful...
    I hope that with the BIG red alert i'm showing that i have no bad intentions
    It's ok bro , i just thanked him to alert us

  9. #9
    Proficient Member Tazdingo is offline
    MemberRank
    Nov 2010 Join Date
    153Posts

    Re: Auto registration in login screen

    Just make a return when the id or password have symbols(=!%&') etc

  10. #10
    SilkRoad loveme is offline
    MemberRank
    Sep 2011 Join Date
    JanganLocation
    498Posts

    Re: Auto registration in login screen

    Msg 102, Level 15, State 1, Procedure _CertifyTB_User, Line 33
    Incorrect syntax near '@szuserID'.

  11. #11
    Moderator Blacksheep25 is offline
    ModeratorRank
    Jan 2009 Join Date
    AustraliaLocation
    715Posts

    Re: Auto registration in login screen

    It's a good idea, but yeah it is very easy to spam the login screen to keep creating accounts.

  12. #12
    Account Upgraded | Title Enabled! Artuuro_lv is offline
    MemberRank
    Jun 2008 Join Date
    UKLocation
    310Posts

    Re: Auto registration in login screen

    to avoid spam you can add filter in query.

  13. #13
    Account Upgraded | Title Enabled! lemoniscool is offline
    MemberRank
    Nov 2009 Join Date
    GermanyLocation
    579Posts

    Re: Auto registration in login screen

    to avoid spam you would have to add either a captcha or save the last registration time by ip in a table and check if its been at least 24 hours between it ^^
    aside of that ... what about typos? imagine .. someone actually is registered already with the username HeyDude and now he tries to login but accidently hits HeySude .. he will be registered new and will be shocked in the first moment cuz his hard work on his char seems to be lost and most likely he will just create a new char and be angry about the GMs while actually he is in a different account ..

    Quote Originally Posted by Tazdingo View Post
    Just make a return when the id or password have symbols(=!%&') etc
    youre right that would help already but dont forget to return at - too

  14. #14
    Account Upgraded | Title Enabled! CoderWaxy is offline
    MemberRank
    Aug 2012 Join Date
    Russia, SPBurgLocation
    315Posts

    Re: Auto registration in login screen

    Guys i Dont UnderStand any thing
    What is That Query Do ?

  15. #15
    Moderator Blacksheep25 is offline
    ModeratorRank
    Jan 2009 Join Date
    AustraliaLocation
    715Posts

    Re: Auto registration in login screen

    It makes it so at the login screen you can create an account by typing in an id+pw :)



Page 1 of 2 12 LastLast

Advertisement