gentilkiwi / mimikatz

A little tool to play with Windows security
http://blog.gentilkiwi.com/mimikatz
19.1k stars 3.65k forks source link

The specified log name doesn't work from command line as string(.bat) #242

Closed GjBrutello closed 4 years ago

GjBrutello commented 4 years ago

log

Papotito123 commented 4 years ago

Hello: Did you try; mimikatz "log other.log" privilege::debug sekurlsa::logonpasswords exit

When running commands with spaces,have to be enclosed in " " .

Also seems is more than 1 space between other commands.

You can substitute other.log with something like, %username%.log , and have the account name.

GjBrutello commented 4 years ago

Hello: Did you try; mimikatz "log other.log" privilege::debug sekurlsa::logonpasswords exit

When running commands with spaces,have to be enclosed in " " .

Also seems is more than 1 space between other commands.

You can substitute other.log with something like, %username%.log , and have the account name.

Thanks bro, I just forgot about this rule . Now everything is ok.

@echo off
cd /d "%~dp0"
set log=%computername%-system.log
mimikatz "log %log%" privilege::debug sekurlsa::logonpasswords exit
start "" notepad.exe %log%
goto :eof