SECTION-X
Administrateurs : blackhackerz
 
 SECTION-X  *Les cours:  Les cours de hacking et autres: 

 Proxy Detection in php

Nouveau sujet   Répondre
 
Bas de pagePages : 1  
ledoc
lovers
Nouveau membre
ledoc
44 messages postés
   Posté le 28-11-2009 à 09:38:48   Voir le profil de ledoc (Offline)   Répondre à ce message   Envoyer un message privé à ledoc   

Proxy Detection in php


?php
/*



This will detect any suspicious open socket
that the user is running and if found in an
array, it will not let the user proceed to
the website, and the ability to allow certain
hosts to pass the scan.

How can u use dis :
include this page in any webpage you want protected.

*/

$Ports = array('1080', '8080', '8000', '3128', '8888', '23', '80', '8081'); // To hold the list of ports.
$AllowedHosts = array('localhost', 'allowedhost.com'); // To hold the list of allowed hosts.
$DisallowedHosts = array('127.0.0.1.poo.com', 'something.msn.com'); // To hold the list of disallowed hosts.
$Redirect = "http://www.unixcon.net/~datalogik/scripts/"; // Redirect page
$SocketTimeout = 1; // Higher the number, the longer it takes.
/* End of modification. */
if ((!in_array ($REMOTE_ADDR, $AllowedHosts)) && (!in_array ($REMOTE_ADDR, $DisallowedHosts)))
{

$x = 1;

while ($Ports[$x])
{
$fSockPointer = fsockopen($REMOTE_ADDR, $Ports[$x], $errno, $errstr, $SocketTimeout);
if ($fSockPointer)
{
header ("Location: $Redirect");
fclose($fSockPointer);
}
$x++;
}
} else {
if (in_array ($REMOTE_ADDR, $AllowedHosts))
{
die();
} else {
header ("Location: $Redirect");
die();
}
}
?>

--------------------
Bonjour a tous , G'Day All / Désolé pour certain tutorial qui sont en anglais / Et bon Hack! /
Haut de pagePages : 1  
 
 SECTION-X  *Les cours:  Les cours de hacking et autres:  Proxy Detection in phpNouveau sujet   Répondre
 
Identification rapide :         
 
Divers
Imprimer ce sujet
Aller à :   
 
 
créer forum