Last active
March 22, 2021 17:47
-
-
Save dwallraff/4b278a114fdc45502b87d713653381ff to your computer and use it in GitHub Desktop.
Use bash for tcp test connections on linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exec 3<>/dev/tcp/example.com/80 && echo -e "HEAD / HTTP/1.1\r\nHost: example.com\r\nConnection: close\r\n\r\n" >&3 && cat <&3 | |
# exec 3<>/dev/tcp/www.google.com/80 | |
# echo -e "GET /index.html HTTP/1.1\r\nConnection: close\r\n\r\n" >&3 | |
# cat <&3 | |
# cat < /dev/tcp/<ip>/<port> > outfile.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment