ANTICHAT

ANTICHAT (https://forum.antichat.xyz/index.php)
-   С/С++, C#, Rust, Swift, Go, Java, Perl, Ruby (https://forum.antichat.xyz/forumdisplay.php?f=24)
-   -   Как сделать Автологин Интерлюдия? (https://forum.antichat.xyz/showthread.php?t=793142)

Dara 08.11.2024 15:08

Цитата:

Сообщение от AlhimN1

ну ладно, чёто не хотит

мне вот интересно то что для автологина он используется библиотеку енти.длл т.е. как бы есть команда автозаполнения формы логин пароль

я вот делал батник



Код:


Код:

l2 -login: -password:
но не работает в таком виде, мб есть вариант впихнуть сюда что то другое что бы акк и пароль уже были заполнены но не нажата кнопка логин

через батник вроде l2.exe account=admin password=admin

и в l2.ini поле

[Auth]

CmdLineLogin=true

AlhimN1 08.11.2024 15:37

Цитата:

Сообщение от Dara

через батник вроде l2.exe account=admin password=admin
и в l2.ini поле
[Auth]
CmdLineLogin=true

не, чёто не иле не зашло

AlhimN1 08.11.2024 18:03

вообщем нашел вариант альтернативного 5 строчного кода автологина

Код:


Код:

@echo off
start l2.exe
timeout /t 2 /nobreak > nul

powershell -command "$wshell = New-Object -ComObject wscript.shell; $wshell.AppActivate('l2'); Start-Sleep -Milliseconds 500; $wshell.SendKeys('LOGIN'); Start-Sleep -Milliseconds 500; $wshell.SendKeys('{TAB}'); Start-Sleep -Milliseconds 500; $wshell.SendKeys('PASSWORD')"

запуск из бат файла

BIT_hack 08.11.2024 18:07

Цитата:

Сообщение от AlhimN1

вообщем нашел вариант альтернативного 5 строчного кода автологина

Код:


Код:

@echo off
start l2.exe
timeout /t 2 /nobreak > nul

powershell -command "$wshell = New-Object -ComObject wscript.shell; $wshell.AppActivate('l2'); Start-Sleep -Milliseconds 500; $wshell.SendKeys('LOGIN'); Start-Sleep -Milliseconds 500; $wshell.SendKeys('{TAB}'); Start-Sleep -Milliseconds 500; $wshell.SendKeys('PASSWORD')"

запуск из бат файла

После этого можешь еще enter в клиент напихать чтобы тыкал до входа в игру))

AlhimN1 08.11.2024 18:17

Цитата:

Сообщение от BIT_hack

После этого можешь еще enter в клиент напихать чтобы тыкал до входа в игру))

мне не нужен был вход, мне нужен был только автоввод логин пароль

я хочу полюбоваться шикарными логин скринами, а потом уже заходить в игру в 2 клика

LifeGame32 16.12.2024 23:14

Цитата:

Сообщение от AlhimN1

ставлю вот так

Код:


Код:

[AutoLogin]

Login=admin

Password=0000

и всё-поломка)

наверно иза....

AlhimN1 16.12.2024 23:36

Цитата:

Сообщение от LifeGame32

наверно иза....

ага, там не так просто как хотелось бы)

artuspl 30.12.2024 16:59

Цитата:

Сообщение от BIT_hack

Here's the autologin code for interlude, which needs work but already works, especially thanks to Charmant

The login and password are taken from the AutoLogin.ini file, which should be next to the dll in your system folder.

AutoLogin.ini with the following content:

Код:


Код:

[AutoLogin]
Login=admin
Password=admin

C++ Visual Studio 2022 code

C++:


Код:

