#!/bin/sh#copyright (C) .Texas Instruments incorporated-http://www.ti.com/# # # redistribution and useinchsource and binary forms, with or without # modification, is permitted provided that the following conditions # is M et:## redistributions of source code must retain the above copyright # Notice, Thislist of conditions and the following disclaimer.## redistributionsinchbinary form must reproduce the above copyright# notice, ThisList of conditions and the following disclaimerinchThe # documentation and/or other materials provided with the # distribution.## neither the name of Texas Instruments Incorporated nor the NA Mes of# Its contributors is used to endorse or promote products derived# from Thissoftware without specific prior written permission.# # This software was provided by the COPYRIGHT holders and CONTRIB Utors #" as is"and any EXPRESS OR implied warranties, including, but not # LIMITED to, the implied warranties of merchantability and FITNESS for# A particular PURPOSE is disclaimed. In NO EVENT shall the COPYRIGHT # OWNER OR CONTRIBUTORS is liable for any DIRECT, INDIRECT, incidental, # Special, Exempla RY, or consequential damages (including, but no # LIMITED to, procurement of substitute GOODS OR SERVICES; LOSS of use,# DATA, OR profits; or business interruption) however caused and on any# theory of liability, WHETHER in contract, STRICT liability, OR TORT # (including negligence OR OTHERWISE) Arising in any-the-software, even IF advised of the possibility of SUCH Damage.mkdir-P TMP # create TMP directory mkdir-PLock# Create lock Directory I=0 forIteminch "[email protected]"# Iterate passed in Parameters Do if[$i-eq0] then filename=$item # Get file name fiif[$i-eq1] then OutputFileName=$item # Gets the output file name fiif[$i-GT1] then touch"lock/"$item # Create a lock file, which seems to be a randomly generated numeric string fi i= ' Expr $i +1' # i++Doneecho"Filename:"$filenameecho"Output:"$outputfilename #1. Execute the program, the program will be stuck here?The following is the run_script.php run Program: # $script _link= $found _app["Exec"];# # Strval (): Used to get the string value corresponding to the variable # # rand (): Returns a random integer # $random _string=Strval (rand ()); # $random _string.=Strval (rand ()); # # addslashes (): Adds a backslash before the specified predefined character # $script _command="./execute_command.sh \ "". Addslashes ($script _link)."\" ". $random _string.". txt". $lock _list;# # Get system execution result last line # # system () second parameter: If the Return_var parameter is provided, then the # return status of the external command after execution will be set to this variable # $last _line= System ($script _command.">/dev/null 2>/dev/null &", $retval);2for QT applications, the individual feels that the eval is still blocked $filename>"tmp/"$outputfilename2>&1#Using a more uniquestringTo detectifThe script iscompleted# This line of text redirects to the output file at the end of TMP Echo"_?!! Matrix_script_completed!!? _">>"tmp/"$outputfilename # Clear the screen and find no command refresh_screen&I=0 forIteminch "[email protected]" Do if[$i-GT1] then RM-F"lock/"$item # Delete the file under lock fi i= ' Expr $i +1' # i++Donesleep -RM"tmp/"$outputfilename # Delete files under TMP
Texas Instruments matrix-gui-2.0 Hacking--execute_command.sh