(OK) shell script—Find a Rogue DHCP Server—tcpdump/dhclient—nmap

1360阅读 0评论2016-01-25 ztguang
分类:LINUX


# . find_rogue_dhcp.sh &


点击(此处)折叠或打开

  1. #! /bin/sh
  2. # tcpdump -i enp13s0 -nev udp port 68 >> /tmp/rogue 2>&1 &
  3. # touch /tmp/rogue_dhcp_ip
  4. # . find_rogue_dhcp.sh &

  5. while true
  6. do
  7. echo > /tmp/rogue
  8. dhclient -r
  9. dhclient >/dev/null 2>&1
  10. sleep 2
  11. grep '192.168' /tmp/rogue >> /tmp/rogue_dhcp_ip
  12. done


上一篇:Install Pip with Curl and Python—core—docker
下一篇:IMUNES—Integrated Multiprotocol Network Emulator/Simulator