PHP port scanner

  • Hello Guest! Welcome to ConsoleCrunch, to help support our site check out the premium upgrades HERE! to get exclusive access to our hidden content.
  • Unable to load portions of the website...
    If you use an ad blocker addon, you should disable it because it interferes with several elements of the site and blocks more than just adverts.
  • Read Rules Before Posting Post Virus Scans with every program.

Psycho_Coder

Active Poster
Retired Staff
Active Member
Apr 12, 2014
642
481
133
UK
Created this a little while back on HC.

Od4GLfL.png


IMO, My design skills are awesome! :D

bBGxlix.png


HCportscanner.html
Code:
<html>
<style type="text/css">
body {
 margin: 0px;
 font-weight: bold;
 font-family: arial;
 background-color: black;
}
#head {
 background-color: #2E2E2E;
 color: red;
 text-align: center;
}
form {
 float: right;
 border: 1px solid red;
 margin-right: 400px
}
button a {
 text-decoration: none;
 background-color: red;
 color: white;
}
button {
 background-color: red;
 border: 1px solid red;
 width: 155px;
}
</style>
<body>
 <div id="head">
 <h1>HC Port Scanner</h1>
 </div>
<form method="post" action="HCPortScanner.php">
<input type="text" type="ip" placeholder="IP"></br></br>
<input type="text" type="from" placeholder="FROM"></br></br>
<input type="text" type="ending port" placeholder="ENDING PORT"></br></br>
<button><a href="HCPortScanner.php">Scan Port</a></button>
</form>
</body>
</html>

hcPortScanner.php
Code:
<!DOCTYPE html>
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 <title>Port Scan Completed..</title>
 <style type="text/css">
body {
 color: white;
 background-color: black;
 margin: 0px;
 margin-top: 0px;
 text-align: center;

}
#head {
 background-color: #2E2E2E;
 color: red;
 text-align: center;
}
 </style>
 <body>
 <div id="head">
  <h1>Join Hack Community</h1>
 </div>




 <?php

 error_reporting(~E_ALL);


 $host=$_POST['ip'];
 $from = $_POST['from']; 
 $to = $_POST['to'];

 if (empty($_POST["ip"]) || empty($_POST['from']) || empty($_POST['to']))
 {
  echo"<b> Incomplete data, Go back! </b>";
 }
 elseif (!(filter_var($host, FILTER_VALIDATE_IP,FILTER_FLAG_IPV4)))
 {
 echo "<b>This IP address is not valid ! </b>";
 }
 elseif (!(is_numeric($from)) || !(is_numeric($to)))
 {
 echo "<b>Entered data is not a Port numeber</b>";
 }
 elseif ($from > $to || $from==$to)
 {
 echo "<b>Please enter lower value in the <i>FROM</i> field !</b>";
 }
 else
 {
 echo "<br><b><u>Scanned IP/Host : $host </u><br><u><i>List of Open Ports:</i></u></b><br>";


 $socket = socket_create(AF_INET , SOCK_STREAM , SOL_TCP);
 for($port = $from; $port <= $to ; $port++)
 {

 $connection = socket_connect($socket , $host , $port);
 if($connection)
 {

 echo "port $port Open (Warning !) <img src='warning.png' height=30px width=30px alt='open port'> ".'<br>';

 socket_close($socket);

 $socket = socket_create(AF_INET , SOCK_STREAM , SOL_TCP);
 }
 else
 {
 }
 }
 }

 ?>


  </body>
 </html>
 
Dev how you get all of this SWACK. makes my arse hurt :xD:
 
  • Like
Reactions: Psycho_Coder
General chit-chat
Help Users
  • No one is chatting at the moment.
  • @ ANGUS0023233:
    Do you got BF6 jinx?
  • @ QM|T_JinX:
    no i dont
  • @ QM|T_JinX:
    kept Diein to that f%cking game haha
  • @ QM|T_JinX:
    not sure if i type that correct haha i died alot on that game in beta
  • @ ANGUS0023233:
    Ah you tried playing the Battlefield 6 alpha labs beta. I only played the Alpha Beta then Open beta then the game itself since i enjoyed it all lot
  • @ QM|T_JinX:
    it a good lookin game for sure but im not as good anymore in that game haha
    so it seems hahah
  • @ lurch6661:
    high
  • @ QM|T_JinX:
    high
  • @ QM|T_JinX:
    bro im not on messager ok if im online on there ppl start to message me dont feel like going on and on on text
  • @ lurch6661:
    ok bro
  • @ QM|T_JinX:
    nothing agains you you know that right just dont feel like answer all those text the hole time
  • @ lurch6661:
    i understand trust m e lol
  • @ QM|T_JinX:
    by the way i unlocked the gold camo on bo7 looks pretty cool hahah
  • @ lurch6661:
    lol
  • @ ANGUS0023233:
    Jinx do you got PSN ?
  • @ QM|T_JinX:
    yea i do
  • @ QM|T_JinX:
    my gf is coming over i check you guys later on tc guys
  • @ lurch6661:
    ok bro tc
  • @ ANGUS0023233:
    Wow bunch of my links and such are gone i’ll have to look into it and try to fix it or update it anyways take care lurch and jinx
  • @ QM|T_JinX:
    t bro good to see you back on here catch you guys later
  • Chat Bot:
    QM|T_JinX has joined the room.
  • Chat Bot:
    Christo has joined the room.
  • Chat Bot:
    carkys is our newest member. Welcome!
  • Chat Bot:
    QM|T_JinX has joined the room.
      Chat Bot: QM|T_JinX has joined the room.