JohnSteven Posted November 30, 2004 Share Posted November 30, 2004 I've been attempting to implement a password into my cdshell.ini file and am at another brain freeze. I found the following on one of the sites for building the AIODVD and put it together with my cdshell.ini file, but it just keep looping and won't go to my boot menu.## script file for:# CDSHELL system / www.cdshell.org# run cdshw.com and type script password.cdshell## If you are interesting in contact with me,# then write to pawelwabno@klub.chip.pl# REMEMBER - CDSHELL THINGS ONLY!!!!!#### THANK YOU, MY LORD!!!# Updated on June 18, 2004 to use MD5 hash function by# Mike Ter Louw. Great script Paul! One of my favs. :D## MAIN MENU#set gen_pass = 0set position=1start:show consoleclsset y="textCursorY"set x="textCursorX"call main_screenif $position==1;then goto item_1if $position==2;then goto item_2if $position==3;then goto item_3if $position==4;then goto item_4item_1:set $x=0set $y=3print " \c6f \cf1 generate password \c64 \n"goto loopitem_2:set $x=0set $y=4print " \c6f \cf1 check password \c64 \n"goto loopitem_3:set $x=0set $y=5print " \c6f \cf1 $$MD5 and $$lastChar\c64 \n"goto loopitem_4:set $x=0set $y=6print " \c6f \cf1 about \c64 \n"goto looploop:getkeyif $lastKey==key[esc];then clear;then endif $lastKey==key[down];then goto go_downif $lastKey==key[up];then goto go_upif $lastKey==key[enter];then goto execute_$positiongoto loopgo_down:call main_screenif compare["$position" "4"]then set position=1else set position = $position + 1goto item_$positiongo_up:call main_screenif compare["$position" "1"]then set position=4else set position = $position - 1goto item_$positionmain_screen:set $x=0set $y=2print " \c6f \n"print " \c6f generate password \n"print " \c6f check password \n"print " \c6f $$MD5 and $$lastChar \n"print " \c6f about \n"print " \c6f \n"return## END OF MAIN MENU#execute_1:## GENERATE PASSWORD#set $y=9print " \c1f \n"print " \c1f Maximum password lenght is 24 characters, confirm end of typing \n"print " \c1f with ENTER. You can use any keys variations (such as: SHIFT/ALT/CTRL \n"print " \c1f + a, esc, F1, home, cursor down, etc.) but only printable \n"print " \c1f characters (a...z, A...Z, 0...9, !@$#...) will be shown, any other \n"print " \c1f will be displayed as sign \c1a*\c1f. \n"print " \c1f Of course password will be generated correctly! \n"print " \c1f \n"print " \c1f Password is: \n"print " \c1f \n"print " \c1f \n"print " \c1f \n"print " \c1f \n"set gen_pass = ""set gen_count = 1set show_count = 1loop_get_pass:getkeyif $lastKey==key[enter];then goto calculate_hashset gen_pass = "$(gen_pass)$lastChar"set letter= "unknown"call lastkey_to_signset $y=17;set $x=18 + $show_countif compare["$letter" "unknown"];then print "\c1a*";else print "\c1e$letter"if compare["$gen_count" "25"];then goto too_many_lettersset gen_count = $gen_count + 1set show_count = $show_count + 1goto loop_get_passcalculate_hash:set MD5 = "$gen_pass"set gen_pass = "$MD5"show_decimal:set $y=18;set $x=6;print "\c1fMD5 value is: \c1e$gen_pass"set $y=20;set $x=6;print "\c1fPress ENTER to type again or ESC to return to main menu...\n"show_decimal_loop:getkeyif $lastKey==key[esc]; then goto startif $lastKey==key[enter]; then goto execute_1goto show_decimal_looptoo_many_letters:set $y=19;set $x=6;print "\c1fAre you afraid that 24 characters password is not enough?\n"set $y=20;set $x=6;print "\c1fPress ENTER to type again or ESC to return to main menu...\n"too_many_letters_loop:getkeyif $lastKey==key[esc]; then goto startif $lastKey==key[enter]; then goto execute_1goto too_many_letters_loop## END OF GENERATE PASSWORD#execute_2:## CHECK PASSWORD#if !compare["$gen_pass" ""];then goto can_check_passwordset $y=9;set $x=0print "\ac\c1f "print "\ac\c1f Generate password, please! "print "\ac\c1f "## LITTLE SOMETHIN'#set five_sec=5set lastKey=0five_sec_loop:set $y=10;set $x=52;print "\c17[$five_sec]"getkey 1if !compare["$lastKey" "0"];then goto five_sec_exitif compare["$five_sec" "1"];then goto five_sec_exitset five_sec = $five_sec - 1goto five_sec_loopfive_sec_exit:set position=1goto start## END OF LITTLE SOMETHIN'#can_check_password:set pass_x=35set pass_y=10set pass_lenght=25set try=1loop_try:call text_enter_passwordset pass_word= ""; set count=1loop_count:getkeyif $lastKey==key[enter]; then goto pass_enteredset pass_word = "$(pass_word)$lastChar"set pass_position= $pass_x + $count;set $x = $pass_position;set $y = $pass_y;print "\c1f*"if compare["$count" "$pass_lenght"];then goto next_tryset count = $count + 1goto loop_countpass_entered:set MD5 = "$pass_word"set pass_word = "$MD5"if compare["$pass_word" "$gen_pass"];then goto access_grantednext_try:if compare["$try" "3"]; then goto access_deniedset try = $try + 1if compare["$try" "2"];then set text_try_again="try again..."if compare["$try" "3"];then set text_try_again="last chance!"call text_try_nextgetkeygoto loop_trytext_enter_password:set $y=9;set $x=0print "\ac\c1f "print "\ac\c1f Enter password: "print "\ac\c1f "set $y=12;set $x=0;print "\ac ";returntext_try_next:set $y=9;set $x=0print "\ac\c1f "print "\ac\c1c Wrong password, $text_try_again "print "\ac\c1f "returnaccess_denied:set $y=9;set $x=0print "\ac\c4f "print "\ac\c4f A C C E S S D E N I E D "print "\ac\c4f "goto check_password_endaccess_granted:set $y=9;set $x=0print "\ac\c2f "print "\ac\c2f A C C E S S G R A N T E D "print "\ac\c2f "check_password_end:set $y=13;set $x=0;print "\acPress ENTER to try again or ESC to return to main menu..."getkeyif $lastKey==key[enter];then goto execute_2if $lastKey==key[esc];then goto startgoto check_password_end## END OF CHECK PASSWORD#execute_3:## $lastKey#set $y=9print "\ac\c1f "print "\ac\c1f This script uses the $$lastChar and $$MD5 variables to apply a one-way "print "\ac\c1f encryption to passwords. This enables you to use the encoded form "print "\ac\c1f in your script, and nobody will know the original password but you! "print "\ac\c1f "print "\ac\c1f Passwords are generated by looping over two key commands: "print "\ac\c1e getkey$; set password = $$(password)$$lastChar "print "\ac\c1f "print "\ac\c1f Then you encode the password by writing to the $$MD5 variable: "print "\ac\c1e set MD5 = \"$$password\" "print "\ac\c1f "print "\ac\c1f Finally, you can obtain the encoded password by reading back from "print "\ac\c1f the $$MD5 variable: \c1eprint \"The encrypted form is: $$MD5\" "print "\ac\c1f "getkey; goto start## END OF $lastKey#execute_4:## ABOUT#set $y=9print " \c1b \n"print " \c1b This script is a simple demonstration of CDSHELL possibilities, \n"print " \c1b and please, don't take it as a serious protection of your work! :-) \n"print " \c1b (if you need that then better think how to disallow access to file \n"print " \c1b cdshell.ini) \n"print " \c1b Maybe next time a little text editor? Just kidding... \n"print " \c1b \n"print " \c1b I must say thank you for \c1fMichael K Ter Louw\c1b for CDShell, \n"print " \c1b also for \c1fGary Tong\c1b and \c1fBart Lagerweij\c1b for DiskEmu!!! \n"print " \c1b \n"print " \c1b \c1fPaul Wabno \n"print " \c1b \n"getkey;goto start## END OF ABOUT### ADDITIONAL PROCEDURES#lastkey_to_sign:## a...z#if compare["$lastKey" "97"];then set letter = "a"if compare["$lastKey" "98"];then set letter = "b"if compare["$lastKey" "99"];then set letter = "c"if compare["$lastKey" "100"];then set letter = "d"if compare["$lastKey" "101"];then set letter = "e"if compare["$lastKey" "102"];then set letter = "f"if compare["$lastKey" "103"];then set letter = "g"if compare["$lastKey" "104"];then set letter = "h"if compare["$lastKey" "105"];then set letter = "i"if compare["$lastKey" "106"];then set letter = "j"if compare["$lastKey" "107"];then set letter = "k"if compare["$lastKey" "108"];then set letter = "l"if compare["$lastKey" "109"];then set letter = "m"if compare["$lastKey" "110"];then set letter = "n"if compare["$lastKey" "111"];then set letter = "o"if compare["$lastKey" "112"];then set letter = "p"if compare["$lastKey" "113"];then set letter = "q"if compare["$lastKey" "114"];then set letter = "r"if compare["$lastKey" "115"];then set letter = "s"if compare["$lastKey" "116"];then set letter = "t"if compare["$lastKey" "117"];then set letter = "u"if compare["$lastKey" "118"];then set letter = "v"if compare["$lastKey" "119"];then set letter = "w"if compare["$lastKey" "120"];then set letter = "x"if compare["$lastKey" "121"];then set letter = "y"if compare["$lastKey" "122"];then set letter = "z"## A...Z#if compare["$lastKey" "65"];then set letter = "A"if compare["$lastKey" "66"];then set letter = "B"if compare["$lastKey" "67"];then set letter = "C"if compare["$lastKey" "68"];then set letter = "D"if compare["$lastKey" "69"];then set letter = "E"if compare["$lastKey" "70"];then set letter = "F"if compare["$lastKey" "71"];then set letter = "G"if compare["$lastKey" "72"];then set letter = "H"if compare["$lastKey" "73"];then set letter = "I"if compare["$lastKey" "74"];then set letter = "J"if compare["$lastKey" "75"];then set letter = "K"if compare["$lastKey" "76"];then set letter = "L"if compare["$lastKey" "77"];then set letter = "M"if compare["$lastKey" "78"];then set letter = "N"if compare["$lastKey" "79"];then set letter = "O"if compare["$lastKey" "80"];then set letter = "P"if compare["$lastKey" "81"];then set letter = "Q"if compare["$lastKey" "82"];then set letter = "R"if compare["$lastKey" "83"];then set letter = "S"if compare["$lastKey" "84"];then set letter = "T"if compare["$lastKey" "85"];then set letter = "U"if compare["$lastKey" "86"];then set letter = "V"if compare["$lastKey" "87"];then set letter = "W"if compare["$lastKey" "88"];then set letter = "X"if compare["$lastKey" "89"];then set letter = "Y"if compare["$lastKey" "90"];then set letter = "Z"## 0...9#if compare["$lastKey" "48"];then set letter = "0"if compare["$lastKey" "49"];then set letter = "1"if compare["$lastKey" "50"];then set letter = "2"if compare["$lastKey" "51"];then set letter = "3"if compare["$lastKey" "52"];then set letter = "4"if compare["$lastKey" "53"];then set letter = "5"if compare["$lastKey" "54"];then set letter = "6"if compare["$lastKey" "55"];then set letter = "7"if compare["$lastKey" "56"];then set letter = "8"if compare["$lastKey" "57"];then set letter = "9"## other characters#if compare["$lastKey" "96"];then set letter = "`"if compare["$lastKey" "126"];then set letter = "~"if compare["$lastKey" "33"];then set letter = "!"if compare["$lastKey" "64"];then set letter = "@"if compare["$lastKey" "35"];then set letter = "$#"if compare["$lastKey" "36"];then set letter = "$$"if compare["$lastKey" "37"];then set letter = "%"if compare["$lastKey" "94"];then set letter = "^"if compare["$lastKey" "38"];then set letter = "&"if compare["$lastKey" "42"];then set letter = "*"if compare["$lastKey" "40"];then set letter = "("if compare["$lastKey" "41"];then set letter = ")"if compare["$lastKey" "45"];then set letter = "-"if compare["$lastKey" "95"];then set letter = "_"if compare["$lastKey" "61"];then set letter = "+"if compare["$lastKey" "43"];then set letter = "="if compare["$lastKey" "91"];then set letter = "["if compare["$lastKey" "123"];then set letter = "{"if compare["$lastKey" "125"];then set letter = "}"if compare["$lastKey" "124"];then set letter = "|"if compare["$lastKey" "59"];then set letter = "$;"if compare["$lastKey" "58"];then set letter = ":"if compare["$lastKey" "39"];then set letter = "'"if compare["$lastKey" "44"];then set letter = ","if compare["$lastKey" "46"];then set letter = "."if compare["$lastKey" "60"];then set letter = "<"if compare["$lastKey" "62"];then set letter = ">"if compare["$lastKey" "47"];then set letter = "/"if compare["$lastKey" "63"];then set letter = "?"returnother_keys_to_sign:if compare["$lastKey" "15104"];then set letter = "F1"if compare["$lastKey" "15360"];then set letter = "F2"if compare["$lastKey" "15616"];then set letter = "F3"if compare["$lastKey" "15872"];then set letter = "F4"if compare["$lastKey" "16128"];then set letter = "F5"if compare["$lastKey" "16384"];then set letter = "F6"if compare["$lastKey" "16640"];then set letter = "F7"if compare["$lastKey" "16896"];then set letter = "F8"if compare["$lastKey" "17152"];then set letter = "F9"if compare["$lastKey" "17408"];then set letter = "F10"if compare["$lastKey" "34048"];then set letter = "F11"if compare["$lastKey" "34304"];then set letter = "F12"if compare["$lastKey" "32"];then set letter = "space bar"if compare["$lastKey" "8"];then set letter = "backspace"if compare["$lastKey" "9"];then set letter = "tab"if compare["$lastKey" "13"];then set letter = "enter"if compare["$lastKey" "20992"];then set letter = "insert"if compare["$lastKey" "21248"];then set letter = "delete"if compare["$lastKey" "18176"];then set letter = "home"if compare["$lastKey" "20224"];then set letter = "end"if compare["$lastKey" "18688"];then set letter = "page up"if compare["$lastKey" "20736"];then set letter = "page down"if compare["$lastKey" "18432"];then set letter = "up arrow"if compare["$lastKey" "20480"];then set letter = "down arrow"if compare["$lastKey" "19200"];then set letter = "left arrow"if compare["$lastKey" "19712"];then set letter = "right arrow"return## EOF#Any ideas on how I can get this working with set password???? I plan on hiding the files from prying eyes (at least I hope to - LOL)Thanks in advance.........JohnSteven Link to comment Share on other sites More sharing options...
JohnSteven Posted December 2, 2004 Author Share Posted December 2, 2004 Any ideas on how this can be implemented??I've done a search and couldn't find anything in plain English...ThanksJohnSteven Link to comment Share on other sites More sharing options...
htc Posted December 3, 2004 Share Posted December 3, 2004 please post it in cdshell forum, not here. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now