Skip to content
WJunction - Webmaster Forum

[PHP] ProbeMyPorts

Status
Not open for further replies.

Vick

Banned
Banned
297
2011
72
PHP:
 ProbeMyPorts

[CODE]
<?php
error_reporting(0);
/*
* Author    : Vick Kumar
* Website   : www.phpcanyon.net
* Date      : 8/12/2011
* Purpose   : Probe a User Specified Port
*/
$port = $_GET['port'];
if($port=="")
{
echo 'Please enter a Port then press submit!';
}
else
{
$url = "https://www.grc.com/x/portprobe=$port";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch);
curl_close($ch);
if(strpos($result, 'Stealth') !== false)
{
echo "$port is in stealth-mode. There is no existance of this port open on the internet to anyone.";
}
else
echo "$port is open, close it or you can get hacked/ddos'd";
}
?>
<html>
  <head>
  <title>PHP PmP Script</title>
  </head>
  <body>
    <form method="get" action="probemyport.php">
      Enter Port: <input type="text" size="5" name="port" /><input type="submit" value="Submit"/>
    </form>
  </body>
</html>
[/CODE]
 
Status
Not open for further replies.

About the author

V
Banned · Joined
297
Messages
72
Reactions
28
Points
Grow your business

Advertise on WJunction

Connect with an established international community of webmasters, hosting providers, developers and online entrepreneurs.

  • Premium & Premium+ Sticky
  • Dedicated section banners
  • Site-wide banner advertising
Explore advertising options
Back
Top Bottom