forked from thesp/hping
/
pirate.php
76 lines (76 loc) · 1.91 KB
/
pirate.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
<?php
/*
* /index.php
* Author: Thesp
* Version: 0.X.X
*/
if(!isset($_GET['server'])) {
$_GET['server'] = "";
}
if(!isset($_GET['s'])) {
$_GET['s'] = $_GET['server'];
}
require_once "ping.php";
?>
<!DOCTYPE html>
<html>
<head>
<title>hping - <?php if($_GET['server'] == '') { echo 'Home'; } else { echo $_GET['server']; } ?></title>
<link rel="stylesheet" type="text/css" href="./styles.css" />
<script type="text/javascript">
function cDI(d) {
if(d.cleared) {
return;
}
d.cleared = true;
d.value = '';
d.style.color = '#000000';
}
</script>
</head>
<body>
<ul>
<li class="left">
<a href="."><h1>hping</h1></a>
</li>
<!--li>
<a class="s" href=".?s=4">FEATURES</a>
</li-->
<li class="right">
<form action="" method="get" class="right">
<input type="text" name="server" id="domain_input" value="ismysiteonline.com" onclick="cDI(this);" />
<input type="submit" style="display:none;" />
</form>
</li>
</ul>
<?php
$hping = new Hping;
$r = $hping->newPing($_GET['s']);
$server = $_GET['s'];
switch ($r) {
case -1:
echo ("<div class='main'><p class='status'>This be no Man-O-War!</p></div>");
break;
/*case 1:
* echo ("<div class='main'><p class='status'>Thar <a href='http://$server/'>she</a> blows!</p></div>");
*/break;
case -2:
echo ("<div class='main'><p class='status'>Shiver me timbers! Swab that Poop deck!</p></div>");
break;
case -3:
echo ("<div class='miss' id='a'><img src='hping.png'><p>Yer Crow's nest in Davy Jones's Locker!</p></div>");
break;
default:
$r = round($r);
echo ("<div class='main'><p class='status'>Thar <a href='http://$server/'>she</a> blows! $r clicks north!</p></div>");
break;
}
?>
<!--hr />
<div class="left">
<p>Site/Design by Thesp<br />Logo by dansup</p>
<div class="right">
<p></p>
</div-->
</body>
</html>