算法图解 笔记
- 大O表示法都是指的 log₂ 对数O(1)或O(N)或O(log₂N),最糟情况用的次数, 大O符号:是用于描述函数渐近行为的数学符号;
- 二分查找 有序的列表
- 数组和链表 对比 增删改查
- while 循环可能更快,但是递归更易读,递归使栈更深;
tcpdump - dump traffic on a network
tcpdump [ -AbdDefhHIJKlLnNOpqStuUvxX# ] [ -B buffer_size ]
samples here
sudo tcpdump host 10.102.196.239 -w /tmp/tcpdump.log.cap
sudo tcpdump -C 50 -W 10 -w /tmp/tcp.cap ##循环写 10个文件, 每个 50M
sudo tcpdump'(host 10.135.250.186 or host 10.189.248.238 or host 10.20.170.138 or host 10.21.233.128 or port 53)' -w /tmp/tcp.cap # 多个 IP 或者 DNS 查询
ping:
sudo tcpdump -e icmp[icmptype] == 8 //ping echo request
sudo tcpdump -e icmp[icmptype] == 0 //ping echo reply
Becoming a master of display filters is absolutely essential to the network analyst.
Wireshark capture filters and display filters look very different.Capture filters use the BPF format whereas display filters use a proprietary format.
dig 由 BIND(互联网上最广泛使用的 DNS 软件) 提供的查询 DNS 的辅助工具,替换原来老的 nslookup 和 host
dig //不带任何参数查询root dns .
dig -h //help
dig +short www.tianxiaohui.com // 简化输出
dig +trace www.tianxiaohui.com //输出迭代式所有来回
dig @8.8.8.8 tianxiaohui.com
dig -x 54.222.60.252 //反向查询
dig -f query.txt +short //从文件读
dig google.com ANY //查询所有记录