Skip to content

Instantly share code, notes, and snippets.

@13Cubed
Last active March 2, 2017 16:21

Revisions

  1. Richard Davis revised this gist Mar 2, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion dns-sniffer.sh
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    #!/bin/bash
    # Note: Do not run this script as root. You know better than that. Allow the standard user under which it runs the ability to execute /usr/sbin/tcpdump.
    # Example: setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' /usr/sbin/dumpcap
    /usr/sbin/tcpdump -i [INTERFACE_HERE] -s0 -G 300 -w '/capture/dns_%Y-%m-%d_%H:%M:%S.pcap' 'port 53'
    /usr/sbin/tcpdump -i [INTERFACE] -s0 -G 300 -w '/capture/dns_%Y-%m-%d_%H:%M:%S.pcap' 'port 53'
  2. Richard Davis revised this gist Mar 1, 2017. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion dns-sniffer.sh
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,4 @@
    #!/bin/bash
    # Note: Do not run this script as root. You know better than that. Allow the standard user under which it runs the ability to execute /usr/sbin/tcpdump. For example: "setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' /usr/sbin/dumpcap"
    # Note: Do not run this script as root. You know better than that. Allow the standard user under which it runs the ability to execute /usr/sbin/tcpdump.
    # Example: setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' /usr/sbin/dumpcap
    /usr/sbin/tcpdump -i [INTERFACE_HERE] -s0 -G 300 -w '/capture/dns_%Y-%m-%d_%H:%M:%S.pcap' 'port 53'
  3. Richard Davis revised this gist Mar 1, 2017. No changes.
  4. Richard Davis revised this gist Mar 1, 2017. No changes.
  5. Richard Davis revised this gist Mar 1, 2017. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions dns-sniffer.sh
    Original file line number Diff line number Diff line change
    @@ -1,2 +1,3 @@
    #!/bin/bash
    # Note: Do not run this script as root. You know better than that. Allow the standard user under which it runs the ability to execute /usr/sbin/tcpdump. For example: "setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' /usr/sbin/dumpcap"
    /usr/sbin/tcpdump -i [INTERFACE_HERE] -s0 -G 300 -w '/capture/dns_%Y-%m-%d_%H:%M:%S.pcap' 'port 53'
  6. Richard Davis created this gist Mar 1, 2017.
    2 changes: 2 additions & 0 deletions dns-sniffer.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    #!/bin/bash
    /usr/sbin/tcpdump -i [INTERFACE_HERE] -s0 -G 300 -w '/capture/dns_%Y-%m-%d_%H:%M:%S.pcap' 'port 53'