Modifier une ip (socket) [PHP]

Résolu/Fermé
noobiz Messages postés 616 Date d'inscription lundi 1 octobre 2007 Statut Membre Dernière intervention 2 juillet 2009 - 22 déc. 2008 à 18:54
 Korigan - 20 févr. 2010 à 13:41
Plop ^^
php:
Voila je cherche un moyen d'envoyer une socket à un site, provenant d'une ip "bidon". Est ce possible?

J'ai deja fait un script mais il ne marche pas :s

<?php


function post_v2($host,$query,$referer,$agent,$forward){
$path=explode('/',$host);
$host=$path[0];
unset($path[0]);
$path='/'.(implode('/',$path));
echo "<hr>Envoie d'une requete...<br>";
$post="POST $path HTTP/1.1\r\nHost: $host\r\nUser-Agent: $agent\r\nX-Forwarded-For: $forward\r\nContent-Type: application/x-www-form-urlencoded\r\nContent-length: ".strlen($query)."\r\nConnection: close\r\n\r\n$query";
str_replace('#','',$post);
echo "<br>Post: '".$post."'<br>";
$h=fsockopen($host,80);
fwrite($h,$post);
for($a=0,$r='';!$a;){
$b=fread($h,8192);
$r.=$b;
$a=(($b=='')?1:0);
}
fclose($h);
return $r;
}

$nb=$_GET['nb'];

for($id_shoot=0;$id_shoot<$nb;$id_shoot++){
$rand1=rand(1,254);
$rand2=rand(1,254);
$rand3=rand(1,254);
$rand4=rand(1,254);
$forward=$rand1.".".$rand2.".".$rand3.".".$rand4;
$referer="";
$cookie="";
$agent="Nav ".$id_shoot;
$query="?zz=pp";
$r=post_v2("url",$query,"",$agent,$forward);
}
?>



Pourquoi ne marche il pas? Existe il un script qui puisse me permettre de faire ce que j'ai decris ci dessus?

Merci d'avance,

Ps En aucun cas le script sera utilisé pour du spoofing, trucage de votes, etc
A voir également:

2 réponses

Ce n'est pas ton script noobiz, et tu le sais ;)

Cordialement,
Korigan
1
kilian Messages postés 8731 Date d'inscription vendredi 19 septembre 2003 Statut Modérateur Dernière intervention 20 août 2016 1 527
22 déc. 2008 à 19:02
Salut,

Voila je cherche un moyen d'envoyer une socket à un site, provenant d'une ip "bidon". Est ce possible?

Non impossible.
0