orange Posted January 6, 2007 Posted January 6, 2007 So here is what I have done. Using the Universal Hacker U3 program, I have sucessfully loaded an ISO of mine that I thought would be useful to many people out there. The ISO contains two files, one that is the AUTORUN.inf, and the second that is the run_autorun.exe executeable. othe RUN_AUTORUN program searches for removable drives and returns an array of all drives found. Next, it searches on those drives for a file named AUTORUN.inf. Once it finds this file, it searches in it for the "open=" line, then it executes the program following. Summary: By loading this ISO, you can give autorun capability to the Flash Drive partition of the U3 device. This works on ANY windows machine. I am hosting the files at my own site from Case Western Reserve University: ******Code is Updated as of 2/9 ******************* http://schedulerpro.case.edu/Hak5/ The program is written in AutoItv3: #include<file.au3> #compiler_icon=cd.ico #compiler_allow_decompile=n $drive_array = DriveGetDrive("REMOVABLE") while @error = 1 $drive_array = DriveGetDrive("REMOVABLE") sleep (10) WEnd $drive_letter = find_autorun($drive_array) if $drive_letter =0 then sleep(5000) $drive_letter = find_autorun($drive_array) EndIf dim $line_ = '' if FileExists($drive_letter & "autorun.inf") = 0 then $drive_letter =find_autorun($drive_array) for $line = 1 to _FileCountLines($drive_letter & "autorun.inf") if stringinstr(filereadline($drive_letter & "autorun.inf",$line),"open=")<>0 then $line_ = $line ExitLoop EndIf Next if $line_ = '' then Exit $program_path = filereadline($drive_letter & "autorun.inf",$line_) $program_path = stringreplace($program_path,"open=","") $program_path = stringreplace($program_path,'"',"") $program_path = stringreplace($program_path,"'","") if stringinstr($program_path,":") <> 0 Then if FileExists($drive_letter & "" & $program_path)=0 then exit run($drive_letter & "" & $program_path) if @error then Exit Exit EndIf if FileExists($drive_letter & "" & $program_path)=0 then exit run($drive_letter & "" & $program_path) Func find_autorun($drive_array1) $drive_letter1 = 0 for $var = 0 to ubound($drive_array1)-1 if FileExists($drive_array1[$var] & "autorun.inf") then $drive_letter1 = $drive_array1[$var] ExitLoop EndIf Next return $drive_letter1 EndFunc EDIT: Source Code Update Quote
geocine Posted January 9, 2007 Posted January 9, 2007 wow.. that's great but i get errors... on this part $program_path = filereadline($drive_letter & "autorun.inf",$line_) $program_path = stringreplace($program_path,"open=","") Quote
orange Posted January 10, 2007 Author Posted January 10, 2007 EDIT: I'll be damned -- it looks as though I didn't post the MOST recent edition. There is an error... thanks for pointing that out. New files are posted. Quote
tester134 Posted January 12, 2007 Posted January 12, 2007 can you help me get the U3 Launchpad program? The link in the Wiki seems to be down and I don't know where else to look... Thanks. I have a Kingston USB drive by the way. Quote
UnknownPrivelage Posted February 5, 2007 Posted February 5, 2007 I put the LaunchPad.iso into the BIN directory and did nothing else. Than I double clicked the Universal_Customizer.exe. It got to step 5 and said failed to access something ..universal customizer now shutting down. this is the error log... [MUSK] [5644][21:52:31]: CCDServiceImpl::burnImage - failed to open image file C:Documents and SettingsDavid SzetoDesktopUniversal_CustomizerbinU3CUSTOM.ISO wats wrong? edit: just kidding im an idiot..i forgot to rename it U3CUSTOM anyways i do get the same error message as the guy above me...and you said you updated files already ...but it doesnt seem to work.. Quote
UnknownPrivelage Posted February 5, 2007 Posted February 5, 2007 Error message in entirety. Line 0 (File "G:run_autorun.exe"): $program_path = filereadline(&drive_letter& "autorun.inf".$line_) $program_path = filereadline(&drive_letter& "autorun.inf".^ERROR Error: Variable used without being declared I can't fix because I don't know how to edit run_autorun.exe Quote
orange Posted February 6, 2007 Author Posted February 6, 2007 the files that I have on my server are updated. I will have time later to look into this specific problem. Quote
orange Posted February 6, 2007 Author Posted February 6, 2007 ok... files are updated. The error that you encountered should be dealt with. Quote
UnknownPrivelage Posted February 8, 2007 Posted February 8, 2007 New Error: Man, I really hope this works. Concept is so cool..thanks for your time orange! Quote
orange Posted February 8, 2007 Author Posted February 8, 2007 ok, I think I know what is going wrong. I can fix it tonight when I get back to the house. Are there any feature requests for this program? Being that there is some serious intersest in this, I can devote a little more time to it. Let me know what you all want. Quote
orange Posted February 9, 2007 Author Posted February 9, 2007 OK Files are updated. Everything works (famous last words) Also note that if you want to run a file that is on the target computer you can include the full file path ala "C:RunME.exe" or you can just write the standard autorun file: [autorun] open=something.exe Questions? Comments? Quote
UnknownPrivelage Posted February 9, 2007 Posted February 9, 2007 Interesting, this is proving to be much weirder than I thought. Has anyone gotten it to run correctly? I got it on and everything but once I actually put the USB in....here is the error Quote
orange Posted February 9, 2007 Author Posted February 9, 2007 that error means that the program that you are trying to run off of the USB key is not there or is named differently. Keep in mind that the autorun file that is on the USB key has to point to a real file! lol FIles are updated so that if the file does not exist, the program will exit. Quote
orange Posted February 9, 2007 Author Posted February 9, 2007 note that the ISO is an ISO of the other files that are on the server. this might not be clear, I hope that it is. The ISO is there for convenience -- it is ALL that you need to get this program to work. Here is what to do: Load the ISO on your U3 partion write an AUTORUN file (as a valid shortcut) save the autorun.inf to the root directory of the USB thumb drive. the program that you specify on the USB key to run will run on autorun So far, I haven't gotten any of the error that you all are.... Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.