无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站广告联系 微信:wuyouceo QQ:184822951
查看: 7606|回复: 48

grub4dos启动时不想让别人看到主清单内容,只有输入正确密码才可以看到。

    [复制链接]
发表于 2013-5-22 19:44:38 | 显示全部楼层 |阅读模式
大家好:
通过U盘grub4dos,不想让别人看到menu.lst显示的清单内容,必须在输入正确的密码之后才会显示主清单内容。
也就是说,一直提示输入正确的密码,否则只会停留到要求输入密码状态。
grub4dos有没有办法在menu.lst中写点儿什么实现呢?

目前使用加入password --密码
这种方式,引导后是会显示出主清单内容的,而且运行默认选项报错后还是会返回到显示主清单状态。
发表于 2013-5-23 00:26:20 | 显示全部楼层
贴出菜单看看!!!是否正确使用了
回复

使用道具 举报

发表于 2013-5-23 03:24:47 | 显示全部楼层
本帖最后由 sratlf 于 2013-5-23 03:26 编辑

可以用下面的菜单  注意不能用在内置菜单中  用configfile命令调用本菜单

注意第三行 command 后面需要有一个空格  两个Password  一个是提示信息  另一个是密码  可以自行修改
  1. !BAT
  2. goto :start
  3. call Fn.0 0 0x8217 | command

  4. #普通菜单开始
  5. default 0
  6. debug off

  7. title test
  8. halt
  9. #普通菜单结束

  10. :start
  11. clear
  12. set input=
  13. set /p input=Password:  || goto :start
  14. if "%input%"=="Password" || goto :start
  15. exit
复制代码

点评

哎呀,你怎么能想到这样写呢?谢谢。  详情 回复 发表于 2013-5-23 10:15
哎呀,你怎么能想到这样写呢?谢谢。  详情 回复 发表于 2013-5-23 10:13

评分

参与人数 1无忧币 +5 收起 理由
wonggo + 5 膜拜大神。

查看全部评分

回复

使用道具 举报

发表于 2013-5-22 21:51:57 | 显示全部楼层
好像没有这个命令
回复

使用道具 举报

 楼主| 发表于 2013-5-23 10:13:44 | 显示全部楼层
sratlf 发表于 2013-5-23 03:24
可以用下面的菜单  注意不能用在内置菜单中  用configfile命令调用本菜单

注意第三行 command 后面需要 ...

哎呀,你怎么能想到这样写呢?谢谢。
回复

使用道具 举报

 楼主| 发表于 2013-5-23 10:15:54 | 显示全部楼层
sratlf 发表于 2013-5-23 03:24
可以用下面的菜单  注意不能用在内置菜单中  用configfile命令调用本菜单

注意第三行 command 后面需要 ...

哎呀,你怎么能想到这样写呢?谢谢。
回复

使用道具 举报

 楼主| 发表于 2013-5-23 20:18:53 | 显示全部楼层
sratlf 发表于 2013-5-23 03:24
可以用下面的菜单  注意不能用在内置菜单中  用configfile命令调用本菜单

注意第三行 command 后面需要 ...

pxe detect
configfile
!BAT
goto :start
call Fn.0 0 0x8217 | command
default 0
debug off
title test
        halt
title Boot Ubuntu
        find --set-root /Ubuntu/vmlinuz
        kernel /Ubuntu/vmlinuz boot=casper iso-scan/filename=/Ubuntu/ubuntu.iso quiet splash rw persistent debian-installer/locale=zh_CN.UTF-8
        console-
        setup/layoutcode=cn console-setup/variantcode= --
        initrd /Ubuntu/initrd.lz
        boot
title commandline
        commandline
title reboot
        reboot
title halt
        halt
:start
clear
set input=
set /p input=Password: 1**6 || goto :start
if "%input%"=="Password" || goto :start
exit

这样使用对吗?
我同时也在尝试别的方法,效果也只能达到我要想的一半吧。
论坛能即是聊天吗,如果能像QQ那样即时聊天,我估计我能说清楚我现在尝试遇到的效果和问题了,
回复

使用道具 举报

