non stupid way to run exe files from browserby mennonite (no login)
make a folder with an ABSOLUTE PATH (ok, all folders have absolute paths, but don't call it as "abpath" or "..\abpath" make it "c:\somethin\abpath" and use that.
you may want to run ANY EXE THERE IS from your browser. get over this want. terrible idea.
now put any exe files you want to run in the abpath folder.
now create text file. doesn't matter what is in it, as long as the file name ends in .REX (for run exe. for added security, call it something no one else knows.)
copy notepad.exe to your ABPATH folder, only call it "runrex.exe" or something similar. now from explorer, OPEN your file called somethin.REX or whatever. windows doesn't know what a .REX file is so a dialog will come up asking how to run a .REX file. tell it to open all rex files with C:\somethin\abpath\runrex.exe" nevermind that this is really notepad. it's alright.
now windows knows EVERYTHING it needs to know. when you click on a link to open a .REX file from your browser, it will open the file in c:\somethin\abpath\runrex.exe.
so all you have to do is create a basic program, compile the basic program as runrex, and put it in the same folder.
here is what you want your basic program (which will be compiled into runrex.exe) to do:
1. ignore the file contents.
only have it use the information in the filename. empty .REX files and .REX files with contents... only the name matters.
2. refuse to run any exe file that is not in your ABSOLUTE PATH.
if the file exists in c:\somethin\abpath\ then it's valid. otherwise it isnt ;)
3. don't accept switches.
put them in runrex program or have it load the switches from an ini file for runrex.
4. the filename of the .REX file only tells it which exe to run.
these are preset in the basic program, or they are loaded from your ini file.
<a href="edit.rex">run dos editor</a>
click on that and it opens edit.rex in runrex.
runrex chops off the ".rex" and looks in c:\somethin\abpath for edit.exe
if there is an edit.exe there, it runs it.
now ANYONE can make a website that automatically runs edit.exe
but so what? you know that won't hurt anything. you can close the browser and it will stop opening edit.exe.
you can even make runrex so it can only run n copies of edit.exe at once. this is much harder, but someday might be worth it.
5. use as many of these ideas as you can.
each one makes your idea a little more safe than the original. if you come up with more let me know.
|Response Title||Author and Date|
|one more solution||'lipse on Mar 14|
|yeah that's what iki does. if you dont care about browsers check it out.||mennonite on Mar 14|
|Re: non stupid way to run exe files from browser||on Mar 15|
|okay. regardless, here are some answers.||mennonite on Mar 15|