john pfeiffer
  • Home
  • Categories
  • Tags
  • Archives

Php execute linux script with arguments passthru escapeshellarg

php-execute-linux-script-with-arguments-passthru-escapeshellarg

$dir = "/home"; passthru('ls ' . escapeshellarg($dir));

don't forget you can also sanitize php input using:

stripslashes( $_POST['name'] );

htmlspecialchars()

mysql_real_escape_string();

!preg_match //regular expression!


  • « Regular expressions tutorial
  • Linux vsftpd with apache authentication ftp server »

Published

Feb 6, 2010

Category

linux

~21 words

Tags

  • arguments 4
  • escapeshellarg 1
  • execute 3
  • linux 249
  • passthru 1
  • php 82
  • script 19
  • with 29