发表于 2013-5-24 09:41:13 | 显示全部楼层
895300863 发表于 2013-5-23 20:18
pxe detect
configfile
!BAT
  1. !BAT
  2. goto :start
  3. call Fn.0 0 0x8217 | command
  4. pxe detect
  5. default 0
  6. debug off

  7. title Boot Ubuntu
  8.         find --set-root /Ubuntu/vmlinuz
  9.         kernel /Ubuntu/vmlinuz boot=casper iso-scan/filename=/Ubuntu/ubuntu.iso quiet splash rw persistent debian-installer/locale=zh_CN.UTF-8
  10.         console-
  11.         setup/layoutcode=cn console-setup/variantcode= --
  12.         initrd /Ubuntu/initrd.lz
  13.         boot
  14. title commandline
  15.         commandline
  16. title reboot
  17.         reboot
  18. title halt
  19.         halt

  20. :start
  21. clear
  22. set input=
  23. set /p input=Password:  || goto :start
  24. if "%input%"=="1**6" || goto :start
  25. exit
复制代码
差不多应该是这样
回复

使用道具 举报

发表于 2013-5-24 10:07:33 | 显示全部楼层
本帖最后由 2012hongrui 于 2013-5-24 10:20 编辑

其实不用批处理也可以做到,而且还是md5密码的:
1.grldr内置菜单如下:(这里的md5密码是123,可以自行修改,只是作个示例)
clear
hiddenmenu --chkpass=0x2200
timeout 0
debug off
password --md5 $1$3$YMl9qjZaRG3CBSkEH3ZHR0
title
password --md5 $1$3$YMl9qjZaRG3CBSkEH3ZHR0 && find --set-root --devices=h /boot/grub/menu.lst && configfile /boot/grub/menu.lst ! configfile (md)4+8

2.menu.lst的菜单内容如下:
hiddenmenu --chkpass
default 0
timeout 3
color white/blue blue/yellow light-red/blue 10
title 1 BOOT RAMOS WINXP
debug off
clear
echo
echo Please wait for a little time...
echo
find --set-root --devices=h /RAMOS/WINXP.VHD
map --mem /RAMOS/WINXP.VHD (hd0)
map --hook
rootnoverify (hd0,0)
chainloader (hd0,0)/ntldr

3.禁用狂按C键进入命令行
用winhex打开grldr,在20005处00改为04

这样做只要grub4dos获得控制权,那可是非要输入这个123的密码才能进行操作,唯一的缺点是输入正确密码进入menu.lst菜单后等待3秒钟进入默认的第一个菜单启动项,在这3秒钟按ESC键才能看到菜单。
回复

使用道具 举报

 楼主| 发表于 2013-5-24 10:19:25 | 显示全部楼层
2012hongrui 发表于 2013-5-24 10:07
123

什么?
回复

使用道具 举报

 楼主| 发表于 2013-5-24 10:39:59 | 显示全部楼层
sratlf 发表于 2013-5-24 09:41
差不多应该是这样

按照这样的代码,原样复制入,经过反复实验,效果和咱相要的还是差一些,请问哪里需要修改?
回复

使用道具 举报

 楼主| 发表于 2013-5-24 10:51:12 | 显示全部楼层
2012hongrui 发表于 2013-5-24 10:07
其实不用批处理也可以做到,而且还是md5密码的:
1.grldr内置菜单如下:(这里的md5密码是123,可以自行修 ...

琢磨琢磨,实验实验,看看效果,谢谢。
回复

使用道具 举报

 楼主| 发表于 2013-5-24 10:52:39 | 显示全部楼层
sratlf 发表于 2013-5-24 09:41
差不多应该是这样

谢谢,我再多琢磨琢磨,再实验。
回复

使用道具 举报

发表于 2013-5-24 11:34:43 | 显示全部楼层
hiddenmenu命令隐藏整个菜单,指定按键激活,检测密码

点评

今天看到 “sratlf” 贴出来的例子,才恍然大悟你这句话的意思。  发表于 2013-5-28 18:45
回复

使用道具 举报

 楼主| 发表于 2013-5-24 11:57:11 | 显示全部楼层
2012hongrui 发表于 2013-5-24 10:07
其实不用批处理也可以做到,而且还是md5密码的:
1.grldr内置菜单如下:(这里的md5密码是123,可以自行修 ...

用winhex打开grldr,在20005处00改为04

为什么找不到20005这里呢
回复

使用道具 举报

发表于 2013-5-24 17:53:13 | 显示全部楼层
895300863 发表于 2013-5-24 11:57
用winhex打开grldr,在20005处00改为04

为什么找不到20005这里呢

禁用C键
禁用C键.JPG

点评

你好,我用这个方法把夜大提供的那个grld修改之后为什么按^+c还是能破解呢  发表于 2013-6-2 17:17
回复

使用道具 举报

发表于 2013-5-24 19:00:07 | 显示全部楼层
试验了一下,关键还是在于禁止c啊,学习了
回复

使用道具 举报

 楼主| 发表于 2013-5-25 10:29:30 | 显示全部楼层
Cracada 发表于 2013-5-24 11:34
hiddenmenu命令隐藏整个菜单,指定按键激活,检测密码

谢谢,试一试
回复

使用道具 举报

 楼主| 发表于 2013-5-25 10:30:19 | 显示全部楼层
2012hongrui 发表于 2013-5-24 17:53
禁用C键

谢谢,找一找这一项。
回复

使用道具 举报

 楼主| 发表于 2013-5-25 16:14:58 | 显示全部楼层
sratlf 发表于 2013-5-24 09:41
差不多应该是这样

呀!这两种方法都了好多次,效果还是没有达到,这是什么原因呢?
回复

使用道具 举报

 楼主| 发表于 2013-5-25 16:15:23 | 显示全部楼层
2012hongrui 发表于 2013-5-24 10:07
其实不用批处理也可以做到,而且还是md5密码的:
1.grldr内置菜单如下:(这里的md5密码是123,可以自行修 ...

呀!这两种方法都了好多次,效果还是没有达到,这是什么原因呢?
回复

使用道具 举报

 楼主| 发表于 2013-5-25 16:25:15 | 显示全部楼层
sratlf 发表于 2013-5-23 03:24
可以用下面的菜单  注意不能用在内置菜单中  用configfile命令调用本菜单

注意第三行 command 后面需要 ...

请问

如果输入的密码错误则反回到继续要求输入密码的选项
这句话无限循环

如果输入的密码正确则显示主菜单

这两句话怎么写成计算机语句呢?
回复

使用道具 举报

 楼主| 发表于 2013-5-27 15:37:21 | 显示全部楼层
sratlf 发表于 2013-5-23 03:24
可以用下面的菜单  注意不能用在内置菜单中  用configfile命令调用本菜单

注意第三行 command 后面需要 ...


0                grub4dos能不能一启动就要求输入正确的密码?如果输入正确才能显示其它内容,否则一直要求输入正确密码,而不显示其他任何内容?!!!
回复

使用道具 举报

 楼主| 发表于 2013-5-27 15:37:42 | 显示全部楼层
fhabh 发表于 2013-5-22 21:51
好像没有这个命令


0                grub4dos能不能一启动就要求输入正确的密码?如果输入正确才能显示其它内容,否则一直要求输入正确密码,而不显示其他任何内容?!!!
回复

使用道具 举报

 楼主| 发表于 2013-5-27 15:38:26 | 显示全部楼层
mygamexxx 发表于 2013-5-23 00:26
贴出菜单看看!!!是否正确使用了


0                grub4dos能不能一启动就要求输入正确的密码?如果输入正确才能显示其它内容,否则一直要求输入正确密码,而不显示其他任何内容?!!!
回复

使用道具 举报

 楼主| 发表于 2013-5-27 15:39:12 | 显示全部楼层
2012hongrui 发表于 2013-5-24 10:07
其实不用批处理也可以做到,而且还是md5密码的:
1.grldr内置菜单如下:(这里的md5密码是123,可以自行修 ...


0                grub4dos能不能一启动就要求输入正确的密码?如果输入正确才能显示其它内容,否则一直要求输入正确密码,而不显示其他任何内容?!!!
回复

使用道具 举报

发表于 2013-5-27 21:01:08 | 显示全部楼层
我觉得大家总要把问题复杂化,看看下面的符合你们要求不:
--------grldr内置------------
default 0
timeout 0
title load.menu
fallback 0
clear
password --md5 ...
configfile  /menu.lst
----------完------------

点评

多贴些例子,像我这样的菜鸟才能明白各位的真正意思,否则还是一头雾水!  发表于 2013-5-28 18:48
configfile /grldr 管用吗?  详情 回复 发表于 2013-5-28 18:33
感谢,学习中,实践中。  详情 回复 发表于 2013-5-28 16:57
回复

使用道具 举报

发表于 2013-5-27 22:08:45 | 显示全部楼层
提供个现成的grldr好了  是0.45c 05-21版的  启动后密码是Password  密码输入正确才加载内置菜单

GRLDR.zip

144.26 KB, 下载次数: 54, 下载积分: 无忧币 -2

点评

需要学习哪些东西才能看明白你们写的那些代码的含义呢?麻烦指点一下吧?  发表于 2013-6-1 11:28
这样的例子太好了,看到它们,反复了解才明白点什么了,哈哈。  发表于 2013-5-28 18:49
反复实验这种方法管用。  详情 回复 发表于 2013-5-28 18:38
感谢,学习中,实践中。  详情 回复 发表于 2013-5-28 16:58
夜大真是高,方法不错,只是修改成另一个密码稍麻烦点.看了一下内容,其实和夜大以前的也差不多,夜大的菜单内容为 !BAT goto :start calc *0x307FFC-0x110000 > nul && set pre_menu=(md)4+8 ! set pre_menu=(md  详情 回复 发表于 2013-5-27 22:53
回复

使用道具 举报

发表于 2013-5-27 22:53:08 | 显示全部楼层
sratlf 发表于 2013-5-27 22:08
提供个现成的grldr好了  是0.45c 05-21版的  启动后密码是Password  密码输入正确才加载内置菜单

夜大真是高,方法不错,只是修改成另一个密码稍麻烦点.看了一下内容,其实和夜大以前的也差不多,夜大的菜单内容为
!BAT
goto :start
calc *0x307FFC-0x110000 > nul && set pre_menu=(md)4+8 ! set pre_menu=(md)0x880+0x200
command %pre_menu%

#普通菜单开始
pxe detect
hiddenmenu
configfile
default 0
timeout 0

title find /menu.lst, /boot/grub/menu.lst, /grub/menu.lst
        errorcheck off
        configfile /boot/grub/menu.lst
        configfile /grub/menu.lst
        if "%@root%"=="(ud)" && calc *0x82A0=*0x82b9&0xff
        if "%@root:~1,1%"=="f" && find --set-root --devices=f /menu.lst && configfile /menu.lst
        find --set-root --ignore-floppies --ignore-cd /menu.lst && configfile /menu.lst
        find --set-root --ignore-floppies --ignore-cd /boot/grub/menu.lst && configfile /boot/grub/menu.lst
        find --set-root --ignore-floppies --ignore-cd /grub/menu.lst && configfile /grub/menu.lst
        errorcheck on
        commandline

title commandline
        commandline

title reboot
        reboot

title halt
        halt#普通菜单结束

:start
clear
set input=
set /p input=Password:  || goto :start
if "%input%"=="Password" || goto :start
exit
这个方法真的不错,唯一的遗憾就是输入密码时是明码。

点评

需要学习哪些东西才能看明白你们写的那些代码的含义呢?麻烦指点一下吧?  发表于 2013-6-1 11:28
[麻烦贴个例子出来好吗?麻烦贴个例子出来好吗?  发表于 2013-5-28 18:52
感谢,学习中,实践中。 如果使用密文方式,需要把set /p命令换成password命令,是不是这样子呢? password md5 ***************** || goto :start  详情 回复 发表于 2013-5-28 17:01
只是个例子 想密文的话可以把set /p命令换成password命令 那样就不是明文了  发表于 2013-5-28 10:24
回复

使用道具 举报

发表于 2013-5-27 22:56:17 | 显示全部楼层
如果不能禁止C/E以避免启动时狂按C/E进入命令行的话,仅仅靠菜单内的语句判断应该是不行的

点评

需要学习哪些东西才能看明白你们写的那些代码的含义呢?麻烦指点一下吧?  发表于 2013-6-1 11:29
问题你提出来了,那么解决问题的方法有吗?  发表于 2013-5-28 18:54
感谢,学习中,实践中。 前面有位朋友使用winhex改变的方式能不能解决这方面问题呢?  详情 回复 发表于 2013-5-28 17:03
是的,有可能透过编辑模式 (e) 进入菜单,删除口令栏位并按下 b 就能够破解的!  发表于 2013-5-28 01:05
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|捐助支持|无忧启动 ( 闽ICP备05002490号-1 )

闽公网安备 35020302032614号

GMT+8, 2024-3-29 13:28

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表