-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
36 changed files
with
914 additions
and
94 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
title: Date Format | ||
--- | ||
|
||
# Date format | ||
|
||
- https://en.wikipedia.org/wiki/List_of_date_formats_by_country | ||
- mdn [Intl.DateTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--- | ||
tags: | ||
- Compression | ||
- RFC | ||
--- | ||
|
||
# zlib | ||
|
||
- https://www.rfc-editor.org/rfc/rfc1950 | ||
|
||
**Header** | ||
|
||
| L | ZLIB | GZIP | Notes | | ||
| --- | ----- | ----- | ------------------- | | ||
| 1 | 78 01 | 1F 8B | No Compression/low | | ||
| 2 | 78 5E | 1F 8B | Fast Compression | | ||
| 3 | 78 5E | 1F 8B | | ||
| 4 | 78 5E | 1F 8B | | ||
| 5 | 78 5E | 1F 8B | | ||
| 6 | 78 9C | 1F 8B | Default Compression | | ||
| 7 | 78 DA | 1F 8B | Best Compression | | ||
| 8 | 78 DA | 1F 8B | | ||
| 9 | 78 DA | 1F 8B | | ||
|
||
- CMF -Compression Method and flags | ||
|
||
``` | ||
bits 0 to 3 CM Compression method | ||
bits 4 to 7 CINFO Compression info | ||
``` | ||
|
||
- CM = 8 | ||
- Deflate | ||
- window size up to 32K | ||
- used by gzip and PNG | ||
- CINFO - base-2 logarithm of the LZ77 window size, minus eight | ||
- CINFO=7 indicates a 32K window size | ||
- 因此大多前缀都是 78 | ||
- CM = 15 | ||
- reserved | ||
|
||
``` | ||
bits 0 to 4 FCHECK (check bits for CMF and FLG) | ||
bit 5 FDICT (preset dictionary) | ||
bits 6 to 7 FLEVEL (compression level) | ||
``` |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -496,3 +496,4 @@ iptables -L | wc -l -c | |
``` | ||
- https://github.com/k3s-io/k3s/issues/294 | ||
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
title: ARP | ||
--- | ||
|
||
# ARP | ||
|
||
- arpd | ||
- 管理 ARP 缓存 - 避免在网络上因为频繁的 ARP 广播请求而导致的性能问题 | ||
- 网络优化 | ||
- 安全 - 检测和防御 ARP 欺骗攻击 | ||
- 参考 | ||
- [royhills/arp-scan](https://github.com/royhills/arp-scan) | ||
|
||
```bash | ||
# 所有 hosts | ||
arp -a | ||
|
||
# /etc/arp-scan/mac-vendor.txt | ||
# /usr/share/arp-scan/ieee-oui.txt | ||
# arp-fingerprint arp-scan get-iab get-oui | ||
apk add arp-scan | ||
|
||
# IP -> MAC | ||
sudo arp-scan 192.168.1.1 | ||
sudo arp-scan 192.168.1.0/24 | ||
``` |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.