# Example of how to password protect a payload file using a unique password (only shows if 64-bit CPU)

iftitle [checkrange 2,3 is64bit && if exist $HOME$/ubuntu-14.04.1-desktop-amd64.iso] Ubuntu\n Run Ubuntu on a 64-bit system
errorcheck on
password fred || configfile (md)0xa000+0x50
/%grub%/QRUN.g4b $HOME$/ubuntu-14.04.1-desktop-amd64.iso
boot

# Example unique password (encrypted)- only shows if 32-bit CPU
# md5 text below = easy2boot

iftitle [checkrange 0,1 is64bit && if exist $HOME$/ubuntu32.iso] Ubuntu\n Run Ubuntu on a 32-bit system
errorcheck on
password --md5 $1$1$okAQ3AJUdhqf3TVrwKvJP1 || configfile (md)0xa000+0x50
/%grub%/QRUN.g4b $HOME$/ubuntu-14.04.1-desktop-amd32.iso
boot


# Example using E2B passwords - pwd is the E2B shell\edit password, menupwd is the optional payload password, both can be set in MyE2B.cfg
# only shows if 64-bit CPU

iftitle [checkrange 2,3 is64bit && if exist $HOME$/ubuntu-14.04.1-desktop-amd64.iso] Ubuntu\n Run Ubuntu on a 64-bit system
errorcheck on
if exist menupwd password %menupwd% && /%grub%/QRUN.g4b $HOME$/ubuntu-14.04.1-desktop-amd64.iso && boot
if exist pwd password %pwd% &&         /%grub%/QRUN.g4b $HOME$/ubuntu-14.04.1-desktop-amd64.iso && boot
password fred &&                       /%grub%/QRUN.g4b $HOME$/ubuntu-14.04.1-desktop-amd64.iso && boot
configfile (md)0xa000+0x50
boot
