
31.10.2023, 23:28
|
|
Познавший АНТИЧАТ
Регистрация: 14.07.2019
Сообщений: 1,097
С нами:
3596877
Репутация:
183
|
|
ладно, решил еще поговнокодить, засунуть все в класс, изменить строки на русский язык, добавить обработку ошибок, потому что я еблан, не могу с первого раза че то рабочее написать, а еще добавил вывод списка асишек, которые заинжектились
C++:
[CODE]
#include
#include
#include
#include
#include
#include
#include
std
::
wstring
trim
(
const
std
::
wstring
&
str
)
{
std
::
wstring
::
size_type start
=
str
.
find_first_not_of
(
L
" \t\n"
)
;
if
(
start
==
std
::
wstring
::
npos
)
{
return
L
""
;
}
std
::
wstring
::
size_type end
=
str
.
find_last_not_of
(
L
" \t\n"
)
;
return
str
.
substr
(
start
,
end
-
start
+
1
)
;
}
class
InjectedASI
{
public
:
InjectedASI
(
const
std
::
string
&
filename
)
:
filename
(
filename
)
{
}
std
::
string filename
;
}
;
std
::
vector
injectedASIs
;
class
Injector
{
public
:
Injector
(
const
std
::
wstring
&
processName
)
:
processName
(
processName
)
{
}
void
InjectASIs
(
)
{
uintptr_t process
=
GetProcessIdByName
(
processName
)
;
if
(
process
==
0
)
{
std
::
wcerr
(
process
)
,
full_path_str
)
)
{
std
::
wcout
(
GetProcAddress
(
GetModuleHandle
(
L
"kernel32.dll"
)
,
"LoadLibraryA"
)
)
;
if
(
loadLibraryAddress
==
NULL
)
{
CloseHandle
(
processHandle
)
;
std
::
wcerr
(
loadLibraryAddress
)
,
remoteDllPath
,
0
,
NULL
)
;
if
(
remoteThread
==
NULL
)
{
VirtualFreeEx
(
processHandle
,
remoteDllPath
,
0
,
MEM_RELEASE
)
;
CloseHandle
(
processHandle
)
;
std
::
wcerr
|
|
|