Python: tests to show modeling is very syntactical

This commit is contained in:
Rasmus Wriedt Larsen
2020-09-28 11:23:06 +02:00
parent 3af5c720cc
commit 6cb2ca63a6

View File

@@ -111,6 +111,19 @@ if UNKNOWN:
os.spawnl(os.P_WAIT, "/bin/sh", "<progname>", "-c", "vuln") # $SystemCommandExecution_getCommand="/bin/sh" $f-:SystemCommandExecution_getCommand="vuln"
########################################
# Passing arguments by reference
args = ["/bin/sh", "-c", "vuln"]
subprocess.Popen(args) # $SystemCommandExecution_getCommand=args
args = "<progname>"
use_shell = False
exe = "executable"
subprocess.Popen(args, shell=use_shell, executable=exe) # $f+:SystemCommandExecution_getCommand=args $SystemCommandExecution_getCommand=exe
################################################################################
# Taint related