2017-03-03 70 views
-8

我做的技術支持騙局簡單的批處理腳本引誘,但我想,當一個騙子運行DIR/S或樹太運行/ S如何,我會做到這一點使用批處理文件的工作可能需要一些幫助(;

+3

您如何區分騙子與非騙子? –

+1

我用adfly rip來查找虛假彈出框 – Logo4

+0

不知道你要完成什麼。您需要編寫更好的任務描述並提供您已使用的代碼。否則這個問題將被關閉。 – Squashman

回答

1

基於CMD++,這batch-file會像之前treedir被作爲命令輸入正常的命令提示符要得到這個在startup of CMD by using a solution like this

腳本運行:

@echo off 
call :Variables 
:CMD 
::::::::::::::::::::::::::::::::::::::::: 
:: CMD++ - http://mirum.weebly.com/cmd :: 
::::::::::::::::::::::::::::::::::::::::: 
:NormalMode 
    color 07 
    title C:\WINDOWS\system32\cmd.exe 
    echo Microsoft Windows [Version 10.0.14986] 
    echo (c) 2016 Microsoft Corporation. All rights reserved. 
    goto :cmdCommand 
:cmdCommand 
    echo. 
:cmdCommand2 
    set "cmdCommand=" 
    %echo% C:\Users\%username%&set /p "cmdCommand=>" 
    if not defined CmdCommand (goto :CmdCommand2) 
    set "CMDCmd=%cmdCommand:"=%" 
    call :commands 
goto :cmdCommand 
:commands 
    if /i "%CMDCmd:~0,3%"=="dir" goto :execute 
    if /i "%CMDCmd:~0,4%"=="tree" goto :execute 
    %cmdCommand% 
    goto :cmdCommand 
:Variables 
    set "cmd++=goto cmdCommand" 
    set "echo=<nul set /p =" 
goto :EOF 

:execute 
    echo They entered 'dir' or 'tree' 
    pause 
goto :EOF 

輸出示例:

的Microsoft Windows [版本10.0.14986]
(C)2016微軟公司。版權所有。

C:\用戶\ samde>回聲的hello world
的hello world

C:\用戶\ samde>暫停
按任意鍵繼續。 。 。

C:\用戶\ samde>樹
他們進入 '目錄' 或 '樹'
按任意鍵繼續。 。 。