[Tutorial] Ban for Hardware ID

Page 3 of 3 FirstFirst 123
Results 51 to 68 of 68
  1. #51
    My Status --> LukasCCB is offline
    Grand MasterRank
    Apr 2013 Join Date
    CracolandiaLocation
    1,189Posts

    Re: [Tutorial] Ban for Hardware ID

    How to fix my HWID ??

    Screenshot by Lightshot


    Last edited by LukasCCB; 28-06-15 at 07:36 AM.

  2. #52
    Elite Member Doky is offline
    Member +Rank
    Oct 2014 Join Date
    BrazilLocation
    127Posts

    Re: [Tutorial] Ban for Hardware ID

    thank you for code
    it is generating a new ID for each new login from the same user



    help-me please

  3. #53
    Sorcerer Supreme GetRektBambi is offline
    Member +Rank
    Oct 2015 Join Date
    268Posts

    Re: [Tutorial] Ban for Hardware ID

    Quote Originally Posted by Doky View Post
    thank you for code
    it is generating a new ID for each new login from the same user



    help-me please
    id is the same.. It's simply tracking there hardware id every time they login, what if they changed their hardware at some point? Had a second pc? This is normal.

  4. #54
    Newbie Mehmet Royale is offline
    MemberRank
    Dec 2015 Join Date
    5Posts

    Re: [Tutorial] Ban for Hardware ID

    http://i.hizliresim.com/kBWMn9.png Help me

    - - - Updated - - -


  5. #55
    My Status --> LukasCCB is offline
    Grand MasterRank
    Apr 2013 Join Date
    CracolandiaLocation
    1,189Posts

    Re: [Tutorial] Ban for Hardware ID

    Quote Originally Posted by Mehmet Royale View Post
    ....
    Alter all for this
    [SQL] FIX! - Pastebin.com

  6. #56
    Sorcerer Supreme GetRektBambi is offline
    Member +Rank
    Oct 2015 Join Date
    268Posts

    Re: [Tutorial] Ban for Hardware ID

    Quote Originally Posted by lukasccb View Post
    Alter all for this
    [SQL] FIX! - Pastebin.com
    lol
    Why bother? These guys that msg like that are not fit to dev a game, or even call themselves developers.
    i will update my signature now for the fun of it.

  7. #57
    Yuri-BR#1559 Yuri-BR is offline
    DeveloperRank
    Apr 2013 Join Date
    ☣️❤️Location
    1,039Posts

    Re: [Tutorial] Ban for Hardware ID

    Quote Originally Posted by Mehmet Royale View Post
    http://i.hizliresim.com/kBWMn9.png Help me

    - - - Updated - - -

    this is a '@' tag problem from ragezone
    Last edited by Yuri-BR; 19-03-16 at 01:29 PM.

  8. #58
    My Status --> LukasCCB is offline
    Grand MasterRank
    Apr 2013 Join Date
    CracolandiaLocation
    1,189Posts

    Re: [Tutorial] Ban for Hardware ID

    Quote Originally Posted by GetRektBambi View Post
    lol
    Why bother? These guys that msg like that are not fit to dev a game, or even call themselves developers.
    i will update my signature now for the fun of it.
    I suffered the same with many things, if not the ragezone.
    today I would be out there yet.


    I like to help contribute.
    I'm not miserable

    Sorry my english :(

  9. #59
    Newbie Mehmet Royale is offline
    MemberRank
    Dec 2015 Join Date
    5Posts

    Re: [Tutorial] Ban for Hardware ID

    launcher login failed :(

  10. #60
    My Status --> LukasCCB is offline
    Grand MasterRank
    Apr 2013 Join Date
    CracolandiaLocation
    1,189Posts

    Re: [Tutorial] Ban for Hardware ID

    @Mehmet Royale
    you need to have attention on the code, redo the tutorial, is missing something.

  11. #61
    Newbie Mehmet Royale is offline
    MemberRank
    Dec 2015 Join Date
    5Posts

    Re: [Tutorial] Ban for Hardware ID

    thank you problem fixed

  12. #62
    Member banger666 is offline
    MemberRank
    Dec 2015 Join Date
    L.ALocation
    47Posts

    Re: [Tutorial] Ban for Hardware ID

    Anyone knows how to fix this? My source is Vusion from 2013... All is working, launcher, fine, but HWID doesn't show in the HWID_Log, why and how to fix? :/
    (PICTURE UNDER ME)

  13. #63
    Newbie Mehmet Royale is offline
    MemberRank
    Dec 2015 Join Date
    5Posts

    Re: [Tutorial] Ban for Hardware ID

    xxxxxx
    Last edited by Mehmet Royale; 19-01-17 at 03:16 AM.

  14. #64
    Member banger666 is offline
    MemberRank
    Dec 2015 Join Date
    L.ALocation
    47Posts

    Re: [Tutorial] Ban for Hardware ID

    anyone please?

  15. #65
    Newbie utku1934 is offline
    MemberRank
    Feb 2011 Join Date
    18Posts

    Re: [Tutorial] Ban for Hardware ID

    Quote Originally Posted by Yuri-BR View Post
    Tutorial for Hardware ID Ban by Yuri-BR


    Solution RSUpdate >
    WOLoginHelper.cpp
    Spoiler:

    Search for:
    PHP Code:
    #include "SteamHelper.h" 
    Add:
    PHP Code:
    #include "HWInfo.h" 
    Search for:
    PHP Code:
    SaveUserName(); 
    Add:
    PHP Code:
    LoadComputerToken(); 
    Search for:
    PHP Code:
    req.AddParam("password"passwd); 
    Add:
    PHP Code:
    req.AddParam("computerid"hardwareid); 
    Search for:
    PHP Code:
    bool CLoginHelper::LoadUserName()
    {
        
    // query for game registry node
        
    HKEY hKey;
        
    int hr;
        
    hr RegOpenKeyEx(HKEY_CURRENT_USER
            
    "Software\\Arktos Entertainment Group\\WarZ"
            
    0
            
    KEY_ALL_ACCESS
            &
    hKey);
        if(
    hr != ERROR_SUCCESS)
            return 
    true;

        
    DWORD size sizeof(username);
        
    hr RegQueryValueEx(hKey"username"NULLNULL, (BYTE*)username, &size);
        
    RegCloseKey(hKey);

        return 
    true;

    Add:
    PHP Code:
    bool CLoginHelper::LoadComputerToken(){
        
    HKEY hKey;
        
    int hr;
        
    hr RegOpenKeyEx(HKEY_CURRENT_USER
            
    "Software\\House of Warrior Interactive\\WarZ"
            
    0
            
    KEY_ALL_ACCESS
            &
    hKey);
        if(
    hr != ERROR_SUCCESS)
        {
            
    CreateComputerToken();
            return 
    true;
        }

        
    DWORD size sizeof(hardwareid);
        
    hr RegQueryValueEx(hKey"hardwareid"NULLNULL, (BYTE*)hardwareid, &size);
        
    RegCloseKey(hKey);

        return 
    true;
    }

    void CLoginHelper::CreateComputerToken()
    {
        
    HKEY hKey;
        
    int hr;
        
    hr RegCreateKeyEx(HKEY_CURRENT_USER
            
    "Software\\House of Warrior Interactive\\WarZ"
            
    0
            
    NULL,
            
    REG_OPTION_NON_VOLATILE
            
    KEY_ALL_ACCESS,
            
    NULL,
            &
    hKey,
            
    NULL);
        if(
    hr == ERROR_SUCCESS)
        {
            
    CHWInfo g_HardwareInfo;
            
    g_HardwareInfo.Grab();
            
    sprintf(hardwareid"0x%I64x"g_HardwareInfo.uniqueId); // Hardware ID By Yuri-BR

            
    DWORD size strlen(hardwareid) + 1;

            
    hr RegSetValueEx(hKey"hardwareid"NULLREG_SZ, (BYTE*)hardwareidsize);
            
    RegCloseKey(hKey);
        }



    WOLoginHelper.h
    Spoiler:

    Search for:
    PHP Code:
    char        passwd[128]; 
    Add:
    PHP Code:
    char        hardwareid[50]; 
    Search for:
    PHP Code:
    bool        LoadUserName(); 
    Add:
    PHP Code:
    bool        LoadComputerToken();
    void        CreateComputerToken(); 


    Solution WZBackend-ASP.NET > api_login.aspx.cs
    Spoiler:

    Search for:
    PHP Code:
    string password web.Param("password"); 
    Add:
    PHP Code:
    string computerid web.Param("computerid"); 
    Search for:
    PHP Code:
    sqcmd.Parameters.AddWithValue("@in_Password"password); 
    Add:
    PHP Code:
    sqcmd.Parameters.AddWithValue("@in_HardwareID"computerid); 


    SQL Server 2008 > Run this script in the database
    Spoiler:

    HWID_Log
    PHP Code:
    USE [WarZ]
    GO
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE 
    [dbo].[HWID_Log](
    [
    id] [intIDENTITY(1,1NOT NULL,
    [
    CustomerID] [intNOT NULL,
    [
    ip] [nvarchar](50NOT NULL,
    [
    HardwareID] [nvarchar](50NOT NULL,
    [
    time] [datetimeNOT NULL,
    CONSTRAINT [PK_LoginLogPRIMARY KEY CLUSTERED 
    (
    [
    idASC
    )WITH (PAD_INDEX OFFSTATISTICS_NORECOMPUTE OFFIGNORE_DUP_KEY OFFALLOW_ROW_LOCKS ONALLOW_PAGE_LOCKS ONON [PRIMARY]
    ON [PRIMARY]
    GO 
    HWID_Ban
    PHP Code:
    USE [WarZ]
    GO
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE 
    [dbo].[HWID_Ban](
    [
    HardwareID] [nvarchar](50NOT NULL,
    [
    Reason] [nvarchar](200NOT NULL,
    CONSTRAINT [PK_MacBanPRIMARY KEY CLUSTERED 
    (
    [
    HardwareIDASC
    )WITH (PAD_INDEX OFFSTATISTICS_NORECOMPUTE OFFIGNORE_DUP_KEY OFFALLOW_ROW_LOCKS ONALLOW_PAGE_LOCKS ONON [PRIMARY]
    ON [PRIMARY]
    GO 


    Navicat > WarZ > dbo > function > WZ_ACCOUNT_LOGIN
    Spoiler:

    Search for:
    PHP Code:
    @in_EMail varchar(100), 
    Add:
    PHP Code:
    @in_HardwareID varchar(50), 
    Search for:
    PHP Code:
    exec WZ_ACCOUNT_LOGIN_EXEC @in_IP
    Add:
    PHP Code:
    @in_HardwareID


    WZ_ACCOUNT_LOGIN_EXEC
    Spoiler:

    Search for:
    PHP Code:
    @in_IP varchar(100), 
    Add:
    PHP Code:
    @in_HardwareID varchar(50), 
    Search for:
    PHP Code:
    -- check if game is still active or 90sec passed from last update (COPYPASTE_GAMECHECKsearch for others)
        if(@
    GameServerId and DATEDIFF(second,    [MENTION=1333422059]LASTGAME[/MENTION]dateGETDATE()) < 90begin
            select
                0 
    as LoginResult,
                   [
    MENTION=25895]Custom[/MENTION]erID as CustomerID,
                
    70 as AccountStatus,    -- game still active code
                0 
    as SessionID,
                
    as IsDeveloper
            
    return
        
    end 
    Add:
    PHP Code:
    -- Ban por Hardware ID by Yuri-BR
        
    IF (EXISTS(SELECT FROM HWID_Ban WHERE HardwareID = @in_HardwareID)) 
        
    BEGIN
            select
                3 
    as LoginResult,
                   [
    MENTION=25895]Custom[/MENTION]erID as CustomerID,
                
    200 as AccountStatus,
                
    as SessionID,
                
    as IsDeveloper
            
    return
        
    END 
    Search for:
    PHP Code:
    INSERT INTO Logins 
            
    (CustomerIDLoginTimeIPLoginSource
        
    VALUES 
                
    [MENTION=25895]Custom[/MENTION]erIDGETDATE(), @in_IP0
    Add:
    PHP Code:
    -- Insert to HWID_Log
        
    --if @in_HardwareID != ''
        
    --begin
            INSERT INTO HWID_Log 
    (CustomerIDipHardwareIDtimeVALUES     [MENTION=25895]Custom[/MENTION]erID,@in_IP,@in_HardwareID,GETDATE())
        --
    end 


    Add message for Ban Hardware ID and Fix

    LauncherConfig.cpp
    Spoiler:

    Search for:
    PHP Code:
    accountBannedMessage r3dReadCFG_S(configFilegroup"accountBannedMessage",
            
    "Your account has been permanently banned"); 
    Add:
    PHP Code:
    accountHWBannedMessage r3dReadCFG_S(configFilegroup"accountHWBannedMessage",
            
    "Your account has been banned by HardwareID"); 


    LauncherConfig.h
    Spoiler:

    Search for:
    PHP Code:
    std::string accountBannedMessage
    Add:
    PHP Code:
    std::string accountHWBannedMessage


    In Updater.cpp
    Spoiler:

    Search for:
    PHP Code:
    case CLoginHelper::ANS_Banned:
            
    loginErrMsg_ "Your account has been permanently banned";
            
    MessageBox(NULLgLauncherConfig.accountBannedMessage.c_str(), "Login"MB_OK MB_ICONSTOP);
            break; 
    Add:
    PHP Code:
    case CLoginHelper::ANS_HWBanned:
            
    loginErrMsg_ "Your account has been banned by Hardware ID";
            
    MessageBox(NULLgLauncherConfig.accountHWBannedMessage.c_str(), "Login"MB_OK MB_ICONSTOP);
            break; 


    WOLoginHelper.cpp
    Spoiler:


    Search for:
    PHP Code:
    else if(AccountStatus == 201)
            
    loginAnswerCode ANS_Frozen
    Add:
    PHP Code:
    else if(AccountStatus == 202)
            
    loginAnswerCode ANS_HWBanned


    WOLoginHelper.h // Thanks for reminding me @DNC
    Spoiler:

    Search for:
    PHP Code:
    ANS_Banned
    Add:
    PHP Code:
    ANS_HWBanned


    Navicat > WarZ > dbo > function > WZ_ACCOUNT_LOGIN_EXEC
    Spoiler:

    Search for:
    PHP Code:
    if    [MENTION=1333383561]Accounts[/MENTION]tatus >= 200begin
            select
                3 
    as LoginResult,
                   [
    MENTION=25895]Custom[/MENTION]erID as CustomerID,
                  [
    MENTION=1333383561]Accounts[/MENTION]tatus as AccountStatus,
                
    as SessionID,
                
    as IsDeveloper
            
    return
        
    end 
    Add:
    PHP Code:
    if    [MENTION=1333383561]Accounts[/MENTION]tatus >= 202begin
            select
                3 
    as LoginResult,
                   [
    MENTION=25895]Custom[/MENTION]erID as CustomerID,
                  [
    MENTION=1333383561]Accounts[/MENTION]tatus as AccountStatus,
                
    as SessionID,
                
    as IsDeveloper
            
    return
        
    end 
    Search for:
    PHP Code:
    -- Ban por Hardware ID by Yuri-BR
        
    IF (EXISTS(SELECT FROM HWID_Ban WHERE HardwareID = @in_HardwareID)) 
        
    BEGIN
            select
                3 
    as LoginResult,
                   [
    MENTION=25895]Custom[/MENTION]erID as CustomerID,
                
    200 as AccountStatus,
                
    as SessionID,
                
    as IsDeveloper
            
    return
        
    END 
    Replace for:
    PHP Code:
    -- Ban por Hardware ID by Yuri-BR
        
    IF (EXISTS(SELECT FROM HWID_Ban WHERE HardwareID = @in_HardwareID)) 
        
    BEGIN
            update UsersData set AccountStatus
    =202 WHERE CustomerID    [MENTION=25895]Custom[/MENTION]erID
            select
                3 
    as LoginResult,
                   [
    MENTION=25895]Custom[/MENTION]erID as CustomerID,
                
    202 as AccountStatus,
                
    as SessionID,
                
    as IsDeveloper
            
    return
        
    END 


    To ban a player, you need to add the Hardware id of player in table HWID_Ban



    Credits:
    @aomsin2526 for base code
    @Yuri BR for Tutorial and alterations

    its work bro, tnx. God bless you ..

  16. #66
    Member zetoris is offline
    MemberRank
    Jul 2015 Join Date
    ThailandLocation
    29Posts

    Re: [Tutorial] Ban for Hardware ID

    Quote Originally Posted by LukasCCB View Post
    How to fix my HWID ??

    Screenshot by Lightshot


    i have that problem too
    have u fix that lucas?

  17. #67
    Elite Member Sakrom is offline
    Member +Rank
    Jul 2014 Join Date
    FranceLocation
    112Posts

    Re: [Tutorial] Ban for Hardware ID

    Quote Originally Posted by zetoris View Post
    i have that problem too
    have u fix that lucas?
    It is because "computerid" is declared as a string in ASP.net code.

  18. #68
    Elite Member ES3N1N is online now
    Member +Rank
    Nov 2018 Join Date
    UkraineLocation
    229Posts
    after you add it to your Launcher. add the solution to WarZ.sln or you will get an error



Page 3 of 3 FirstFirst 123

Advertisement