13.08.2012 Views

ACTIONSCRIPT 3 Developer’s Guide en

ACTIONSCRIPT 3 Developer’s Guide en

ACTIONSCRIPT 3 Developer’s Guide en

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>ACTIONSCRIPT</strong> 3.0 DEVELOPER’S GUIDE<br />

Communicating with native processes in AIR<br />

However, validating input can be difficult. To avoid such difficulties, it is best to write a native application (such as an<br />

EXE file on Windows) that has specific APIs. These APIs should process only those commands defined by the<br />

application. For example, the application may accept only a limited set of instructions via the standard input stream.<br />

AIR on Windows does not allow you to run .bat files directly. The command interpreter application (cmd.exe)<br />

executes Windows .bat files. Wh<strong>en</strong> you invoke a .bat file, this command application can interpret argum<strong>en</strong>ts passed to<br />

the command as additional applications to launch. A malicious injection of extra characters in the argum<strong>en</strong>t string<br />

could cause cmd.exe to execute a harmful or insecure application. For example, without proper data validation, your<br />

AIR application may call myBat.bat myArgum<strong>en</strong>ts c:/evil.exe. The command application would launch the<br />

evil.exe application in addition to running your batch file.<br />

Last updated 6/6/2012<br />

840

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!