summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/exec.php
diff options
context:
space:
mode:
authorJared Dillard <jdillard@netgate.com>2015-11-30 11:33:47 -0600
committerJared Dillard <jdillard@netgate.com>2015-11-30 11:37:00 -0600
commit7b91ab09a7f40c756c132dbb2467b3c3e4744c62 (patch)
treefcfc87b2cc085c2e363f85e4354032ab7d1255c1 /src/usr/local/www/exec.php
parent424213ea26ea300eee05254884a383b36ffe69c5 (diff)
downloadpfsense-7b91ab09a7f40c756c132dbb2467b3c3e4744c62.zip
pfsense-7b91ab09a7f40c756c132dbb2467b3c3e4744c62.tar.gz
clean up command prompt page
Diffstat (limited to 'src/usr/local/www/exec.php')
-rw-r--r--src/usr/local/www/exec.php51
1 files changed, 30 insertions, 21 deletions
diff --git a/src/usr/local/www/exec.php b/src/usr/local/www/exec.php
index f9b8f28..3205da3 100644
--- a/src/usr/local/www/exec.php
+++ b/src/usr/local/www/exec.php
@@ -228,7 +228,8 @@ if (!isBlank($_POST['txtCommand'])):?>
<div class="panel panel-success responsive">
<div class="panel-heading"><h2 class="panel-title">Shell Output - <?=htmlspecialchars($_POST['txtCommand'])?></h2></div>
<div class="panel-body">
- <pre>
+ <div class="content">
+ <pre>
<?php
putenv("PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin");
putenv("SCRIPT_FILENAME=" . strtok($_POST['txtCommand'], " "));
@@ -236,8 +237,9 @@ if (!isBlank($_POST['txtCommand'])):?>
exec($_POST['txtCommand'] . ' 2>&1', $output);
foreach($output as $line)
print(htmlspecialchars($line) . "\r\n");
-?></pre>
-
+?>
+ </pre>
+ </div>
</div>
</div>
<? endif ?>
@@ -246,22 +248,26 @@ if (!isBlank($_POST['txtCommand'])):?>
<div class="panel panel-default">
<div class="panel-heading"><h2 class="panel-title"><?=gettext('Execute Shell Command')?></h2></div>
<div class="panel-body">
- <input id="txtCommand" name="txtCommand" placeholder="Command" type="text" class="col-sm-4" value="<?=htmlspecialchars($_POST['txtCommand'])?>" />
- <br /><br />
- <input type="hidden" name="txtRecallBuffer" value="<?=htmlspecialchars($_POST['txtRecallBuffer']) ?>" />
- <input type="button" class="btn btn-default btn-sm" name="btnRecallPrev" value="<" onclick="btnRecall_onClick( this.form, -1 );" />
- <button type="submit" class="btn btn-default btn-sm" value="EXEC"><?=gettext("Execute"); ?></button>
- <input type="button" class="btn btn-default btn-sm" name="btnRecallNext" value=">" onclick="btnRecall_onClick( this.form, 1 );" />
- <input type="button" class="btn btn-default btn-sm" value="<?=gettext("Clear"); ?>" onclick="return Reset_onClick( this.form );" />
+ <div class="content">
+ <input id="txtCommand" name="txtCommand" placeholder="Command" type="text" class="col-sm-4" value="<?=htmlspecialchars($_POST['txtCommand'])?>" />
+ <br /><br />
+ <input type="hidden" name="txtRecallBuffer" value="<?=htmlspecialchars($_POST['txtRecallBuffer']) ?>" />
+ <input type="button" class="btn btn-default btn-sm" name="btnRecallPrev" value="<" onclick="btnRecall_onClick( this.form, -1 );" />
+ <button type="submit" class="btn btn-default btn-sm" value="EXEC"><?=gettext("Execute"); ?></button>
+ <input type="button" class="btn btn-default btn-sm" name="btnRecallNext" value=">" onclick="btnRecall_onClick( this.form, 1 );" />
+ <input type="button" class="btn btn-default btn-sm" value="<?=gettext("Clear"); ?>" onclick="return Reset_onClick( this.form );" />
+ </div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading"><h2 class="panel-title"><?=gettext('Download file')?></h2></div>
<div class="panel-body">
- <input name="dlPath" type="text" id="dlPath" placeholder="File to download" class="col-sm-4" value="<?php echo htmlspecialchars($_GET['dlPath']) ?>"/>
- <br /><br />
- <button name="submit" type="submit" class="btn btn-default btn-sm" id="download" value="DOWNLOAD"><?=gettext("Download")?></button>
+ <div class="content">
+ <input name="dlPath" type="text" id="dlPath" placeholder="File to download" class="col-sm-4" value="<?php echo htmlspecialchars($_GET['dlPath']) ?>"/>
+ <br /><br />
+ <button name="submit" type="submit" class="btn btn-default btn-sm" id="download" value="DOWNLOAD"><?=gettext("Download")?></button>
+ </div>
</div>
</div>
@@ -272,10 +278,11 @@ if (!isBlank($_POST['txtCommand'])):?>
<div class="panel panel-default">
<div class="panel-heading"><h2 class="panel-title"><?=gettext('Upload file')?></h2></div>
<div class="panel-body">
- <input name="ulfile" type="file" class="btn btn-default btn-sm btn-file" id="ulfile" />
- <br />
- <button name="submit" type="submit" class="btn btn-default btn-sm pull-left" id="upload" value="UPLOAD"><?=gettext("Upload")?></button>
-
+ <div class="content">
+ <input name="ulfile" type="file" class="btn btn-default btn-sm btn-file" id="ulfile" />
+ <br />
+ <button name="submit" type="submit" class="btn btn-default btn-sm" id="upload" value="UPLOAD"><?=gettext("Upload")?></button>
+ </div>
</div>
</div>
<?php
@@ -319,10 +326,12 @@ if (!isBlank($_POST['txtCommand'])):?>
<div class="panel panel-default responsive">
<div class="panel-heading"><h2 class="panel-title"><?=gettext('Execute PHP Commands')?></h2></div>
<div class="panel-body">
- <textarea id="txtPHPCommand" placeholder="Command" name="txtPHPCommand" rows="9" cols="80"><?=htmlspecialchars($_POST['txtPHPCommand'])?></textarea>
- <br />
- <input type="submit" class="btn btn-default btn-sm" value="<?=gettext("Execute")?>" />
- <?=gettext("Example"); ?>: <code>print("Hello World!");</code>
+ <div class="content">
+ <textarea id="txtPHPCommand" placeholder="Command" name="txtPHPCommand" rows="9" cols="80"><?=htmlspecialchars($_POST['txtPHPCommand'])?></textarea>
+ <br />
+ <input type="submit" class="btn btn-default btn-sm" value="<?=gettext("Execute")?>" />
+ <?=gettext("Example"); ?>: <code>print("Hello World!");</code>
+ </div>
</div>
</div>
</form>
OpenPOWER on IntegriCloud