- Joined
- Jun 5, 2013
- Messages
- 256
- Reaction score
- 163
Hello ! RageZone !
I'll show you how to remove the blocking of your account on the source as DooMv3 & ISS Untouched
I'll show you how to remove the blocking of your account on the source as DooMv3 & ISS Untouched
Open RSUpdate.sln:
And Go Updater.cpp:
Code:
case CLoginHelper::ANS_SecurityLock:
{
loginErrMsg_ = "Your account is locked";
MessageBox(NULL, "Account was locked due to suspicious activity.\n\nPlease check your email for instructions on how to unlock it or you can reset password, that will also unlock your account.", "Login", MB_OK | MB_ICONEXCLAMATION);
break;
}
Replace for:
Code:
[COLOR=#006400]/*case CLoginHelper::ANS_SecurityLock:[/COLOR]
[COLOR=#006400] {[/COLOR]
[COLOR=#006400] loginErrMsg_ = "Your account is locked";[/COLOR]
[COLOR=#006400] MessageBox(NULL, "Account was locked due to suspicious activity.\n\nPlease check your email for instructions on how to unlock it or you can reset password, that will also unlock your account.", "Login", MB_OK | MB_ICONEXCLAMATION);[/COLOR]
[COLOR=#006400] break;[/COLOR]
[COLOR=#006400] } */[/COLOR]
Go WOLoginHelper.cpp:
Search:
Code:
else if(AccountStatus == 102)
loginAnswerCode = ANS_SecurityLock;
Replace for:
Code:
[COLOR=#006400]/*else if(AccountStatus == 102)[/COLOR]
[COLOR=#006400] loginAnswerCode = ANS_SecurityLock;*/[/COLOR]
And Search:
Code:
ANS_SecurityLock,
Replace for:
Code:
[COLOR=#006400]//ANS_SecurityLock,[/COLOR]
And Rebuil Release ! (Do not forget to change the update of your launcher before Rebuild)
--------------------------------------------------------------------------------------------------------------------------------------
Go Database:
Go in WZ_ACCOUNT_SecurityCheckForLock in function !
Replace all code for:
Code:
ALTER PROCEDURE [dbo].[WZ_ACCOUNT_SecurityCheckForLock] @in_CustomerID int,
@in_IP varchar(100),
@in_Country varchar(50),
@[I][B][URL="http://forum.ragezone.com/members/1333447295.html"]Out[/URL][/B][/I]_NeedLock int out
AS
BEGIN
SET NOCOUNT ON;
-- this procedure is local to SQL
-- select 0 as ResultCode
-- account is fine by default
set @[I][B][URL="http://forum.ragezone.com/members/1333447295.html"]Out[/URL][/B][/I]_NeedLock = 0
-- get last login info
declare @[I][B][URL="http://forum.ragezone.com/members/2000122825.html"]last[/URL][/B][/I]loginIP varchar(32)
declare @[I][B][URL="http://forum.ragezone.com/members/2000122825.html"]last[/URL][/B][/I]loginCountry varchar(32) = ''
select @[I][B][URL="http://forum.ragezone.com/members/2000122825.html"]last[/URL][/B][/I]loginIP=lastloginIP, @[I][B][URL="http://forum.ragezone.com/members/2000122825.html"]last[/URL][/B][/I]loginCountry=lastloginCountry from Accounts where CustomerID=@in_CustomerID
-- decouple IPs
declare @ip1 varchar(32) -- last login ip 'X.y.z.w'
declare @ip2 varchar(32) -- last login ip 'x.Y.z.w'
declare @ip3 varchar(32) -- last login ip 'x.y.Z.w'
declare @ip4 varchar(32) -- last login ip 'x.y.z.W'
declare @ip5 varchar(32) -- same for @in_IP
declare @ip6 varchar(32)
declare @ip7 varchar(32)
declare @ip8 varchar(32)
declare @n1 int
declare @n2 int
declare @n3 int
set @n1 = charindex('.', @[I][B][URL="http://forum.ragezone.com/members/2000122825.html"]last[/URL][/B][/I]loginIP)
set @ip1 = substring @[I][B][URL="http://forum.ragezone.com/members/2000122825.html"]last[/URL][/B][/I]loginIP, 1, @n1 - 1)
set @n2 = charindex('.', @[I][B][URL="http://forum.ragezone.com/members/2000122825.html"]last[/URL][/B][/I]loginIP, @n1 + 1)
set @ip2 = substring @[I][B][URL="http://forum.ragezone.com/members/2000122825.html"]last[/URL][/B][/I]loginIP, @n1 + 1, @n2 - 1 - @n1)
set @n3 = charindex('.', @[I][B][URL="http://forum.ragezone.com/members/2000122825.html"]last[/URL][/B][/I]loginIP, @n2 + 1)
set @ip3 = substring @[I][B][URL="http://forum.ragezone.com/members/2000122825.html"]last[/URL][/B][/I]loginIP, @n2 + 1, @n3 - 1 - @n2)
set @ip4 = substring @[I][B][URL="http://forum.ragezone.com/members/2000122825.html"]last[/URL][/B][/I]loginIP, @n3 + 1, 999)
set @n1 = charindex('.', @in_IP)
set @ip5 = substring(@in_IP, 1, @n1 - 1)
set @n2 = charindex('.', @in_IP, @n1 + 1)
set @ip6 = substring(@in_IP, @n1 + 1, @n2 - 1 - @n1)
set @n3 = charindex('.', @in_IP, @n2 + 1)
set @ip7 = substring(@in_IP, @n2 + 1, @n3 - 1 - @n2)
set @ip8 = substring(@in_IP, @n3 + 1, 999)
declare @[I][B][URL="http://forum.ragezone.com/members/845253.html"]Network[/URL][/B][/I] varchar(32) = @ip5 + '.' + @ip6
-- do not lock if we have that IP whitelisted
if exists (select CustomerID from AccountIpWhitelist where CustomerID=@in_CustomerID and IP @[I][B][URL="http://forum.ragezone.com/members/845253.html"]Network[/URL][/B][/I]) begin
return
end
-- lock if country changed
if @[I][B][URL="http://forum.ragezone.com/members/2000122825.html"]last[/URL][/B][/I]loginCountry <> '' and @in_Country <> '' and @[I][B][URL="http://forum.ragezone.com/members/2000122825.html"]last[/URL][/B][/I]loginCountry <> @in_Country)
begin
set @[I][B][URL="http://forum.ragezone.com/members/1333447295.html"]Out[/URL][/B][/I]_NeedLock = 1
exec WZ_ACCOUNT_SecurityLock @in_CustomerID, @in_IP, @in_Country
return
end
-- lock if first 2 octets is changed
if(@ip1 <> @ip5 or @ip2 <> @ip6)
begin
-- special case - we ignore first login attempt if password was reset and add that network to whitelist
if @[I][B][URL="http://forum.ragezone.com/members/2000122825.html"]last[/URL][/B][/I]loginIP = '0.0.0.0')
begin
insert into AccountIpWhitelist values (@in_CustomerID, GETDATE(), @[I][B][URL="http://forum.ragezone.com/members/845253.html"]Network[/URL][/B][/I], @in_Country)
return
end
-- ip changed, block
set @[I][B][URL="http://forum.ragezone.com/members/1333447295.html"]Out[/URL][/B][/I]_NeedLock = 0
exec WZ_ACCOUNT_SecurityLock @in_CustomerID, @in_IP, @in_Country
return
end
-- for first time logins - if there was no whitelist entries - add current IP there
declare @NumEntries int = 0
select @NumEntries=COUNT(*) from AccountIpWhitelist where CustomerID=@in_CustomerID
if(@NumEntries = 0) begin
insert into AccountIpWhitelist values (@in_CustomerID, GETDATE(), @[I][B][URL="http://forum.ragezone.com/members/845253.html"]Network[/URL][/B][/I], @in_Country)
end
return
END
And delete:
WZ_ACCOUNT_SecurityLock And WZ_ACCOUNT_SecurityUnlock function !
Credit: Me !
And Save all your changes
The tutorial is finished! You know how to remove the account lock!
The tutorial is finished! You know how to remove the account lock!