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


# . 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


<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
阅读(67) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~
评论热议
posted @ 2016-02-01 00:00  张同光  阅读(179)  评论(0编辑  收藏  举报