#include "pch.h"
#include
#include
extern
"C"
void
__declspec
(
dllexport
)
__stdcall
function1
(
)
{
Stub
for
exporting L2
.
exe
(
From customer crits
!
)
}
namespace
{
enum
L2ConsoleState
{
Loading
=
0
,
Unknown
=
1
,
Login
=
2
,
CharCreate
=
3
,
CharSelect
=
4
,
InGame
=
5
}
;
class
UL2ConsoleWnd
{
}
;
UL2ConsoleWnd
*
UL2ConsoleWndPtr
=
nullptr
;
uintptr_t consoleOffset
=
0x3663bc
;
for
IL client
}
Defining the UNetworkHandler
class
class
UNetworkHandler
{
}
;
Function type
:
RequestAuthLogin
typedef
int
(
__fastcall
*
RequestAuthLoginFn
)
(
UNetworkHandler
*
,
int
,
const
wchar_t
*
,
const
wchar_t
*
,
int
)
;
Offset
for
UNetworkHandler in engine
.
dll
const
uintptr_t unetworkOffset
=
0x81F538
;
Global variables
for
storing pointers
UNetworkHandler
*
*
unetwork
=
nullptr
;
RequestAuthLoginFn requestAuthLoginFn
=
nullptr
;
Function
for
authorization
static
void
RequestLogin
(
const
std
::
wstring
&
login
,
const
std
::
wstring
&
password
)
{
Verifying pointer initialization
if
(
!
unetwork
||
!
requestAuthLoginFn
)
{
return
;
}
Calling the Authorization Function from the Game
requestAuthLoginFn
(
*
unetwork
,
0
,
login
.
c_str
(
)
,
password
.
c_str
(
)
,
0
)
;
}
A function to read a string from an INI file
static
void
ReadIniString
(
)
{
std
::
wstring login
;
std
::
wstring password
;
wchar_t
buffer
[
256
]
=
{
0
}
;
Reading the login
and
password from the ini file
GetPrivateProfileStringW
(
L
"AutoLogin"
,
L
"Login"
,
L
""
,
buffer
,
_countof
(
buffer
)
,
L
".\\AutoLogin.ini"
)
;
login
=
buffer
;
Reading the login
and
password from the ini file
GetPrivateProfileStringW
(
L
"AutoLogin"
,
L
"Login"
,
L
""
,
buffer
,
_countof
(
buffer
)
,
L
".\\AutoLogin.ini"
)
;
password
=
buffer
;
Calling the Authorization Function
RequestLogin
(
login
,
password
)
;
}
static
void
L2StatusLoad
(
)
{
HMODULE hNwindowModule
=
nullptr
;
while
(
hNwindowModule
==
nullptr
)
{
hNwindowModule
=
GetModuleHandleW
(
L
"nwindow.dll"
)
;
Sleep
(
1000
)
;
}
Getting a valid pointer to the UL2ConsoleWnd
    uintptr_t pUL2ConsoleWnd
=
(
reinterpret_cast

(
hNwindowModule
)
)
+
consoleOffset
;
while
(
UL2ConsoleWndPtr
==
nullptr
)
{
UL2ConsoleWndPtr
=
*
reinterpret_cast

(
pUL2ConsoleWnd
)
;
Sleep
(
300
)
;
}
Get the address where the current state is recorded
    L2ConsoleState
*
statePtr
=
reinterpret_cast

(
UL2ConsoleWndPtr
+
0x38
)
;
while
(
true
)
{
L2ConsoleState currentState
=
*
statePtr
;
switch
(
currentState
)
{
case
L2ConsoleState
::
Loading
:
MessageBoxW
(
NULL
,
L
"load"
,
L
"L2ConsoleState"
,
MB_OK
)
;
ReadIniString
(
)
;
exit
;
break
;
case
L2ConsoleState
::
Login
:
MessageBoxW
(
NULL
,
L
"lobby"
,
L
"L2ConsoleState"
,
MB_OK
)
;
break
;
case
L2ConsoleState
::
CharCreate
:
MessageBoxW
(
NULL
,
L
"Creation of Enchantment"
,
L
"L2ConsoleState"
,
MB_OK
)
;
break
;
case
L2ConsoleState
::
CharSelect
:
MessageBoxW
(
NULL
,
L
"char selection"
,
L
"L2ConsoleState"
,
MB_OK
)
;
break
;
case
L2ConsoleState
::
InGame
:
MessageBoxW
(
NULL
,
L
"in-game"
,
L
"L2ConsoleState"
,
MB_OK
)
;
break
;
}
Sleep
(
5000
)
;
}
}
Flow
for
authorization
static
DWORD WINAPI
TestThread
(
LPVOID lpParameter
)
{
L2StatusLoad
(
)
;
return
0
;
}
DLL Entry Point
extern
"C"
__declspec
(
dllexport
)
BOOL APIENTRY
DllMain
(
HMODULE hModule
,
DWORD  ul_reason_for_call
,
LPVOID lpReserved
)
{
if
(
ul_reason_for_call
==
DLL_PROCESS_ATTACH
)
{
Disable Library Function Call Tracking
DisableThreadLibraryCalls
(
hModule
)
;
Getting the engine
.
dll Module
        HMODULE engineModule
=
GetModuleHandleW
(
L
"engine.dll"
)
;
if
(
engineModule
)
{
Getting the UNetworkHandler Address
            unetwork
=
reinterpret_cast

(
reinterpret_cast

(
engineModule
)
+
unetworkOffset
)
;
Getting the address of the RequestAuthLogin function
requestAuthLoginFn
=
(
RequestAuthLoginFn
)
GetProcAddress
(
engineModule
,
"? RequestAuthLogin@UNetworkHandler@@UAEHPAG0H@Z"
)
;
}
Create a flow
for
authorization
CreateThread
(
nullptr
,
0
,
TestThread
,
nullptr
,
0
,
nullptr
)
;
}
return
TRUE
;
}

