常用命令
网络
TCPdump
TCPdump抓到目标ip、port的post请求
tcpdump -i any -s 0 -A 'tcp dst port 8087 and dst 10..... and tcp[((tcp[12:1] & 0xf0) >> 2):4] = 0x504F5354'
TCPdump抓到目标ip、port的get请求
tcpdump -i any -s 0 -A 'tcp dst port 8087 and dst 10..... and tcp[((tcp[12:1] & 0xf0) >> 2):4] = 0x47455420'
测试
测试某ip的端口是否开放
telnet ip port
如果出现
则说明端口已开放
退出telnet:先ctrl+] ,然后输入quit
关闭防火墙
firewall:
firewall-cmd --state //查看防火墙状态
systemctl status firewalld //查看防火墙状态
systemctl stop firewalld //关闭防火墙
systemctl start firewalld //打开防火墙
firewall-cmd --relaod // 重启防火墙
uwf
ufw status // 查看防火墙状态
ufw enable // 开启防火墙
ufw disable // 关闭防火墙
查看公网ip
curl cip.cc
查看局域网ip
ifconfig
查看当前开放的端口
netstat -ap | grep xxx
进程管理
查看当前线程
ps ax | grep xxx //查看线程和创建命令
查看进程的启动时间和时长
ps -p PID -o lstart,etime
系统状态
信息查看
查看系统版本信息
cat /etc/os-release