<?php
$passwd = 'censored';
$username = 'archive.zip';
if (isset ($_POST['password'])) {
if ($_POST['password'] == $passwd) {
if (isset ($_POST['username'])) { $username = escapeshellarg ($_POST['username']); }
echo "<pre>";
echo shell_exec ("sh sync.sh {$username} {$passwd}");
echo "</pre>";
}
else {
outputPage ("Your password didn't check out, mon. Better try it again, eh?");
}
}
else { outputPage(); }
function outputPage ($errorMessage = '') {
echo <<<HTML
<html><head><title>Mail Sync</title>
<style type="text/css">
td.left { text-align: right; }
td.right { text-align: left; }
div { color: red; border: 1px solid gray; padding: 4px; }
</style>
</head>
<body>
HTML;
if (!empty ($errorMessage)) { echo "\n<div>$errorMessage</div>\n"; }
echo <<<HTMLL
<h1>Mail Sync</h1>
<form name="zipform" method="post" action="unzipper.php">
<table>
<tr>
<td class="left">Username:</td>
<td class="right"><input type="text" name="username" size="50" maxlength="255" />@mcsmortgage.com</td>
</tr><tr>
<td class="left">Password:</td>
<td class="right"><input type="password" name="password" size="15" maxlength="30" /></td>
</tr><tr>
<td class="right"><input type="reset" value="Reset" /></td>
<td class="left"><input type="submit" value="Sync Mail!" /></td>
</tr>
</table>
</form>
</body>
</html>
HTMLL;
}
?>
- Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
- <html><head><title>Mail Sync</title>
<style type="text/css">
td.left { text-align: right; }
td.right { text-align: left; }
div { color: red; border: 1px solid gray; padding: 4px; }
</style>
</head>
<body> <h1>Mail Sync</h1>
<form name="zipform" method="post" action="unzipper.php">
<table>
<tr>
<td class="left">Username:</td>
<td class="right"><input type="text" name="username" size="50" maxlength="255" />@mcsmortgage.com</td>
</tr><tr>
<td class="left">Password:</td>
<td class="right"><input type="password" name="password" size="15" maxlength="30" /></td>
</tr><tr>
<td class="right"><input type="reset" value="Reset" /></td>
<td class="left"><input type="submit" value="Sync Mail!" /></td>
</tr>
</table>
</form>
</body>
</html>
preferences:
248 ms | 408 KiB | 459 Q