And here are the ready-made files for those who want to set up autologin (*Login window only*): just unzip the archive to the interlude system folder of the game and don't forget to change the login and password in the AutoLogin.ini file.

This code works, but how do you find these offsets like `consoleOffset` and `unetworkOffset`? What tool do you use?

LightFusion 30.12.2024 18:14

Цитата:

Сообщение от artuspl

This code works, but how do you find these offsets like `consoleOffset` and `unetworkOffset`? What tool do you use?

probably IDA pro or some other debugger, decompiler

artuspl 30.12.2024 20:07

Цитата:

Сообщение от LightFusion

probably IDA pro or some other debugger, decompiler

Yea I think that's the next level of debugging. Do you have any tutorials or guides anywhere that explain this topic? I was trying to find that offset manually using IDA Pro, but without any luck.

LightFusion 30.12.2024 20:16

Цитата:

Сообщение от artuspl

Yea I think that's the next level of debugging. Do you have any tutorials or guides anywhere that explain this topic? I was trying to find that offset manually using IDA Pro, but without any luck.

Find constructor first , manuals are on stackoverflow echange , ida pro forums and on google

artuspl 30.12.2024 21:23

I have found it, in IDA, but the addresses does not tell me anything, the offset specified in topic is `0x81F538`. The starting address of engine.dll seems to be `10301005`

LightFusion 30.12.2024 21:34

Цитата:

Сообщение от artuspl

I have found it, in IDA, but the addresses does not tell me anything, the offset specified in topic is `0x81F538`. The starting address of engine.dll seems to be `10301005`

well thats because its only first part , then u have to find where it is used, in debugger mode.

Charmant 31.12.2024 10:56

Цитата:

Сообщение от artuspl

but the addresses does not tell me anything, the offset specified in topic is `0x81F538`.

0x81F538 - это RVA (Relative Virtual Address)

0x10300000 - base image address

0x10b1f538 - это VA (Virtual Address)

Для использования в коде нужен именно RVA offset:

Цитата:

Сообщение от Спойлер


DAT_10b1f538 - это VA для UNetworkHandler

Для получения RVA нужно вычесть из VA базовый адрес (RVA = VA - image base)

UNetworkOffset: 0x10b1f538 - 0x10300000 = 0x81F538.

Точно так же можно получить RVA для любой другой константы или функции.


Blaburger 05.02.2025 10:55

Цитата:

Сообщение от BIT_hack

Код на с++ Visual Studio 2022

C++:


Код:

// Тип функции RequestAuthLogin
typedef
int
(
__fastcall
*
RequestAuthLoginFn
)
(
UNetworkHandler
*
,
int
,
const
wchar_t
*
,
const
wchar_t
*
,
int
)
;
.
.
.
.
.
.
.
.
.
// Вызов функции авторизации из игры
requestAuthLoginFn
(
*
unetwork
,
0
,
login
.
c_str
(
)
,
password
.
c_str
(
)
,
0
)
;


Since the function RequestAuthLogin exported from dll with __thiscall the more correct code will be

C++:


Код:

typedef
int
(
__thiscall
*
RequestAuthLoginFn
)
(
UNetworkHandler
*
,
const
wchar_t
*
,
const
wchar_t
*
,
int
)
;
requestAuthLoginFn
(
*
unetwork
,
login
.
c_str
(
)
,
password
.
c_str
(
)
,
0
)
;

The __fastcall calling convention also works (with an additional parameter) as Microsoft's implementation in MSVC is very similar to __thiscall.

dina 09.02.2025 12:00

