-
Notifications
You must be signed in to change notification settings - Fork 3
/
vnc.php
executable file
·81 lines (71 loc) · 2.79 KB
/
vnc.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Threehunt</title>
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css' />
<link href="assets/def.css" rel="stylesheet" />
<script type="text/javascript" src="assets/jquery.min.js"></script>
</head>
<body class="site siteparent">
<?php
$url = "http://" . $_SERVER['HTTP_HOST'] . "/keyhole/";
if (isset($_GET["id"]) && !empty($_GET["id"])){
$id = $_GET["id"];
} else {
$id = 1;
}
$vnc_url = $url . "/api/vnc/read_one.php?id=" . $id;
$contents = file_get_contents($vnc_url);
$vnc = json_decode($contents);
$ip = $vnc->ip;
$mime = $vnc->mime;
$image_data = $vnc->image_data;
$org = $vnc->org;
$city = $vnc->city;
$timestamp = $vnc->timestamp;
$formattedDate = date( "Y/m/d", strtotime($timestamp));
if($id == 1){
$prev = $id;
$next = $id + 1;
} else {
$prev = $id - 1;
$next = $id + 1;
}
?>
<div style="padding: 20px" id="tooppbar">
<table width="100%">
<tr>
<td align="left" valign="top" width="10%" nowrap="nowrap"><a href="<?php echo $url; ?>vnc.php?id=<?php echo $prev;?>"
class="button">Previous KeyHole</a></td>
<td align="center" valign="top">
<a href="<?php echo $url; ?>vnc.php?id=<?php echo rand(1,200);?>" class="button">Random KeyHole</a>
</td>
<td align="right" valign="top" width="10%" nowrap="nowrap"><a href="<?php echo $url; ?>vnc.php?id=<?php echo $next; ?>"
class="button">Next KeyHole</a>
</td>
</tr>
<tr>
<td align="left" valign="top" width="10%" nowrap="nowrap">
<p>IP: <?php echo $ip;?></p>
<p>Protocol: VNC</p>
<p>Org: <?php echo $org; ?></p>
<p>City: <?php echo $city; ?></p>
<p>Timestamp: <?php echo $formattedDate; ?></p>
</td>
<td align="center" valign="top">
<p style="margin: 10px;font-weight: bold;font-size: 18px;">Keyhole IP <?php echo $ip;?></p>
<a href="<?php echo $url; ?>rdp.php" class="button">RDP</a>
<a href="<?php echo $url; ?>vnc.php" class="button">VNC</a>
</td>
</tr>
</table>
</div>
<div style="text-align: center;margin: 30px;">
<?php echo '<img src="data:' .$mime.';base64,'.$image_data.'"/>' ?>;
</div>
<div style="margin: 50px"></div>
</body>
</html>