|
hdyue
新手上路

积分 18
发帖 8
注册 2007-6-7
状态 离线
|
『楼 主』:
ghost前要求输入密码
使用 LLM 解释/回答一下
办公室一台公用电脑,我装了XP和DOS双系统,并做了一个全自动GHOST的批处理文件。太方便了因此系统经常被人进入DOS随意GHOST还原。我想在GHOST还原前要求输入密码<能糊一些人>。批处理代码如下:
@echo off
set a=
set/p a=password:
if /i "%a%"=="123" goto aa
exit
::以下部分代替GHOST带参数命令
:aa
echo 你好
pause
以上语句在WINDOWS下执行的很好。可在DOS下却不执行密码输入部分。请大虾们帮忙原因何在?是不是要先加载什么才能在DOS下执行密码输入部分?
请求一个需要密码才能执行GHOST的代码。先谢了!
An office public computer, I installed XP and DOS dual systems, and made an automatic GHOST batch file. It's too convenient, so the system is often entered into DOS to randomly GHOST restore. I want to require entering a password before GHOST restore <to confuse some people>. The batch code is as follows:
@echo off
set a=
set/p a=password:
if /i "%a%"=="123" goto aa
exit
::The following part replaces the GHOST command with parameters
:aa
echo Hello
pause
The above statements execute well under WINDOWS. But under DOS, the password input part is not executed. Please help, why? Do I need to load something first to execute the password input part under DOS?
Request a code that requires a password to execute GHOST. Thanks in advance!
|
|
2007-6-7 23:26 |
|
|
0451lym
高级用户
   
积分 760
发帖 357
注册 2005-10-10
状态 离线
|
『第 2 楼』:
使用 LLM 解释/回答一下
GHOST支持加密备份!
所以无须在弄什么加密的要求了!
GHOST supports encrypted backups! So there's no need to make any encryption requirements anymore!
|
|
2007-6-8 01:21 |
|
|
lianjiang2004
金牌会员
     
积分 3946
发帖 1884
注册 2006-1-20
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
Originally posted by hdyue at 2007-6-7 23:26:
办公室一台公用电脑,我装了XP和DOS双系统,并做了一个全自动GHOST的批处理文件。太方便了因此系统经常被人进入DOS随意GHOST还原。我想在GHOST还原前 ...
set/p a=password: 只能用于cmd,dos需用choice命令。
Originally posted by hdyue at 2007-6-7 23:26:
An office public computer, I installed XP and DOS dual systems, and made an automatic GHOST batch file. It's too convenient, so the system is often entered into DOS by others to randomly GHOST restore. I want to ... before GHOST restore...
set/p a=password: is only applicable to cmd, and choice command is needed for DOS.
|

Windows 一键还原
http://www.yjhy.com |
|
2007-6-8 06:14 |
|
|
lianjiang2004
金牌会员
     
积分 3946
发帖 1884
注册 2006-1-20
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
Originally posted by 0451lym at 2007-6-8 01:21:
GHOST支持加密备份!
所以无须在弄什么加密的要求了!
两种密码所要达到的目的是有不同的。个人以为。
Originally posted by 0451lym at 2007-6-8 01:21:
GHOST supports encrypted backups!
So there's no need to have additional encryption requirements!
The purposes of the two passwords are different. In my opinion.
|

Windows 一键还原
http://www.yjhy.com |
|
2007-6-8 06:15 |
|
|
htysm
高级用户
   
积分 866
发帖 415
注册 2005-12-4
状态 离线
|
『第 5 楼』:
使用 LLM 解释/回答一下
楼上说得很清楚了,用CHOICE命令也很强的。
What the person above said is very clear. The CHOICE command is also very powerful.
|

欢迎你到批处理爱好者联盟QQ群:18023953 |
|
2007-6-8 11:23 |
|
|
yyuunnnn
新手上路

积分 12
发帖 5
注册 2007-6-8
状态 离线
|
『第 6 楼』:
使用 LLM 解释/回答一下
现在还有几个办公室的会DOS?你不就让菜单一个只进DOS,一个进系统不就得了?
Now there are still a few people in the office who know DOS? Don't you just have one menu to enter DOS only and one to enter the system?
|
|
2007-6-8 20:01 |
|
|
hdyue
新手上路

积分 18
发帖 8
注册 2007-6-7
状态 离线
|
『第 7 楼』:
问题未解决
使用 LLM 解释/回答一下
2楼的话我明白,但GHOST的密码是固定的。能更改密码吗?告诉我在哪里更改。
3楼的话我不大明白。因为我也试过以下这段代码。效果也是不执行密码部分,直接执行:aa部分。
@echo off
set choice=
set /p choice= password:
IF NOT "%Choice%"=="" SET Choice=%Choice:~0,1%
if /i "%choice%"=="h" goto aa
exit
::以下部分代替GHOST带参数命令
:aa
echo 你好
pause
哪位大虾能帮我完整解答。谢了!
I understand what you said on the 2nd floor, but the password of GHOST is fixed. Can the password be changed? Tell me where to change it.
I don't quite understand what you said on the 3rd floor. Because I have also tried the following code. The effect is also that the password part is not executed, and it directly executes the :aa part.
@echo off
set choice=
set /p choice= password:
IF NOT "%Choice%"=="" SET Choice=%Choice:~0,1%
if /i "%choice%"=="h" goto aa
exit
::The following part replaces the GHOST command with parameters
:aa
echo Hello
pause
|
|
2007-6-9 00:42 |
|
|
lianjiang2004
金牌会员
     
积分 3946
发帖 1884
注册 2006-1-20
状态 离线
|
|
2007-6-9 07:58 |
|
|
lianjiang2004
金牌会员
     
积分 3946
发帖 1884
注册 2006-1-20
状态 离线
|
『第 9 楼』:
使用 LLM 解释/回答一下
好像choice只能输入一个字符。不理想,输入长密码,建议用wbat。
找到了说明,可看看。
------------------------
:box输入框说明
~[$变量,长度,参数]~ 此格式表示输入框 输入的内容会被复制到~%%变量%%~
其中的~长度~和~参数~都可以被忽略
其中的~长度~表示最多能输入多少个字符 如 ~[$变量,2]~ 则只能输入2个字符
如果~长度~被忽略 如 ~[$变量 ]~ 此时的长度为方括号的大小
参数包括
U 始终显示大写字母
P 密码输入框 显示的是 ***
! 除非按ESC关闭窗口 否则必须输入不能为空
如 ~[$password,9,P!]~
表示必须要输入最多9位的密码 输入得值存到%%password%%里面
::
It seems that choice can only input one character. Not ideal. For entering long passwords, it is suggested to use wbat. Found the instructions, you can take a look.
------------------------
:box Input Box Instructions
~~ This format means that the content entered in the input box will be copied to ~%%Variable%%~
Among them, ~Length~ and ~Parameter~ can be ignored
The ~Length~ indicates the maximum number of characters that can be entered. For example, ~~ can only enter 2 characters
If ~Length~ is ignored, such as ~~, the length at this time is the size of the square brackets
Parameters include
U Always display uppercase letters
P Password input box, displaying ***
! Must be entered and cannot be empty unless the window is closed by pressing ESC
Such as ~~
It means that a password with a maximum of 9 digits must be entered, and the entered value is stored in %%password%%
|

Windows 一键还原
http://www.yjhy.com |
|
2007-6-9 08:22 |
|
|
hdyue
新手上路

积分 18
发帖 8
注册 2007-6-7
状态 离线
|
『第 10 楼』:
使用 LLM 解释/回答一下
choice确实是只能输入一个字符,但可以定义在第几位,也不错。问题的关键在于用什么内部命令来实现密码输入。我分不清哪些是内部命令哪些是外部命令。我试了不止这两种密码语句,结果在纯DOS下都不执行密码语句部分。我对密码强度不要求,只要有密码就行。
哪位大虾帮帮忙。谢了!
The `choice` indeed can only input one character, but it can be defined in which position, which is not bad. The key issue is which internal command to use to implement password input. I can't tell which are internal commands and which are external commands. I have tried more than these two password statements, and as a result, the password statement part is not executed in pure DOS. I don't have requirements for password strength, as long as there is a password. Which expert can help? Thanks.
|
|
2007-6-9 17:37 |
|
|
lianjiang2004
金牌会员
     
积分 3946
发帖 1884
注册 2006-1-20
状态 离线
|
『第 11 楼』:
使用 LLM 解释/回答一下
简单讲,只要有command,就能执行的命令就是内部命令,比如dir, copy 等。需要另外专门文件才可执行的,是外部命令,比如format, fdisk,attrib等。
Simply put, commands that can be executed as long as there is command are internal commands, such as dir, copy, etc. Commands that need additional special files to be executed are external commands, such as format, fdisk, attrib, etc.
|

Windows 一键还原
http://www.yjhy.com |
|
2007-6-9 17:41 |
|
|
hdyue
新手上路

积分 18
发帖 8
注册 2007-6-7
状态 离线
|
『第 12 楼』:
使用 LLM 解释/回答一下
lianjiang2004,你好!
我的问题是不是在纯DOS下无法实现?
能不能帮忙写一个?我对密码强度不要求,只要有密码就行。
lianjiang2004, hello!
Is my problem not achievable under pure DOS?
Can you help write one? I don't have requirements for password strength, as long as there is a password.
|
|
2007-6-9 17:44 |
|
|
lianjiang2004
金牌会员
     
积分 3946
发帖 1884
注册 2006-1-20
状态 离线
|
『第 13 楼』:
使用 LLM 解释/回答一下
用choice就是纯dos下的。
刚刚查了个帖子,也是用choice的,不过能实现验证多位密码。供参考。
-----------------------------------------
将以下存成一个批处理文件.再跟据需要修改即可.
@echo off
:: 设置初使密码只能使用小写字母和数字
set pass=chenallqq368178720
:: 输入密码并验证
:pass
cls
echo.
echo.
echo. Please input your password!
echo.
echo. Password:%xxx%
choice /c:abcdefghijklmnopqrstuvwxyz1234567890 /N
if errorlevel 1 set chk=a
if errorlevel 2 set chk=b
if errorlevel 3 set chk=c
if errorlevel 4 set chk=d
if errorlevel 5 set chk=e
if errorlevel 6 set chk=f
if errorlevel 7 set chk=g
if errorlevel 8 set chk=h
if errorlevel 9 set chk=i
if errorlevel 10 set chk=j
if errorlevel 11 set chk=k
if errorlevel 12 set chk=l
if errorlevel 13 set chk=m
if errorlevel 14 set chk=n
if errorlevel 15 set chk=o
if errorlevel 16 set chk=p
if errorlevel 17 set chk=q
if errorlevel 18 set chk=r
if errorlevel 19 set chk=s
if errorlevel 20 set chk=t
if errorlevel 21 set chk=u
if errorlevel 22 set chk=v
if errorlevel 23 set chk=w
if errorlevel 24 set chk=x
if errorlevel 25 set chk=y
if errorlevel 26 set chk=z
if errorlevel 27 set chk=1
if errorlevel 28 set chk=2
if errorlevel 29 set chk=3
if errorlevel 30 set chk=4
if errorlevel 31 set chk=5
if errorlevel 32 set chk=6
if errorlevel 33 set chk=7
if errorlevel 34 set chk=8
if errorlevel 35 set chk=9
if errorlevel 36 set chk=0
set input=%input%%chk%
set xxx=%xxx%*
:: 密码检验,如果正确则退出
if #%pass%==#%input% goto end
goto pass
:end
运行后如果依次输入了chenallqq368178720就会退出,否则.........
这是密码检验的批处理,可以修改一下变成设置密码的批处理.
Using choice is purely for DOS.
Just checked a post, which also uses choice, but can achieve verifying multi-digit passwords. For reference.
-----------------------------------------
Save the following as a batch file. Then modify it as needed.
@echo off
:: Set the initial password, only lowercase letters and numbers are allowed
set pass=chenallqq368178720
:: Input password and verify
:pass
cls
echo.
echo.
echo. Please input your password!
echo.
echo. Password:%xxx%
choice /c:abcdefghijklmnopqrstuvwxyz1234567890 /N
if errorlevel 1 set chk=a
if errorlevel 2 set chk=b
if errorlevel 3 set chk=c
if errorlevel 4 set chk=d
if errorlevel 5 set chk=e
if errorlevel 6 set chk=f
if errorlevel 7 set chk=g
if errorlevel 8 set chk=h
if errorlevel 9 set chk=i
if errorlevel 10 set chk=j
if errorlevel 11 set chk=k
if errorlevel 12 set chk=l
if errorlevel 13 set chk=m
if errorlevel 14 set chk=n
if errorlevel 15 set chk=o
if errorlevel 16 set chk=p
if errorlevel 17 set chk=q
if errorlevel 18 set chk=r
if errorlevel 19 set chk=s
if errorlevel 20 set chk=t
if errorlevel 21 set chk=u
if errorlevel 22 set chk=v
if errorlevel 23 set chk=w
if errorlevel 24 set chk=x
if errorlevel 25 set chk=y
if errorlevel 26 set chk=z
if errorlevel 27 set chk=1
if errorlevel 28 set chk=2
if errorlevel 29 set chk=3
if errorlevel 30 set chk=4
if errorlevel 31 set chk=5
if errorlevel 32 set chk=6
if errorlevel 33 set chk=7
if errorlevel 34 set chk=8
if errorlevel 35 set chk=9
if errorlevel 36 set chk=0
set input=%input%%chk%
set xxx=%xxx%*
:: Password check, if correct then exit
if #%pass%==#%input% goto end
goto pass
:end
If you enter chenallqq368178720 in sequence when running, it will exit; otherwise...
This is a batch file for password verification, which can be modified to become a batch file for setting the password.
|

Windows 一键还原
http://www.yjhy.com |
|
2007-6-9 17:50 |
|
|
hdyue
新手上路

积分 18
发帖 8
注册 2007-6-7
状态 离线
|
『第 14 楼』:
使用 LLM 解释/回答一下
lianjiang2004,你好!谢谢你。
你提供的这段代码我也见过,但未试过。原因是我用的代码那么简单,运行后都不行,这么复杂就更不敢试了,不过我会试一下的。谢谢。
不知道我的问题讲清楚了没有。我的意思是,在出现启动双菜单选择DOS后,运行一个批处理进行GHOST前,希望有个简单的密码,就是说不希望被人随意GHOST。
我在批处理中用过choice命令<详见7楼>,执行批处理时也是不出现密码部分,直接执行后续语句,什么原因使密码语句被跳漏过去呢?
帮帮忙。能否给个完整语句,谢了。
lianjiang2004, hello! Thank you.
The code you provided I've also seen, but haven't tried. The reason is that the code I use is so simple, and it doesn't work after running, so I don't dare to try such a complex one, but I will try. Thank you.
I don't know if my question is clear. I mean, after the dual menu selection DOS appears, before running a batch processing for GHOST, I hope there is a simple password, that is, I don't want to be casually GHOST.
I used the choice command in the batch processing <see 7th floor>, when executing the batch processing also doesn't appear the password part, directly execute the subsequent statements, what reason makes the password statement be skipped past?
Help. Can give a complete statement, thanks.
|
|
2007-6-9 18:06 |
|
|
lianjiang2004
金牌会员
     
积分 3946
发帖 1884
注册 2006-1-20
状态 离线
|
|
2007-6-9 18:31 |
|