хотелось бы полноценный гайд для новичков ибо из обрывков кода без навыка кодинга ничего не сделать

LifeGame32 09.02.2025 15:14

Цитата:

Сообщение от Dina

хотелось бы полноценный гайд для новичков ибо из обрывков кода без навыка кодинга ничего не сделать

C моими познаниями с++ Ctrl+C и Ctrl+V тут предостаточно инфы.

готовое решение https://mmo-dev.info/threads/Как-сделать-Автологин-Интерлюдия.30142/post-227591

Neo` 15.08.2025 18:18

Цитата:

Сообщение от BIT_hack

Вот код автологина для interlude, который требует доработки, но уже работает, особенно благодаря Charmant

Логин и пароль берется из файла AutoLogin.ini который должен лежать рядом с dll в вашей папке system игры.

AutoLogin.ini с таким содержимым:

Код:


Код:

[AutoLogin]
Login=admin
Password=admin

Код на с++ Visual Studio 2022

C++:


Код:

#include "pch.h"
#include
#include
extern
"C"
void
__declspec
(
dllexport
)
__stdcall
function1
(
)
{
//Заглушка для экспорта L2.exe (От крита клиента!)
}
namespace
{
enum
L2ConsoleState
{
Loading
=
0
,
Unknown
=
1
,
Login
=
2
,
CharCreate
=
3
,
CharSelect
=
4
,
InGame
=
5
}
;
class
UL2ConsoleWnd
{
}
;
UL2ConsoleWnd
*
UL2ConsoleWndPtr
=
nullptr
;
uintptr_t consoleOffset
=
0x3663bc
;
// для IL клиента
}
// Определение класса UNetworkHandler
class
UNetworkHandler
{
}
;
// Тип функции RequestAuthLogin
typedef
int
(
__fastcall
*
RequestAuthLoginFn
)
(
UNetworkHandler
*
,
int
,
const
wchar_t
*
,
const
wchar_t
*
,
int
)
;
// Смещение для UNetworkHandler в engine.dll
const
uintptr_t unetworkOffset
=
0x81F538
;
// Глобальные переменные для хранения указателей
UNetworkHandler
*
*
unetwork
=
nullptr
;
RequestAuthLoginFn requestAuthLoginFn
=
nullptr
;
// Функция для авторизации
static
void
RequestLogin
(
const
std
::
wstring
&
login
,
const
std
::
wstring
&
password
)
{
// Проверка инициализации указателей
if
(
!
unetwork
||
!
requestAuthLoginFn
)
{
return
;
}
// Вызов функции авторизации из игры
requestAuthLoginFn
(
*
unetwork
,
0
,
login
.
c_str
(
)
,
password
.
c_str
(
)
,
0
)
;
}
// Функция для чтения строки из INI-файла
static
void
ReadIniString
(
)
{
std
::
wstring login
;
std
::
wstring password
;
wchar_t
buffer
[
256
]
=
{
0
}
;
// Чтение логина и пароля из ini-файла
GetPrivateProfileStringW
(
L
"AutoLogin"
,
L
"Login"
,
L
""
,
buffer
,
_countof
(
buffer
)
,
L
".\\AutoLogin.ini"
)
;
login
=
buffer
;
// Чтение логина и пароля из ini-файла
GetPrivateProfileStringW
(
L
"AutoLogin"
,
L
"Login"
,
L
""
,
buffer
,
_countof
(
buffer
)
,
L
".\\AutoLogin.ini"
)
;
password
=
buffer
;
// Вызов функции авторизации
RequestLogin
(
login
,
password
)
;
}
static
void
L2StatusLoad
(
)
{
HMODULE hNwindowModule
=
nullptr
;
while
(
hNwindowModule
==
nullptr
)
{
hNwindowModule
=
GetModuleHandleW
(
L
"nwindow.dll"
)
;
Sleep
(
1000
)
;
}
// получение валидного указателя на UL2ConsoleWnd
uintptr_t pUL2ConsoleWnd
=
(
reinterpret_cast

(
hNwindowModule
)
)
+
consoleOffset
;
while
(
UL2ConsoleWndPtr
==
nullptr
)
{
UL2ConsoleWndPtr
=
*
reinterpret_cast

(
pUL2ConsoleWnd
)
;
Sleep
(
300
)
;
}
// получение адреса по которому записывается текущее состояние
L2ConsoleState
*
statePtr
=
reinterpret_cast

(
UL2ConsoleWndPtr
+
0x38
)
;
while
(
true
)
{
L2ConsoleState currentState
=
*
statePtr
;
switch
(
currentState
)
{
case
L2ConsoleState
::
Loading
:
//    MessageBoxW(NULL, L"загрузка", L"L2ConsoleState", MB_OK);
ReadIniString
(
)
;
exit
;
break
;
case
L2ConsoleState
::
Login
:
//MessageBoxW(NULL, L"лобби", L"L2ConsoleState", MB_OK);
break
;
case
L2ConsoleState
::
CharCreate
:
//MessageBoxW(NULL, L"cоздание чара", L"L2ConsoleState", MB_OK);
break
;
case
L2ConsoleState
::
CharSelect
:
//MessageBoxW(NULL, L"выбор чара", L"L2ConsoleState", MB_OK);
break
;
case
L2ConsoleState
::
InGame
:
//    MessageBoxW(NULL, L"в игре", L"L2ConsoleState", MB_OK);
break
;
}
Sleep
(
5000
)
;
}
}
// Поток для авторизации
static
DWORD WINAPI
TestThread
(
LPVOID lpParameter
)
{
L2StatusLoad
(
)
;
return
0
;
}
// Точка входа DLL
extern
"C"
__declspec
(
dllexport
)
BOOL APIENTRY
DllMain
(
HMODULE hModule
,
DWORD  ul_reason_for_call
,
LPVOID lpReserved
)
{
if
(
ul_reason_for_call
==
DLL_PROCESS_ATTACH
)
{
// Отключение отслеживания вызовов функций библиотеки
DisableThreadLibraryCalls
(
hModule
)
;
// Получение модуля engine.dll
HMODULE engineModule
=
GetModuleHandleW
(
L
"engine.dll"
)
;
if
(
engineModule
)
{
// Получение адреса UNetworkHandler
unetwork
=
reinterpret_cast

(
reinterpret_cast

(
engineModule
)
+
unetworkOffset
)
;
// Получение адреса функции RequestAuthLogin
requestAuthLoginFn
=
(
RequestAuthLoginFn
)
GetProcAddress
(
engineModule
,
"?RequestAuthLogin@UNetworkHandler@@UAEHPAG0H@Z"
)
;
}
// Создание потока для авторизации
CreateThread
(
nullptr
,
0
,
TestThread
,
nullptr
,
0
,
nullptr
)
;
}
return
TRUE
;
}

И вот готовые файлы для тех, кто хочет настроить автологин (*Только вход в окно логина*): просто распакуйте архив в системную папку игры interlude и не забудьте изменить логин и пароль в файле AutoLogin.ini.

Копирую entry.dll и AutoLogin.ini в папку system - ничего не происходит при запуске, клиент IL, запускаю клиент от имени админа (ну на случай, если прав на что-то не хватит), что я делаю не так?

LifeGame32 15.08.2025 22:28

Цитата:

Сообщение от Neo`

