mirror of
https://github.com/gentilkiwi/mimikatz
synced 2024-12-12 00:56:34 +00:00
Fix for newling in fgetws
This commit is contained in:
parent
e6924b75ed
commit
10c317014e
@ -29,6 +29,7 @@ const KUHL_M * mimikatz_modules[] = {
|
|||||||
int wmain(int argc, wchar_t * argv[])
|
int wmain(int argc, wchar_t * argv[])
|
||||||
{
|
{
|
||||||
int i, status = STATUS_SUCCESS;
|
int i, status = STATUS_SUCCESS;
|
||||||
|
size_t len;
|
||||||
#ifndef _WINDLL
|
#ifndef _WINDLL
|
||||||
wchar_t input[0xffff];
|
wchar_t input[0xffff];
|
||||||
kull_m_output_init();
|
kull_m_output_init();
|
||||||
@ -53,8 +54,10 @@ int wmain(int argc, wchar_t * argv[])
|
|||||||
while (status != STATUS_FATAL_APP_EXIT)
|
while (status != STATUS_FATAL_APP_EXIT)
|
||||||
{
|
{
|
||||||
kprintf(L"\n" MIMIKATZ L" # "); fflush(stdin);
|
kprintf(L"\n" MIMIKATZ L" # "); fflush(stdin);
|
||||||
if(fgetws(input, ARRAYSIZE(input), stdin) && (input[0] != L'\n'))
|
if(fgetws(input, ARRAYSIZE(input), stdin) && (len = wcslen(input)) && (input[0] != L'\n'))
|
||||||
{
|
{
|
||||||
|
if(input[len - 1] == L'\n')
|
||||||
|
input[len - 1] = L'\0';
|
||||||
kprintf_inputline(L"%s\n", input);
|
kprintf_inputline(L"%s\n", input);
|
||||||
status = mimikatz_dispatchCommand(input);
|
status = mimikatz_dispatchCommand(input);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user