![]() |
[SHARE] C4 HDAuth multiserver/floodprotected/bruteprotected
...from russia with love =)
http://humordwarf.info/HDAuth104.zip HDAuth LoginServer 1.04 ===== History / История === 2007-08-17 v1.00 - Initial Release / Первая версия 2007-08-19 v1.01 - new parameter in .ini: ClientPort - Port number for clients (players) connections (emanuel's idea) - fixed errors in net/mask functions (IPBans related) (thanks Kenjiro) - changed logic in TempoBano for wrong passwords (see docs changes) (thanks hel) - added info into docs about SQL queries (see below) 2007-08-19 v1.02 - global crash fix and "red messages" cleanup (thanks Aida) - fixed server reconnect thing (thankgs Aida) - added date and time before each message into text log files - new optional parameter in .ini for [ServerXX]: LocIP - address that will be used for local network connections this feature uses LocalNet.txt (format same as IPBan.txt) for local networks when it tuned auth works like a "router" and sends to clients IP of GS depends on client location for more details about this feature ask Aida @ PP - now u can use hex format too for BlowFish keys (see .ini for details) 2007-08-20 v1.03 - fixed log files codepage, now used system's current ANSI code page - added optional SQL query each minute (see bellow) for monitoring online players in DB e.g. for web-site stats (thanks hr) - added boolean .ini parameters (switchers) for each log types, now u can turn on/off each type of message and for console output and for files (see .ini) - added new type of log: *.online - about 60 times per hour there will be current online of server (can be used too for creating online stats, etc) - removed accountmap's warnings flood - few minor bugfixes 2007-08-21 v1.04 - *-authd.log file/console now "turnable on/off" too (thanks FidoW) ===== Features / Фичи ===== [eng] - GUI (see below) - compatible with that AuthD 40504 - same DB-log-files format as 40504 - TempoBano model (see below) - IP bans by net/mask(see below) - unlimited number of game servers - for each GS it uses different MSSQL DB (see below) [rus] - ГУЙ (см. ниже) - совместим с тем самым аутхом 40504 - системный БД-лог-файл в том же формате что и 40504 - ТемпоБано модель (см. ниже) - баны подсетей (см. ниже) - неограниченное число игровых серверов - для каждого гейм-сервера используются разные базы данных (см. ниже) ===== SQL queries / СКУЛ запросы ===== [eng] - MS-SQL use is minimized, only 3 queries is performed per user login/play/logout 1. when checking password/ban state: "select password, uid, pay_stat, block_flag, block_flag2 from dbo.user_auth as auth inner join dbo.user_account as acc on auth.account = acc.account where auth.account='{0}'" 2. when GS says "player playing" "UPDATE dbo.user_account SET last_login={0}, last_world={1}, last_ip='{2}' WHERE uid={3}" 3. and when GS says "player logout" "UPDATE dbo.user_account SET last_logout={0}, last_world={1}, last_ip='{2}' WHERE uid={3}" 4. (optional) "EXEC UpdateOnline {0},{1}" - calls every minute and sends to SQL server_id with players_online [rus] - использование MS-SQL минимизировано, всего 3 запроса использовано на игрока при логине/игре/отключении 1. при проверке пароля/бана: "select password, uid, pay_stat, block_flag, block_flag2 from dbo.user_auth as auth inner join dbo.user_account as acc on auth.account = acc.account where auth.account='{0}'" 2. при сообщении гейм-сервера "игрок играет" "UPDATE dbo.user_account SET last_login={0}, last_world={1}, last_ip='{2}' WHERE uid={3}" 3. при сообщении гейм-сервера "игрок отключился" "UPDATE dbo.user_account SET last_logout={0}, last_world={1}, last_ip='{2}' WHERE uid={3}" 4. (опционально) "EXEC UpdateOnline {0},{1}" - вызывается каждую минуту и посылает SQL серверу айди с онлайном ===== GUI / ГУЙ ===== [eng] - IPBans editor / reloader for editing IP banned networks - shows in real - time current server values - Sockets/Max - number of used sockets/peak - Players - number of players on all servers - Servers - number of connected servers - Uptime - no comments - Allocated/Peak - allocated memory/peak - GC - garbage collector current value - Threads - number of threads in LoginServer - Handlers - number of handles/descriptors, used in LoginServer [rus] - редактор/загружатор забаненных подсетей - отображает в реальном времени текущие значения сервера - Sockets/Max - количество подключенных сокетов/пик - Players - количество игроков на всех серверах - Servers - количество подключенных игровых серверов - Uptime - догадайтесь, что - Allocated/Peak - количество потребляемой сервером памяти/пик - GC - текущее значение уборщика мусора - Threads - количество нитей в сервере - Handlers - количество дескрипторов, используемых сервером ===== Log-files / Лог-файлы ===== [eng] - for each GS it make directory with server id - in each directory server creates *.normal *.warning *.cheat *.error *.log files - *.log files has same format as it was in 40504 (for easy parsing, if need) [rus] - для каждого игрового сервера создается папка с номером сервера - в каждой папке сервер создает файлы *.normal *.warning *.cheat *.error *.log - *.log файлы имеют тот же формат какой был в 40504 (для последующей обработки, если необходимо) ===== TempoBano / ТемпоБано ===== [eng] - TempoBano means "ban for few seconds" - blocks IP if there is flood from it (number of connections from IP per time interval too high) - blocks Account at selected Server is there is 3 wrong passwords entered (e.g. 3 minutes user will not able to even try) 1.01+: now "hacker" not able to block any account, coz _bad_password_counter_ is different also for each IP [rus] - ТемпоБано значит "бан на несколько секунд" - блокирует IP если с этого адреса идет флуд (количество подключений за промежуток времени превышает допустимый) - блокирует аккаунт на выбранном сервере если было 3 неправильных ввода парол (например 3 минуты игрок даже не сможет попробовать) 1.01+: теперь "хацкер" не сможет блокировать аккаунты, т.к. _счечик_неправильных_парол� �й_ разный так же для разных IP ===== IPBans / Баны по IP ===== [eng] - each row in list can be in format d.d.d.d/d or just d.d.d.d - example1: 127.0.0.1 means network 127.0.0.1/32 - only one IP address - example2: 1xx.xx8.1.0/24 means network 1xx.xx8.1.1 - 1xx.xx8.1.255 [rus] - каждая строка в списке может быть в формате d.d.d.d/d или просто d.d.d.d - example1: 127.0.0.1 значит подсеть 127.0.0.1/32 - т.е. один IP адрес - example2: 1xx.xx8.1.0/24 значит подсеть 1xx.xx8.1.1 - 1xx.xx8.1.255 ===== Protocol / Протокол ===== [eng] - on packet level server is almost same as 40504, BUT it has different order of client-server packets: 1. server sends "hello" 2. client reply "user/pass" 3. server always sends "serverlist" 4. client reply "selectedserver" 5. here server checks user/pass from DB for selected server and do as always, or "wrong password" or "continue" so, server uses different lin2db for each server (see .ini) and we can use one loginserver for few GS in same time, if u use same DB-connection string for all servers, it will use same DB for few servers (as ncsoft) [rus] - на пакетном уровне сервер почти такой-же как и 40504, НО имеет некоторые различия в пакетах клиент-сервер: 1. сервер посылает "привет" 2. клиент отвечает "логин/пароль" 3. сервер всегда посылает "списоксерверов" 4. клиент отвечает "выбралсервер" 5. и только здесь сервер проверяет логин/пароль из базы выбранного сервера, и продолжает как обычно "неправильный пароль" или "продолжаем" как мы видим, сервер использует разные базы lin2db для каждого сервера (см .ini) и мы может использовать один логин-сервер для нескольких гейм-серверов в то же время, если указать одинаковые строки подключений для всех серверов, будет использована одна база для всех (как у нцсофт) /HD 2007 |
install note:
1. .net 2.0 required 2. old authd not need, old configs not need 3. create any folder 4. put files there 5. edit .ini 6. create SQL user and rights if need 7. run |
nice mens, thanks for share, btw it "accepts the cxxdh login format"? or can be used with unmodified engine.dll ?
:EDIT: what about the account hax? i know amped fixes it, but im not using amped :> |
Quote:
2. "account hax" = GS exploit, not auth |
gonna try it later..
thanx HD for sharing. |
when i set
UseRSA = true(what is this btw? :P) the program just crashes after displaying protocol revision without any errors anyway very nice login :D |
Quote:
|
woring c6 ?
|
tnx HD, gonna test it later, looks great.
|
Thanks HD, great share, in test.
|
Great work and thanks to share it, a doubt, are possible that it blocks the use of L2Walker?
|
well... it maybe may block l2walkers (i didnt tested it) because there is order of packets changed a lot
|
Quote:
Again thanks to share your great works. |
Thanks HD, very helpful
|
del///////
|
Great share HD
|
Cool, written in C#?
|
that it meant
Quote:
Quote:
Quote:
GS yells that does not can connected to the server of authorizing авторизация работает, сервер тоже но не коннектится к авторизации. GS орет что не может подключится к серверу авторизации, на фаире все разблочено... |
Quote:
can not translate to russian yourself? =) [rus] Соединение было принудительно разорвано удаленной машиной, не шмогло оно отослать пакет клиенту... видишь там TCP2106 написано? значит это игрока "оторвало" а по поводу Specified argument was out of the range of valid values. Parameter name: newAddress тут видимо кривой IP-адрес... |
Amazing, thx HD Great share !:thumbleft:
How can i change the auth port?? ( 2016 ) |
Quote:
mens |
Quote:
/rus тогда каждый ушлепок-хацкер может простым флудом авторизацией любого чувака, даже админа забанить на три минуты, а если хацкер напишет прогу для цикличного посыла по 4 пакета левой авторизации - так бедный владелец акка не зайдет в игру пока эту прогу не выключат, весело - правда? :) лучше реализовать ип-бан, вместо аккаунтобана. / Aida: there's some antileecher protection in config? ;) /rus гыгы, при первом же взгляде на вырезку из конфига понятна ошибка - подумай чуток, это видимо антиличерская защита :) |
Great share... amazing... taking my jaw from the floor... w.o.w.
But i think it should be (documentation bug?): example2: 1xx.xx8.1.0/24 means network 1xx.xx8.1.1 - 1xx.xx8.1.255 24 instead of 8 - this is correct CIDR notation (1xx.xx8.1.0/8 means 192.0.0.0 - 1xx.xx5.2xx.xx5). |
GJ HD :) Keep rockin'
|
Good work.
Thanks. |
Quote:
fuck... what the mistake... have to fix that o_O *confused* |
Quote:
yes. u right, i'll fix it, but solution will be different: i'll add to this thing ip checking... should be like 3 password try per ip per account@server... e.g. per each IP@account@server own counter [rus] ты прав, надо пофиксить, но решение будет таким: я в это добавлю проверку адреса... должно быть типа три попытки с одного IP на акк на сервере... т.е. на каждый IP@account@server свой счетчик |
Quote:
what for ? |
Quote:
any language is good, but speed of developing in C# is faster than on Java from Sun, same as resulting binary code execution speed... |
x.x1 now available, first post updated
- new parameter in .ini: ClientPort - Port number for clients (players) connections (emanuel's idea) - fixed errors in net/mask functions (IPBans related) (thanks Kenjiro) - changed logic in TempoBano for wrong passwords (see docs changes) (thanks hel) - added info into docs about SQL queries (see below) |
Verry good HD. Thanks.
|
Good job!
A suggestion: the blowfish maybe possible the be written in HEX format instead as string ? |
Amazing as always. I suggest the same thing as FidoW says, blowfish in HEX format, it'll make things alot easier.
|
Quote:
|
Humordwarf thanx for share
Can u make your auth support C5 client /rus если не сложно и есть желание, сделай пожалуйста возможность подключения ц4 клиентом, уже очень хорошая штука /rus |
Hmmm...would be nice, if hd will create "switch" for chronicles, C4\C5.
It will be nice multiplatform auth server %) No more hexing, or questions "auth c5 plix plox". Certainly, if it possible... |
Quote:
|
|
humordwarf = god
Your share is neat, great, it's become an habit now.. :) |
One small sugestion, i have created a personalized "Terms and Conditions" for my server and it seems that a player will automatically login without accepting the Terms. HD can you make the player login only by clicking to "Accept" and disconect if not ?
|
| All times are GMT. The time now is 14:59. |