mirror of
https://github.com/Brandon-Rozek/website.git
synced 2024-11-09 18:50:34 -05:00
New Post
This commit is contained in:
parent
846008e84c
commit
bda4ebd00d
1 changed files with 19 additions and 0 deletions
19
content/blog/bashtcpudp.md
Normal file
19
content/blog/bashtcpudp.md
Normal file
|
@ -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
|
||||
```
|
Loading…
Reference in a new issue