1 |
5b237745
|
Scott Ullrich
|
<?php
|
2 |
b46bfcf5
|
Bill Marquette
|
/* $Id$ */
|
3 |
5b237745
|
Scott Ullrich
|
/*
|
4 |
|
|
exec_raw.php
|
5 |
|
|
part of m0n0wall (http://m0n0.ch/wall)
|
6 |
|
|
|
7 |
|
|
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
|
8 |
|
|
All rights reserved.
|
9 |
|
|
|
10 |
|
|
Redistribution and use in source and binary forms, with or without
|
11 |
|
|
modification, are permitted provided that the following conditions are met:
|
12 |
|
|
|
13 |
|
|
1. Redistributions of source code must retain the above copyright notice,
|
14 |
|
|
this list of conditions and the following disclaimer.
|
15 |
|
|
|
16 |
|
|
2. Redistributions in binary form must reproduce the above copyright
|
17 |
|
|
notice, this list of conditions and the following disclaimer in the
|
18 |
|
|
documentation and/or other materials provided with the distribution.
|
19 |
|
|
|
20 |
|
|
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
21 |
|
|
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
22 |
|
|
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
23 |
|
|
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
|
24 |
|
|
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
25 |
|
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
26 |
|
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
27 |
|
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
28 |
|
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
29 |
|
|
POSSIBILITY OF SUCH DAMAGE.
|
30 |
|
|
*/
|
31 |
7ac5a4cb
|
Scott Ullrich
|
/*
|
32 |
|
|
pfSense_MODULE: shell
|
33 |
|
|
*/
|
34 |
5b237745
|
Scott Ullrich
|
|
35 |
6b07c15a
|
Matthew Grooms
|
##|+PRIV
|
36 |
|
|
##|*IDENT=page-hidden-execraw
|
37 |
|
|
##|*NAME=Hidden: Exec Raw page
|
38 |
|
|
##|*DESCR=Allow access to the 'Hidden: Exec Raw' page.
|
39 |
|
|
##|*MATCH=exec_raw.php*
|
40 |
|
|
##|-PRIV
|
41 |
|
|
|
42 |
5b237745
|
Scott Ullrich
|
header("Content-Type: text/plain");
|
43 |
f977ac60
|
Bill Marquette
|
include("guiconfig.inc");
|
44 |
5b237745
|
Scott Ullrich
|
|
45 |
|
|
putenv("PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin");
|
46 |
83ce9052
|
Scott Ullrich
|
if($_REQUEST['cmd'] == "") {
|
47 |
28dd1a3e
|
Carlos Eduardo Ramos
|
echo gettext("Nothing specified. Cannot continue.");
|
48 |
b442f218
|
Scott Ullrich
|
exit;
|
49 |
|
|
}
|
50 |
83ce9052
|
Scott Ullrich
|
passthru($_REQUEST['cmd']);
|
51 |
5b237745
|
Scott Ullrich
|
|
52 |
|
|
exit(0);
|
53 |
b46bfcf5
|
Bill Marquette
|
?>
|