apache configuration for simple python run in kali linux through php script -
the problem:
how apache configuration simple python program run in kali linux through php script.
i tried shows blank window. php script:
<?php $co = escapeshellcmd('/root/desktop/python1.py'); $op = shell_exec($co); echo $op; ?>
in var_dump shows null. me..
you want point shell program
<?php $co = escapeshellcmd('/bin/sh /root/desktop/python1.py'); $op = shell_exec($co); echo $op; ?>
or use python self
$co = escapeshellcmd('/usr/bin/python /root/desktop/python1.py');
ps
when know command, escapeshell
redundant, can use shell_exec
directly
<?php $op = shell_exec('/bin/bash /root/desktop/python1.py'); echo $op; ?>
Comments
Post a Comment