forked from foss-aueb/network-tools
-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.php
79 lines (79 loc) · 2.78 KB
/
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
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
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="el" xml:lang="el">
<head>
<META AUTHOR="Periklis Ntanasis a.k.a. Master_ex">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<meta name="keywords" content="traceroute ping nslookup foss aueb" />
<meta name="description" content="free online network tools by foss.aueb" />
<meta name="distribution" content="global" />
<title>foss.aueb.gr • Network Tools</title>
<link rel="icon" href="images/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="http://foss.aueb.gr/forum/images/favicon.ico" type="image/x-icon" />
</head>
<center><a href="http://foss.aueb.gr/" target="_blank"><img style="border-style: none" align="left" src="http://foss.aueb.gr/forum/styles/maxthon/imageset/penguin_logo-shadowed.png" /></a><font size=6><b>FOSS AUEB - Network Tools</b></font></center>
<h5> Κοινότητα Ελεύθερου Λογισμικού και Λογισμικού Ανοιχτού Κώδικα Οικονομικού Πανεπιστημίου Αθηνών<br/>Free and Open Source Software Community of Athens University of Economics and Business</h5>
</br>
<body>
<form name="input" action="index.php" method="get">
<select name="servise">
<option value="traceroute">traceroute</option>
<option value="ping">ping</option>
<option value="nslookup">nslookup</option>
</select>
IP ADDRESS:
<input type="text" name="address" />
<input type="submit" name ="submit" value="Submit" />
</form>
<font size=1>IPv4 address examle : www.google.com or google.com or 209.85.129.99 - don't use 'http://' prefix </font>
<hr>
<?php
if(isset($_GET['submit']))
{
$servise = trim($_GET['servise']);
$address = trim($_GET['address']);
if(
(strpos($address,';')>0)
|| (strpos($address,'|')>0)
|| (strpos($address,'\\')>0)
|| (strpos($address,'/')>0)
|| (strpos($address,'>')>0)
|| (strpos($address,'<')>0)
|| (strpos($address,'|')===0)
|| (strpos($address,';')===0)
|| (strpos($address,'\\')===0)
|| (strpos($address,'/')===0)
|| (strpos($address,'>')===0)
|| (strpos($address,'<')===0) )
{
echo "Don't be naughty!";
exit();
}
if($servise=="ping")
{
exec("ping ".$address." -c 4",$results);
}
if($servise=="traceroute")
{
exec("traceroute ".$address,$results);
}
if($servise=="nslookup")
{
exec("nslookup ".$address,$results);
}
foreach($results as $result)
{
echo $result;
echo "</br>";
}
if($results == null)
{
echo "Address format error or address doesn't exist";
}
echo "<hr>";
}
?>
<center>
<? readfile("../services.html"); ?><br/>
<span style="font-family: sans-serif; text-decoration: none; font-size: 10px;">Powered by <a href="http://foss.aueb.gr">foss.aueb.gr</a> <(' )</span><br/>
</center>
</body>
</html>