Modifier une ip (socket) [PHP]
Résolu
noobiz
Messages postés
616
Date d'inscription
Statut
Membre
Dernière intervention
-
Korigan -
Korigan -
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
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:
- Modifier une ip (socket) [PHP]
- Ethernet n'a pas de configuration ip valide - Guide
- Modifier dns - Guide
- Modifier liste déroulante excel - Guide
- Modifier une story facebook - Guide
- Comment connaître son adresse ip - Guide