forked from BlackPeter13/Armor-explorer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
38 lines (36 loc) · 970 Bytes
/
index.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
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; Charset=UTF-8">
<title>Explorer</title>
</head>
<body>
<a href="<?php echo $_SERVER ['PHP_SELF']; ?>">Explorer</a>
<form action="" method="GET">
<input type="TEXT" name="search" value="input height or block hash or tx hash" size="50" onfocus="this.value=''"/>
<input type="submit" value="go"/>
</form>
<hr>
<?php
//print_r($_GET); echo"<br>";
//if ((isset($_GET['str'])) && ($_GET['str']!=''))
if (empty($_GET)==false)
{
reset($_GET);
$param1=key($_GET);
$param2=current($_GET);
// echo current($_GET);
$command = escapeshellcmd(dirname(__FILE__)."/rpc_request.py $param1 $param2");
// $command = escapeshellcmd(dirname(__FILE__)."/rpc_request.py raw_block ".$_GET['str']."");
// echo $command;
$res = shell_exec($command);
echo $res;
}
else
{
$command = escapeshellcmd(dirname(__FILE__)."/rpc_request.py");
$res = shell_exec($command);
echo $res;
}
?>
</body>
</html>