From bda4ebd00d4b69b76b966fd7c926790e231bf62c Mon Sep 17 00:00:00 2001 From: Brandon Rozek Date: Mon, 25 May 2020 23:17:46 -0400 Subject: [PATCH] New Post --- content/blog/bashtcpudp.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 content/blog/bashtcpudp.md diff --git a/content/blog/bashtcpudp.md b/content/blog/bashtcpudp.md new file mode 100644 index 0000000..dcb58ba --- /dev/null +++ b/content/blog/bashtcpudp.md @@ -0,0 +1,19 @@ +--- +title: "TCP/UDP with Bash" +date: 2020-05-25T23:10:15-04:00 +draft: false +tags: ["bash"] +--- + +The bash shell contains pseudo-devices to send packets with TCP/UDP. The pseudo files are formatted like the following: + +``` +dev/tcp/HOST/PORT +/dev/udp/HOST/PORT +``` + +To send a UDP packet to `localhost:6300` containing the payload "Hello, World.", we would run the following command: + +```bash +echo "Hello, World." > /dev/udp/127.0.0.1/6300 +``` \ No newline at end of file