$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
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
| package main | |
| import ( | |
| "bytes" | |
| "encoding/binary" | |
| "encoding/hex" | |
| "fmt" | |
| "unsafe" | |
| ) |
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
| # スキャンするターゲットのIPアドレスまたはホスト名 | |
| $target = "xxx.xxx.xxx.xxx" | |
| # スキャンするポート範囲 | |
| $startPort = 20 | |
| $endPort = 25 | |
| # 指定したポート範囲でスキャンを実行 | |
| for ($port = $startPort; $port -le $endPort; $port++) { | |
| $tcpClient = New-Object System.Net.Sockets.TcpClient |
$ brew install gitpod-io/tap/gitpod
==> Tapping gitpod-io/tap$ sudo vim /etc/apt/sources.list元々のapt-lineを消して以下を追加
deb https://deb.debian.org/debian sid main non-free non-free-firmware contribMTU(Maximum Transmission Unit)が1500バイトの場合、UDPでデータを送る際にIPフラグメントを起こさずに送信できる最大サイズは以下のように計算できます。
- Ethernetヘッダ: 14バイト
- IPヘッダ: 最小で20バイト
- UDPヘッダ: 8バイト
- それらのヘッダを引いた値: (1500 - 14 - 20 - 8 = 1458)バイト
したがって、フラグメントを起こさずに送信できる最大サイズは1458バイトになります。