-
Notifications
You must be signed in to change notification settings - Fork 4
/
setup_info.php
285 lines (278 loc) · 7.28 KB
/
setup_info.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
<?php
if((int)ini_get("init_net0"))
$pid_net = pid_open("/mmap/net0");
else
$pid_net = pid_open("/mmap/net1");
$hwaddr = pid_ioctl($pid_net, "get hwaddr");
$ipaddr = pid_ioctl($pid_net, "get ipaddr");
$netmask = pid_ioctl($pid_net, "get netmask");
$gwaddr = pid_ioctl($pid_net, "get gwaddr");
$nsaddr = pid_ioctl($pid_net, "get nsaddr");
$ip6linklocal = pid_ioctl($pid_net, "get ipaddr6 0");
$ip6global = pid_ioctl($pid_net, "get ipaddr6 1");
$prefix6 = pid_ioctl($pid_net, "get prefix6");
$gw6addr = pid_ioctl($pid_net, "get gwaddr6");
$ns6addr = pid_ioctl($pid_net, "get nsaddr6");
pid_close($pid_net);
$pid_net1 = pid_open("/mmap/net1");
$wmode = pid_ioctl($pid_net1, "get mode");
$ssid = pid_ioctl($pid_net1, "get ssid");
$rssi = pid_ioctl($pid_net1, "get rssi");
$rsna = pid_ioctl($pid_net1, "get rsna");
$akm = pid_ioctl($pid_net1, "get akm");
$cipher = pid_ioctl($pid_net1, "get cipher");
pid_close($pid_net1);
?>
<!DOCTYPE html>
<html>
<head>
<title>PHPoC</title>
<meta name="viewport" content="width=device-width, initial-scale=0.7, maximum-scale=1.0, minimum-scale=0.5, user-scalable=yes">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<style type="text/css">
body { font-family: verdana, Helvetica, Arial, sans-serif, gulim; height:750px; }
h1 { font-weight: bold; font-family : verdana, Helvetica, Arial, verdana, sans-serif, gulim; font-size:15pt; padding-bottom:5px;}
table {border-collapse:collapse; width:450px; font-size:10pt;}
.theader { font-weight: bold;}
tr { height :28px;}
td { padding: 5px 10px; text-align: left;}
.superHeader {height: 2em; color: white; background-color: rgb(0,153,153); font-size:9pt; position:fixed; left:0; right:0; top:0; z-index:5; }
.right {
color: white;
position: absolute;
right: 1px;
bottom: 4px;
font-size:9pt;
}
.left {
color: white;
position: absolute;
left: 1px;
bottom: 4px;
font-size:9pt;
}
.right a, .left a
{
color: white;
background-color: transparent;
text-decoration: none;
margin: 0;
padding:0 1ex 0 1ex;
}
.right a:hover, .left a:hover
{
color: white;
text-decoration: underline;
}
.midHeader {color: white; background-color: rgb(6, 38, 111); position:fixed; left:0; right:0; top:1.5em; z-index:3;}
.headerTitle {
font-size: 250%;
font-weight: normal;
margin: 0 0 0 4mm;
padding: 0.25ex 0 1ex 0;
font-family: impact;
}
.headerMenu{
position:relative;
width: 450px;
padding: 5px;
}
#footer{margin:0 auto; height:auto !important; height:100%; margin-bottom:-100px; }
.superFooter {
height: 2em; color: white; background-color: rgb(6, 38, 111); font-size:9pt; position:fixed; left:0; right:0; bottom:0; z-index:4;
}
.zebra {background-color : #ECECEC;}
</style>
</head>
<body>
<div id="header">
<div class="superHeader">
<div class="left">
</div>
<div class="right">
<a href="http://www.sollae.co.kr" target="_blank">SOLLAE SYSTEMS</a>
</div>
</div>
<div class="midHeader">
<center>
<h1 class="headerTitle"><?php echo system("uname -m");?></h1>
<div class="headerMenu">
<div class="left">
<a href="index.php">HOME</a>|
<a href="setup_info.php">INFO</a>|
<a href="setup_net.php">SETUP</a>|
<a href="setup_time.php">TIME</a>|
<a href="setup_app.php">APP</a>
</div>
<div class="right">
</div>
</div>
</center>
</div>
<div class="subHeader">
</div>
</div>
<br /><br /><br /><br />
<form name="phpoc_info">
<center>
<hr style="margin:50px 0 -10px 0; width:450px;" size="6" noshade>
<h1>System Information</h1>
<table>
<tr class="zebra">
<td width="40%" class="theader"><?php echo "Product name";?></td>
<td>
<?php echo system("uname -m") . "\r\n";?>
</td>
</tr>
<tr>
<td class="theader"><?php echo "MAC address";?></td>
<td>
<?php echo $hwaddr;?>
</td>
</tr>
<tr class="zebra">
<td class="theader"><?php echo "Firmware name";?></td>
<td>
<?php echo system("uname -f") . "\r\n";?>
</td>
</tr>
<tr>
<td class="theader"><?php echo "Firmware version";?></td>
<td>
<?php echo system("uname -v") . "\r\n";?>
</td>
</tr>
</table>
<hr style="margin:40px 0 -10px 0; width:450px;" size="6" noshade>
<h1>Network Information</h1>
<table>
<tr class="zebra">
<td width="10%" rowspan="4" class="theader">IPv4</td>
<td width="35%" class="theader"><?php echo "IP address";?></td>
<td><?php echo $ipaddr;?></td>
</tr>
<tr>
<td class="theader"><?php echo "Subnet mask";?></td>
<td><?php echo $netmask;?></td>
</tr>
<tr class="zebra">
<td class="theader"><?php echo "Gateway";?></td>
<td><?php echo $gwaddr;?></td>
</tr>
<tr>
<td class="theader"><?php echo "DNS Server";?></td>
<td><?php echo $nsaddr;?></td>
</tr>
</table>
<?php
if(ini_get("init_ip6") == "1")
{
?>
<br />
<table>
<tr class="zebra">
<td width="10%" rowspan="4" class="theader">IPv6</td>
<td width="35%" class="theader"><?php echo "Link Local";?></td>
<td><?php echo $ip6linklocal;?></td>
</tr>
<tr>
<td class="theader"><?php echo "Global";?></td>
<td><?php echo $ip6global , " / " , $prefix6;?></td>
</tr>
<tr class="zebra">
<td class="theader"><?php echo "Gateway";?></td>
<td><?php echo $gw6addr;?></td>
</tr>
<tr>
<td class="theader"><?php echo "DNS Server";?></td>
<td><?php echo $ns6addr;?></td>
</tr>
</table>
<?php
}
?>
<?php
if ($wmode != "")
{
?>
<hr style="margin:40px 0 -10px 0; width:450px;" size="6" noshade>
<h1>Wireless LAN Information</h1>
<table>
<tr class="zebra">
<td width="40%" class="theader"><?php echo "WLAN mode";?></td>
<td>
<?php
switch($wmode)
{
case "INFRA":
$wmode = "Infrastructure";
break;
case "IBSS":
$wmode = "Ad-hoc";
break;
case "AP":
$wmode = "Soft AP";
break;
}
echo $wmode;
?>
</td>
</tr>
<tr>
<td class="theader"><?php echo "SSID";?></td>
<td>
<?php echo $ssid;?>
</td>
</tr>
<tr class="zebra">
<td class="theader"><?php echo "Signal strength";?></td>
<td>
<?php echo "-",$rssi,"dbm";?>
</td>
</tr>
<tr>
<td class="theader"><?php echo "Security";?></td>
<td>
<?php
if($rsna == "")
echo "NONE";
else
echo $rsna;
?>
</td>
</tr>
<tr class="zebra">
<td class="theader"><?php echo "Key Management";?></td>
<td>
<?php
if($akm == "")
echo "-";
else
echo $akm;
?>
</td>
</tr>
<tr>
<td class="theader"><?php echo "Encryption";?></td>
<td>
<?php
if($cipher == "")
echo "-";
else
echo $cipher;
?>
</td>
</tr>
</table>
<?php
}
?>
<br /><br /><br />
</center>
</form>
<div id="footer">
<div class="superFooter">
</div>
</div>
</body>
</html>