PortScan em PHP com post usando fsockopen
Publicado por Perfil removido (última atualização em 13/09/2012)
[ Hits: 8.218 ]
Por curiosidade criei esse simples portscan em PHP que utiliza fsockopen e com metodo post, não sei em que pode ser util mas ...
<?php
/*+----------------------------------------+
* |PortScanner em php usando fsockopen |
* |C0ded by @Kouback_TR_ |
* |03/09/2012 |
* |http://twitter.com/Kouback_TR_ |
* +----------------------------------------+*/
print"
</head>
<body bgcolor=#000000>
<html>
<head>
<title>PortScanner PHP by @Kouback_TR_</title>
<br>
<br>
<center><a href=http://twitter.com/kouback_tr_ target=><font color=#FF0000>PortScanner PHP by @Kouback_TR_</a></center></font>
<form method='post' action='?act=scan'>
<br>
<center><font color=#00FF30>Host: <input type=text name=host></input></center></pre>
<center><font color=#00FF30>Port: <input type=text name=port></input></center></pre>
<center><input type=submit value='-=Scan=-'></input></center>
</form>
</body>
</html>
"; // HTML
if($_GET['act'] == "scan"){
{
$host = $_POST['host']; // host
$port = $_POST['port']; // porta
{
$fp = fsockopen($host,$port,$errno,$errstr,10); // criando nossa conexão ...
if($fp)
{
print"port $port open in $host<br>"; // retorna se a porta está aberta
fclose($fp);
}
else
{
print"port $port closed in $host<br>"; // retorna se a porta estiver fechada
}
flush();
}
}
}
?>
Monitorando o Preço do Bitcoin ou sua Cripto Favorita em Tempo Real com um Widget Flutuante
IA Turbina o Desktop Linux enquanto distros renovam forças
Como extrair chaves TOTP 2FA a partir de QRCODE (Google Authenticator)
Como realizar um ataque de força bruta para desobrir senhas?
Como usar Gpaste no ambiente Cinnamon
Atualizando o Fedora 42 para 43
Pergunta: Meu teclado não está respondendo direito como e consertar? (0)
SQLITE não quer funcionar no LINUX LMDE6 64 com Lazaruz 4.2 64bit (n... (0)
Secure boot, artigo interessante, nada técnico. (5)