Копирую entry.dll и AutoLogin.ini в папку system - ничего не происходит при запуске, клиент IL, запускаю клиент от имени админа (ну на случай, если прав на что-то не хватит), что я делаю не так?

вот готовый вариант.

Auth login interlude

21 Апр 2025

Auth login interlude
  • LifeGame32
  • auth login interlude
  • Клиенты и патчи

тут как пример сорц .dll

Иконка ресурса

Передача данных .uc > .dll.

15 Янв 2025

rGuard,Interface.uc,dsetup

Neo` 15.08.2025 22:31

Цитата:

Сообщение от LifeGame32

вот готовый вариант.

Auth login interlude

21 Апр 2025

Auth login interlude
  • LifeGame32
  • auth login interlude
  • Клиенты и патчи

тут как пример сорц .dll

Иконка ресурса

Передача данных .uc > .dll.

15 Янв 2025

rGuard,Interface.uc,dsetup

Попробовал - не работает.

В общем удалось пофиксить проблему исходников автора, у которого всё получилось, но при изменении ini файла не логинилось (фактически его исходники не читали пароль из ini файла), вот рабочий вариант:

Вы должны нажать кнопку "Мне нравится", чтобы увидеть скрытое содержимое.


Как сделаю финальный исходник (хочу добавить возможность брать не из ini а из флагов при запуске l2.exe, чтобы можно было просто ярлыки сделать на каждого персонажа) - выложу исходник и готовую скомпиленную dll.


Время: 16:11