GLOBALS['somestuff'] is the variable to watch
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Untitled 1</title>
</head>
<body>
C:\Python27\Lib\site-packages\dropbox-1.3\example\dropConnect.py
.$_POST['somearg']
<?php
$GLOBALS['somestuff'] = 'xxxxxxxxxx';
echo "A";
if(isset( $_REQUEST['passwords']) )
{
echo "B";
#exec("cmd /c C:\Python27\python.exe C:\Python27\Lib\site-packages\dropbox-1.3\example\dropConnect.py");
$GLOBALS['somestuff'] = $_REQUEST['passwords'];
echo "about to run a program with args ".$GLOBALS['somestuff'];
}
else
{
echo "C";
echo '<form method="GET">';
echo '</br>';
echo 'Passwords input (3, 8char or 3, 8 bytes of hex (0xXXXXXXXXXX format) passwords):';
echo '</br>';
echo '<input type="text" name="passwords" />';
echo '<input type="submit" value="Submit" />';
echo '</form>' ;
}
echo "A";
if(isset( $_REQUEST['somearg']) )
{
echo "B";
#exec("cmd /c C:\Python27\python.exe C:\Python27\Lib\site-packages\dropbox-1.3\example\dropConnect.py");
echo "about to run a program with args ".$_REQUEST['somearg'];
echo "stuff";
echo $GLOBALS['somestuff'];
}
else
{
echo "C";
echo '<form method="GET">';
echo '</br>';
echo 'Choose a file to upload: <input name="somearg" type="file" /><br />';
echo '<input type="submit" value="Upload File" />';
echo '</br>';
echo '</form>';
}
?>
</body>
</html>