工作中用的比较多的指令 1.监听sync 和 fin tcpdump not host 172.16.2.58 and not host 172.16.2.57 and port 8851 -n and 'tcp[tcpflags] & (tcp-syn | tcp-fin) != 0' 2. 抓包到文件(全部数据) tcpdump port 8851 -n and host 10.2.33.116 -s0 -w liulang20160812.cap 3. virtualbox文件夹共享 sudo usermod -aG vboxsf lang 4. scp拷贝文件到本地 scp checkuser@10.1.3.90:/home/checkuser/liulang/liulang20160812.cap scp root@172.16.4.67:/home/YLLB783/20160805/logFile/2016.08.12 /media/sf_share/ 5.获取socket状态,忽略指定ip netstat -ntpal | grep udpS | grep -v 172.16.4.68 |grep -v 172.16.4.70 |grep -v 172.16.4.69 |grep -v 172.16.4.67:700 |grep -v 172.16.4.67:6379 6. 获取指定ip的socket连接数量 netstat -ntpal | grep :8851 | awk '{print $5}'|sed 's/:/\t/g' | awk '{print $1}'| sort -r |uniq -c | sort -n > netstat.txt 7.压缩解压缩 a.tar格式 tar -cvf tt.tar filename1.txt filedir2 file3 tar -xvf tt.tar b.tar.gz格式 tar -zcvf tt.tar.gz filename1.txt filedir2 file3 tar -zxvf tt.tar.gz 8.telnet查看指定端口是否监听 telnet 192.168.1.103 7890 9. vim 中去掉 ^M: :%s/\r//g 10.防火墙 ufw disable 11.杀死进程 ps -ef | grep firefox | grep -v grep | cut -c 9-15 | xargs kill -s 9 killall -9 firefox pkill -9 firefox
usefull cmd
最新推荐文章于 2024-07-07 23:19:37 发布