Executing files while in-game
by Adib Murad · in Torque Game Engine · 01/23/2004 (10:32 am) · 7 replies
Ok, I searched for "executable", "program" and "external" in the forums and didn't find what I need.
I need to call an external program or URL from inside a mission. Let's say my character is walking around and then find a sign. If he "shoots" the sign (actually point and click), an URL is called or a Windows EXE file is executed.
Is it possible in Torque? Can you people figure a clean way to do it?
Thanks!
I need to call an external program or URL from inside a mission. Let's say my character is walking around and then find a sign. If he "shoots" the sign (actually point and click), an URL is called or a Windows EXE file is executed.
Is it possible in Torque? Can you people figure a clean way to do it?
Thanks!
#2
01/23/2004 (10:41 am)
You can open a web browser with a URL: gotoWebPage(URL); Look at the source on how this is done if you want to implent the capability to run another executable.
#3
01/23/2004 (11:13 am)
Thanks a lot guys. I'll give it a try.
#4
01/23/2004 (2:08 pm)
Yeah it would be trivial to make a script command for this if you need one. I would consider it a security issue though, so I wouldn't do it unless it was absolutely researched first.
#5
01/23/2004 (3:36 pm)
John, what so you mean by "security issue" here? How am I insecure?
#6
TorqueScript lives in a tightly sealed sandbox, what you want to do would basically be smashing that sandbox open with a sledgehammer.
NOTE: This is only in reference to the ability to call a .exe from script. The ability to call a URL is a different fish as that transfers your command from the TorqueScript Sandbox over to the default browser sandbox
01/23/2004 (3:41 pm)
If you allow the scripts to make a system call to an arbitrary .exe file, you have basically given anyone with half a brain the ability to trash a computer, or to even download and install backdoor programs.TorqueScript lives in a tightly sealed sandbox, what you want to do would basically be smashing that sandbox open with a sledgehammer.
NOTE: This is only in reference to the ability to call a .exe from script. The ability to call a URL is a different fish as that transfers your command from the TorqueScript Sandbox over to the default browser sandbox
#7
If you need, absolutely need, the ability to execute files then you need to put some security over it. Although to be honest i'm not sure how much you can do to secure it.
01/23/2004 (6:45 pm)
IMHO an URL is just as dangerous. It can still be exploited to execute files if you know what you're doing.If you need, absolutely need, the ability to execute files then you need to put some security over it. Although to be honest i'm not sure how much you can do to secure it.
Torque Owner Thijs Sloesen
Scattered Studio