Advertisement
xe1phix

Xe1phix-[Dig]-Cheatsheet-[v4.8.52].sh

Jun 28th, 2023
895
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.38 KB | Cybersecurity | 0 0
  1. #!/bin/sh
  2.  
  3.  
  4. ## ----------------------------------------------------------------------------------------- ##
  5.     dig +short +identify $Server                ## see what name server
  6.                                                 ## or whose cache is providing answers
  7. ## ----------------------------------------------------------------------------------------- ##
  8.     dig +trace $Domain.com                      ## Debug DNS Tracing
  9. ## ----------------------------------------------------------------------------------------- ##
  10.     dig $Domain.com | grep status               ## receive the NXDOMAIN status.
  11. ## ----------------------------------------------------------------------------------------- ##
  12.     dig $Domain.com | grep Query                ## query time only
  13. ## ----------------------------------------------------------------------------------------- ##
  14.     dig $Domain.com $Type                       ## a, mx, ns, soa, srv, txt, any
  15. ## ----------------------------------------------------------------------------------------- ##
  16.     dig -x $TargetIP                            ## Pointer records
  17. ## ----------------------------------------------------------------------------------------- ##
  18.     dig @$NameServerIP $Domain.com axfr         ## Zone transfer
  19. ## ----------------------------------------------------------------------------------------- ##
  20.     dig @$NameServerIP $Domain.com afro         ## Forward zone transfer
  21. ## ----------------------------------------------------------------------------------------- ##
  22.     dig @$IPAddr $Domain +norecurse             ## Non recursive query (cache lookup)
  23. ## ----------------------------------------------------------------------------------------- ##
  24.     dig MX +short $Domain                       ## Perform MX Record Lookup
  25. ## ----------------------------------------------------------------------------------------- ##
  26.     dig +short -t txt $@                        ## Sender Policy Framework (SPF) record
  27. ## ----------------------------------------------------------------------------------------- ##
  28.     dig ns $Domain                              ## List the Name Servers for google.com
  29. ## ----------------------------------------------------------------------------------------- ##
  30.     dig a $Domain.com @$Nameserver              ## Perform DNS IP Lookup
  31. ## ----------------------------------------------------------------------------------------- ##
  32.  
  33.  
  34.  
  35. ##-============================================-##
  36. ##  [+] Query Wikipedia via console over DNS
  37. ##-============================================-##
  38. dig +short txt <keyword>.wp.dg.cx
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement