中国DOS联盟论坛

中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --

联盟域名:www.cn-dos.net  论坛域名:www.cn-dos.net/forum
DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!

游客:  注册 | 登录 | 命令行 | 会员 | 搜索 | 上传 | 帮助 »
中国DOS联盟论坛 » DOS启动盘 & LOGO技术 (启动盘室) » 麻烦高人注解一下批处理代码意思。
作者:
标题: 麻烦高人注解一下批处理代码意思。 上一主题 | 下一主题
haolongo
初级用户





积分 24
发帖 17
注册 2008-8-22
状态 离线
『楼 主』:  麻烦高人注解一下批处理代码意思。

GHOST镜像文件有密码,如何破解?

我的东芝笔记本带有一张恢复盘,是GHOST做的,但是影象文件有密码,而恢复的时候却不需要任何密码…… 怎么能破解出这个密码??
光盘自动启动,自动恢复的,我把几个批处理文件内容放上,请帮忙看看:
软盘镜像文件内
autoexec.bat的内容:
@ECHO OFF
PATH=A:\TOOLS;A:\DOS
REM manufacture check "TOSHIBA"
TOSCHK > NUL
IF ERRORLEVEL 1 OFF
REM set temporary drive
SET TEMP=I:
VOLCHECK I: MS-RAMDRIVE > NUL
IF NOT ERRORLEVEL 1 GOTO DV
SET TEMP=H:
VOLCHECK H MS-RAMDRIVE > NUL
IF NOT ERRORLEVEL 1 GOTO DV
SET TEMP=G:
VOLCHECK G: MS-RAMDRIVE > NUL
IF NOT ERRORLEVEL 1 GOTO DV
SET TEMP=F:
VOLCHECK F: MS-RAMDRIVE > NUL
IF NOT ERRORLEVEL 1 GOTO DV
SET TEMP=E:
VOLCHECK E: MS-RAMDRIVE > NUL
IF NOT ERRORLEVEL 1 GOTO DV
SET TEMP=D:
VOLCHECK D: MS-RAMDRIVE > NUL
IF NOT ERRORLEVEL 1 GOTO DV
SET TEMP=C:
VOLCHECK C: MS-RAMDRIVE > NUL
IF NOT ERRORLEVEL 1 GOTO DV
GOTO ERROR
:DV
F2D A:\BMP.IMG %TEMP% > NUL
F2D A:\TOOLS.IMG %TEMP% /D > NUL
PATH=%TEMP%\TOOLS;%TEMP%\DOS;A:\DOS;A:\TOOLS
IF NOT EXIST A:\README.BMP GOTO CD
BMPVIEW A:\README.BMP
PAUSE > NUL
:CD
MSCDEX /D:MSCD001 /L:T >NUL
IF ERRORLEVEL 1 GOTO NO_CDDRV
REM get temporary status
MBR /G1 >NUL
IF ERRORLEVEL 3 GOTO MENU
IF ERRORLEVEL 1 GOTO 2ND
:MENU
IF NOT EXIST A:\BASE.TXT GOTO NORMAL
IF NOT EXIST %TEMP%\BMP\SELECT.BMP GOTO NORMAL
REM OS select
BMPVIEW %TEMP%\BMP\SELECT.BMP /X=140 /Y=160
REM Clear keybuffer
CLK
CHOICE /C:12 > NUL
IF ERRORLEVEL 2 GOTO BASEOS
REM Push '1' button
BMPVIEW /XC %TEMP%\BMP\BTN1.BMP /X=198 /Y=221
MBR /S2:00 >NUL
GOTO WARNNING
:BASEOS
REM Push '2' button
BMPVIEW /XC %TEMP%\BMP\BTN2.BMP /X=198 /Y=238
MBR /S2:01 >NUL
GOTO WARNNING
:NORMAL
REM no OS select
MBR /S2:00 >NUL
BMPVIEW %TEMP%\BMP\RECOVERY.BMP /X=140 /Y=160
CLK
CHOICE > NUL
IF ERRORLEVEL 2 GOTO CDERREND
BMPVIEW /XC %TEMP%\BMP\Y2.BMP /X=340 /Y=288
GOTO WARNNING
:WARNNING
REM warnning
SET GOPT=-QUIET
BMPVIEW %TEMP%\BMP\MES002.BMP /X=140 /Y=160
CLK
CHOICE /C:YNS> NUL
IF ERRORLEVEL 3 GOTO STATYES
IF ERRORLEVEL 2 GOTO CDERREND
GOTO YES
:STATYES
SET GOPT=
:YES
REM Push 'Y' button
BMPVIEW %TEMP%\BMP\Y1.BMP /XC /X=340 /Y=288
REM set temporary status (first boot)
MBR /S1:01 >NUL
:2ND
REM check boot devie
REM  0:FD 1:CD-ROM
CDCKBOOT > NUL
REM if errorlevel 1 then set boot priority "FD"=0 (Default)
IF ERRORLEVEL 1 SETBOOT 0 >NUL
REM Partition check
REM  11: HDD has already formatted. (FAT32)
REM  10: HDD has not been formatted. (FAT32)
REM   7: HDD has already formatted. (FAT16)
REM   6: HDD has not been formatted. (FAT16)
REM   3: HDD has already formatted. (Invalid FAT)
REM   1: HDD has not been formatted. (Invalid FAT)
REM   0: No partition exists.
MBR /P >NUL
IF ERRORLEVEL 11 GOTO FORMAT
IF ERRORLEVEL 10 GOTO FORMAT
IF ERRORLEVEL  7 GOTO FORMAT
IF ERRORLEVEL  6 GOTO FORMAT
IF ERRORLEVEL  1 GOTO FORMAT
GOTO FDISK
:CLEAR
REM clear partition
BMPVIEW %TEMP%\BMP\CLEAR.BMP
CLK
CHOICE > NUL
IF ERRORLEVEL 2 GOTO CDERREND
REM Push 'Y' button
BMPVIEW %TEMP%\BMP\Y1.BMP /XC /X=340 /Y=288
BMPVIEW %TEMP%\BMP\MES002.BMP /X=140 /Y=160
CLK
CHOICE > NUL
IF ERRORLEVEL 2 GOTO CDERREND
REM Push 'Y' button
BMPVIEW %TEMP%\BMP\Y1.BMP /XC /X=340 /Y=288
MBR /! > NUL
MBR /C1 > NUL
CDCKBOOT > NUL
IF ERRORLEVEL 1 SETBOOT 4 >NUL
HARDBOOT
:FDISK
REM create FAT32 partition (Max64GB)
CLS
ECHO.
ECHO Create FAT32 partition ...
FDISK 1 /PRI:65535
IF ERRORLEVEL 1 GOTO FDISKERR
REM check boot devie
REM  0:FD 1:CD-ROM
CDCKBOOT > NUL
REM if errorlevel 1 then set boot priority "CD-ROM"=4
IF ERRORLEVEL 1 SETBOOT 4 >NUL
REM reboot
HARDBOOT
:FORMAT
CLS
REM --- FORMAT C: %FMTOPT% /U /V:"" /AUTOTEST
REM Clear temporary status
MBR /C1 >NUL
GOTO GO
:NO_CDDRV
REM CD-ROM Drive not found
BMPVIEW %TEMP%\BMP\NO_CDDRV.BMP
PAUSE > NUL
GOTO END
:FDISKERR
ECHO FDISK ERROR!
PAUSE > NUL
GOTO END
:CDERREND
REM Push 'N' button
BMPVIEW %TEMP%\BMP\N1.BMP /XC /X=412 /Y=288
GOTO END
:END
OFF
:ERROR
ECHO RAMDIRVE NOT FOUND!
PAUSE > NUL
GOTO END
:GO
IF EXIST %TEMP%\BMP\WAIT.BMP BMPVIEW %TEMP%\BMP\WAIT.BMP
IF NOT EXIST %TEMP%\BMP\WAIT.BMP ECHO COPYING...
MICOPY A:\TOOLS %TEMP%\TOOLS > NUL
MICOPY A:\DOS %TEMP%\DOS > NUL
COPY COMMAND.COM %TEMP%\ > NUL
COPY RUN.BAT %TEMP%\ > NUL
%TEMP%
CD \
SET COMSPEC=%TEMP%\COMMAND.COM
SET BASECD=
PATH=%TEMP%\TOOLS;%TEMP%\DOS
RUN.BAT
run.bat的内容:
@ECHO OFF
PATH=%TEMP%\TOOLS;%TEMP%\DOS
:CHECKCD
REM Check CD-ROM Drive
REM  0:Ready 1:NotReady 2:NotCD-ROMdrive 3:IllegalDrive
CDCHECK T: > NUL
CDCHECK T: > NUL
IF ERRORLEVEL 2 GOTO NO_CDDRV
IF ERRORLEVEL 1 GOTO SET_CDROM
SET CDDRV=T:
GOTO CD_EXIST
:SET_CDROM
REM Insert CD-ROM
BMPVIEW %TEMP%\BMP\SETCDROM.BMP
PAUSE > NUL
:CHECKCD2
REM Check CD-ROM Drive
CDCHECK T: > NUL
CDCHECK T: > NUL
IF ERRORLEVEL 2 GOTO NO_CDDRV
IF ERRORLEVEL 1 GOTO NOCDROM
SET CDDRV=T:
GOTO CD_EXIST
:CD_EXIST
REM Check Recovery CD-ROM
IF NOT EXIST %CDDRV%\PREINST.GHO GOTO BAD_CDROM
IF NOT EXIST %CDDRV%\GHOST.EXE GOTO BAD_CDROM
IF NOT EXIST %TEMP%\TOOLS\GHOST.EXE COPY %CDDRV%\GHOST.EXE %TEMP%\TOOLS > NUL
:RECOVERY
IF NOT EXIST %CDDRV%\PREDATA.BAT GOTO BAD_CDROM
IF (%COMPMODE%) == () CALL %CDDRV%\PREDATA.BAT
IF NOT EXIST %TEMP%\BMP\CHANGE.BMP GOTO SKIP
IF (%CDMAX%) == (1) GOTO SKIP
BMPVIEW %TEMP%\BMP\CHANGE.BMP
PAUSE > NUL
:SKIP
SET TGHOSTPS=%FILENAME%
IF (%COMPMODE%) == (PARTITION) TGHOST -clone,mode=pload,src=%CDDRV%\PREINST.GHO:1,dst=1:1 -afile=%TEMP%\PREINST.ERR -fatlimit -auto -sure -batch %GOPT%
IF (%COMPMODE%) == (DRIVE)     TGHOST -clone,mode=load,src=%CDDRV%\PREINST.GHO,dst=1,szeE -afile=%TEMP%\PREINST.ERR -fatlimit -auto -sure -batch %GOPT%
IF ERRORLEVEL 1 GOTO REC_NG
LBA /C > NUL
FDISK /MBR > NUL
:NORMAL
REM Recovery success
BMPVIEW %TEMP%\BMP\THEEND.BMP
:LOOP
PAUSE > NUL
HARDBOOT
GOTO LOOP
REM ================= ERROR ===============================
:BAD_CDROM
REM Bad CD-ROM
BMPVIEW %TEMP%\BMP\BADCDROM.BMP /X=140 /Y=160
CLK
CHOICE > NUL
IF ERRORLEVEL 2 GOTO CDERREND
REM Push 'Y' button
BMPVIEW %TEMP%\BMP\Y1.BMP /XC /X=340 /Y=288
GOTO SET_CDROM
:NOCDROM
REM CD-ROM not found
BMPVIEW %TEMP%\BMP\NOCDROM.BMP /X=140 /Y=160
CLK
CHOICE > NUL
IF ERRORLEVEL 2 GOTO CDERREND
REM Push 'Y' button
BMPVIEW %TEMP%\BMP\Y1.BMP /XC /X=340 /Y=288
GOTO SET_CDROM
:NO_CDDRV
REM CD-ROM Drive not found
BMPVIEW %TEMP%\BMP\NO_CDDRV.BMP
PAUSE > NUL
GOTO END
:REC_NG
REM Recovery error
BMPVIEW %TEMP%\BMP\RECOVERR.BMP /X=96 /Y=168
CLK
CHOICE > NUL
IF ERRORLEVEL 2 GOTO R_ERREND
REM Push 'Y' button
BMPVIEW %TEMP%\BMP\Y3.BMP /XC /X=392 /Y=272
REM Restart
BMPVIEW %TEMP%\BMP\REBOOT2.BMP
PAUSE > NUL
REM check boot devie
REM  0:FD 1:CD-ROM
CDCKBOOT > NUL
REM if errorlevel 1 then set boot priority "CD-ROM"=4
IF ERRORLEVEL 1 SETBOOT 4 >NUL
REM reboot
HARDBOOT
:R_ERREND
REM Push 'N' button
BMPVIEW %TEMP%\BMP\N1.BMP /XC /X=464 /Y=272
GOTO END
:CDERREND
REM Push 'N' button
BMPVIEW %TEMP%\BMP\N1.BMP /XC /X=412 /Y=288
GOTO END
:END
OFF
光盘内predata.bat的内容:
@ECHO OFF
REM --- Version 3.0(603) ---
SET SWN=S3A0739D
SET EXT=001
SET VOLLABEL=%SWN%%EXT%
SET FILENAME=%SWN%.%EXT%
SET COUNTRY=CHINA
SET INSTMODE=SING
SET COMPMODE=PARTITION
SET OSTYPE=ME
SET PASSMODE=YES
SET CDMAX

GHOST镜像文件有密码,如何破解?

2010-8-7 15:30
查看资料  发送邮件  发短消息 网志   编辑帖子  回复  引用回复
fujianabc
金牌会员





积分 3467
发帖 1616
注册 2004-6-21
状态 离线
『第 2 楼』:  

先恢复gho文件,然后自己用ghost重做一个gho文件就没密码了

2010-8-8 10:39
查看资料  发送邮件  发短消息 网志   编辑帖子  回复  引用回复

请注意:您目前尚未注册或登录,请您注册登录以使用论坛的各项功能,例如发表和回复帖子等。


可打印版本 | 推荐给朋友 | 订阅主题 | 收藏主题



论坛跳转: