-4

我在这个链接上使用了一个教程来保护我的一个重要文件,代码是:

cls
@ECHO OFF
title coolhacking-tricks.blogspot.com
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto
UNLOCK 
if NOT EXIST MyFolder goto MDMyFolder 
:CONFIRM 
echo Are you sure to lock this folder? (Y/N) 
set/p "cho=>" 
if %cho%==Y goto LOCK 
if %cho%==y goto LOCK 
if %cho%==n goto END 
if %cho%==N goto END 
echo Invalid choice. 
goto CONFIRM 
:LOCK 
ren MyFolder "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" 
attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" 
echo Folder locked 
goto End 
:UNLOCK 
echo Enter password to Unlock Your Secure Folder 
set/p "pass=>" 
if NOT %pass%== coolhacks goto FAIL 
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" 
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" MyFolder 
echo Folder Unlocked successfully 
goto End 
:FAIL 
echo Invalid password 
goto end 
:MDMyFolder 
md MyFolder 
echo MyFolder created successfully 
goto End 
:End

但是当我运行 lock.bat 时,我没有看到要求输入密码的屏幕。相反,会出现一个屏幕并指出:“系统找不到指定的批次标签”,然后屏幕突然消失,没有等待几分之一秒。上传者无法帮助我解决我的问题。

4

2 回答 2

3

在驱动器的根文件夹中运行它(假设您的脚本使用与该页面上的脚本相同的 GUID):

dir /b /s /a:s *.{21EC2020-3AEA-1069-A2DD-08002B30309D}

如果您可以将位置缩小到特定的父文件夹,将花费更少的时间。

使用以下两个命令取消隐藏文件夹:

attrib -s -h "C:\path\to\Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "C:\path\to\Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" newname

下次避开像这样的蹩脚的“安全工具”。它首先不会对任何内容进行密码保护。它只是重命名文件夹并设置hiddensystem属性。

于 2013-07-14T17:05:32.803 回答
1

也许使用这个(但重新:

cls 
@ECHO OFF 
title Folder Private 
if EXIST "HTG Locker" goto UNLOCK 
if NOT EXIST Private goto MDLOCKER 
:CONFIRM 
echo Are you sure you want to lock the folder(Y/N) 
set/p "cho=>" 
if %cho%==Y goto LOCK 
if %cho%==y goto LOCK 
if %cho%==n goto END 
if %cho%==N goto END 
echo Invalid choice. 
goto CONFIRM 
:LOCK 
ren Private "HTG Locker" 
attrib +h +s "HTG Locker" 
echo Folder locked 
goto End 
:UNLOCK 
echo Enter password to unlock folder 
set/p "pass=>" 
if NOT %pass%== beef goto FAIL 
attrib -h -s "HTG Locker" 
ren "HTG Locker" Private 
echo Folder Unlocked successfully 
goto End 
:FAIL 
echo Invalid password 
goto end 
:MDLOCKER 
md Private 
echo Private created successfully 
goto End 
:End
于 2013-11-19T01:10:00.220 回答