The salt is probably something simple it usually is. Is there a procedure somewhere in the sql. Or just look at the login function and use a simple password and debug with ollydbg
Sent from my LG-K540 using Tapatalk
The salt is probably something simple it usually is. Is there a procedure somewhere in the sql. Or just look at the login function and use a simple password and debug with ollydbg
Sent from my LG-K540 using Tapatalk
ok, so still trying to get my head around SRP process because the password is never transmitted between the server and client, they just prove to each other that they know the password. Here is a good detail of how SRP works, in a python script:
Now, I have not figured it out yet, but I did figure out the password for the included account insert sql which is:Code:# An example SRP authentication # WARNING: Do not use for real cryptographic purposes beyond testing. # based on http://srp.stanford.edu/design.html import hashlib import random def global_print(*names): x = lambda s: ["{}", "0x{:x}"] [hasattr(s, 'real')].format(s) print("".join("{} = {}\n".format(name, x(globals()[name])) for name in names)) # note: str converts as is, str( [1,2,3,4] ) will convert to "[1,2,3,4]" def H(*args): # a one-way hash function a = ':'.join(str(a) for a in args) return int(hashlib.sha256(a.encode('utf-8')).hexdigest(), 16) def cryptrand(n=1024): return random.SystemRandom().getrandbits(n) % N # A large safe prime (N = 2q+1, where q is prime) # All arithmetic is done modulo N # (generated using "openssl dhparam -text 1024") N = '''00:c0:37:c3:75:88:b4:32:98:87:e6:1c:2d:a3:32: 4b:1b:a4:b8:1a:63:f9:74:8f:ed:2d:8a:41:0c:2f: c2:1b:12:32:f0:d3:bf:a0:24:27:6c:fd:88:44:81: 97:aa:e4:86:a6:3b:fc:a7:b8:bf:77:54:df:b3:27: c7:20:1f:6f:d1:7f:d7:fd:74:15:8b:d3:1c:e7:72: c9:f5:f8:ab:58:45:48:a9:9a:75:9b:5a:2c:05:32: 16:2b:7b:62:18:e8:f1:42:bc:e2:c3:0d:77:84:68: 9a:48:3e:09:5e:70:16:18:43:79:13:a8:c3:9c:3d: d0:d4:ca:3c:50:0b:88:5f:e3''' N = int(''.join(N.split()).replace(':', ''), 16) g = 2 # A generator modulo N k = H(N, g) # Multiplier parameter (k=3 in legacy SRP-6) print("#. H, N, g, and k are known beforehand to both client and server:") global_print("H", "N", "g", "k") print("0. server stores (I, s, v) in its password database") # the server must first generate the password verifier I = "person" # Username p = "password1234" # Password s = cryptrand(64) # Salt for the user x = H(s, I, p) # Private key v = pow(g, x, N) # Password verifier global_print("I", "p", "s", "x", "v") print("1. client sends username I and public ephemeral value A to the server") a = cryptrand() A = pow(g, a, N) global_print("I", "A") # client->server (I, A) print("2. server sends user's salt s and public ephemeral value B to client") b = cryptrand() B = (k * v + pow(g, b, N)) % N global_print("s", "B") # server->client (s, B) print("3. client and server calculate the random scrambling parameter") u = H(A, B) # Random scrambling parameter global_print("u") print("4. client computes session key") x = H(s, I, p) S_c = pow(B - k * pow(g, x, N), a + u * x, N) K_c = H(S_c) global_print("S_c", "K_c") print("5. server computes session key") S_s = pow(A * pow(v, u, N), b, N) K_s = H(S_s) global_print("S_s", "K_s") print("6. client sends proof of session key to server") M_c = H(H(N) ^ H(g), H(I), s, A, B, K_c) global_print("M_c") # client->server (M_c) ; server verifies M_c print("7. server sends proof of session key to client") M_s = H(A, M_c, K_s) global_print("M_s") # server->client (M_s) ; client verifies M_s
ACCOUNT: bunny0
PASSWORD: 000000
And I'm in:
Just hanging after Char selection, probably DB issue's. Need to look into this further..
UPDATE: Actually it hung because DatabaseServer.exe crashed, lol!
AquaLung
.
Last edited by aqualung; 19-11-16 at 03:13 AM.
Oh sweet. Now we have to make a mysql proc for making new users with password.
Sent from my LG-K540 using Tapatalk
If you log the mysql server you can probably see its missing a stored pro
Sent from my LG-K540 using Tapatalk
Last edited by aqualung; 19-11-16 at 04:27 AM.
@aqualung send me your database backup? is still using the same password error using 000000
Here is current DB which lets you login:
CODE105.SQL
ACCOUNT: bunny0
PASSWORD: 000000
NOTE: Don't forget to issue command 'changeserverstate' in console of login server to take it out of Maintenence mode.
AquaLung
.
Last edited by aqualung; 19-11-16 at 05:05 AM.
@aqualung
"name contains illegal character" try to make a char using chinese name and letters
Code105.sql creates tables only, not the database. In Navicat, create db, double click to select, then right click it and select execute script from there.
Create one DB, I named it code105, then execute .sql I uploaded to this DB. In ServerInfo.ini, point all 3 Databases to code105. It's easier creating all the tables in one database, they can be separated later once everything is running correctly.
UPDATE: Also, I use Chinese chars to create a new role, but DatabaseServer.exe still crashes with message:
FESPlayer::PacketHandle Packet(ID=662) have not Handle...ERROR (12168)(T=58.2500)
AquaLung
Congratulations on you‘r login into game, thank you for your contribution.
- - - Updated - - -
nice,a good start
the pic tip this:
your nick name contains some illegal characters. Please re-enter it.
but i don't know why the name "ragezone" contains illegal characters,maybe youcan use number or chinese name : 游戏 just copy and paste it .it means :game.
==============================
- - - Updated - - -
you had not selecte the sql database,please select one,and then to import it.
@aqualung ,i use your code105v2.sql,and changeserverstate,so i can log in and login at the role's name UI,but it will broke down,so as you.
when it broke down,the Log_DatabaseServer log is:
2016-11-25 22:18:38 : [H:\Ark\Server\DatabaseServer\Player\FESPlayer.cpp][32][FESPlayer::PacketHandle][handle] (10200)(T=1453.7180)
2016-11-25 22:21:22 : [H:\Ark\Server\DatabaseServer\Player\FESPlayer.cpp][37][FESPlayer::PacketHandle][FALSE] (10200)(T=1618.0780)
2016-11-25 22:21:24 : [H:\Ark\Server\Common\Player\AsioPlayer.cpp][199][AsioPlayer::ProcessCommand][FALSE] (10200)(T=1619.2180)
2016-11-25 22:21:24 : [H:\Ark\Server\Common\Net\AsioInputStream.cpp][85][AsioInputStream::ReadHandleCallback][FALSE] (10200)(T=1619.7650)
2016-11-25 22:21:25 : [H:\Ark\Server\DatabaseServer\Main\Server.cpp][79][Server::Loop][FALSE] (10200)(T=1620.2810)
2016-11-25 22:21:26 : [H:\Ark\Server\DatabaseServer\Main\Main.cpp][57][main][FALSE] (10200)(T=1621.1400)
---------------------
Log_DataCollectionServer 's log is:
2016-11-25 22:18:38 : [H:\Ark\Server\DataCollectionServer\PacketHandle\SDTranspondHandle.cpp][41][SDTranspondHandle][handle] (10576)(T=1454.1560)
2016-11-25 22:21:13 : [H:\Ark\Server\DataCollectionServer\PacketHandle\SDTranspondHandle.cpp][47][SDTranspondHandle][FALSE] (10576)(T=1609.0940)
2016-11-25 22:21:15 : [H:\Ark\Server\DataCollectionServer\Player\ServerPlayer.cpp][37][ServerPlayer::PacketHandle][FALSE] (10576)(T=1610.8130)
2016-11-25 22:21:16 : [H:\Ark\Server\Common\Player\AsioPlayer.cpp][199][AsioPlayer::ProcessCommand][FALSE] (10576)(T=1611.7030)
2016-11-25 22:21:16 : [H:\Ark\Server\Common\Net\AsioInputStream.cpp][85][AsioInputStream::ReadHandleCallback][FALSE] (10576)(T=1612.5630)
2016-11-25 22:21:18 : [H:\Ark\Server\DataCollectionServer\Main\Server.cpp][72][Server::Loop][FALSE] (10576)(T=1613.6250)
2016-11-25 22:21:18 : [H:\Ark\Server\DataCollectionServer\Main\Main.cpp][57][main][FALSE] (10576)(T=1614.1250)
----------------
--------------------
when i creat a new role,the login server log is:
2016-11-25 22:18:02 : ClientPlayerManager::AcceptHandleCallback(PID:2, IP:127.0.0.1, Port:54433, Count=1)...OK (10132)(T=1418.2190)
2016-11-25 22:18:03 : ClientPlayerManager::RemovePlayer(UserID=-1, Count=0), because: End of file...OK (10132)(T=1419.3590)
2016-11-25 22:18:24 : ClientPlayerManager::AcceptHandleCallback(PID:3, IP:127.0.0.1, Port:54434, Count=1)...OK (10132)(T=1440.1720)
2016-11-25 22:18:26 : User(Account=bunny0) login succeed (10132)(T=1442.1870)
2016-11-25 22:18:26 : ClientPlayerManager::RemovePlayer(UserID=1, Count=0), because: End of file...OK (10132)(T=1442.2030)
2016-11-25 22:18:26 : FLUpdateConnetCountHandle(SeverID=0, RemainConnectCount=99) (10132)(T=1442.4840)
i want to know maybe the sql's type is have wrong or not?? i find text "End of file" the sql.
after del the text in the sql,this is also appear in the log.i don;t know why.
I been busy with work and no time spend on these files. I left off with packet id errors, think it is wrong client. I noticed while searching the Web that shortly after the date of these server files, client version 2000 was available for download. Perhaps these are an early version for v2000 client. Maybe then the packet id's will match.
V2000
Last edited by aqualung; 26-11-16 at 02:36 AM.