/dev/tcp
Posted | archive
马克一下。。。exec这个没想到shell里也可以用啊
exec 3<>/dev/tcp/www.google.com/80
echo -e "GET / HTTP/1.1\n\n">&3
cat <&3
简单的端口扫描:
$ for p in {1..1023}; do(echo >/dev/tcp/localhost/$p) >/dev/null 2>&1 && echo "$p open"; done
btw 最近看到好多openvpn被k掉了。看了下sshd的[源码](xasprintf(&server_version_string, "SSH-%d.%d-%.100s%s%s%s",)
这一行:
xasprintf(&server_version_string, "SSH-%d.%d-%.100s%s%s%s",
真尼玛坑爹,真心不安全啊。还是brl的patch好用。
Comments