Advertisement
xe1phix

Xe1phix-[Darkstat]-Cheatsheet-[v4.9.54].sh

Sep 21st, 2022 (edited)
928
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.34 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3.  
  4. ##-===============================================-##
  5. ##   [+] Gather statistics on the eth0 interface:
  6. ##-===============================================-##
  7. darkstat -i eth0
  8.  
  9.  
  10. ##-============================-##
  11. ##   [+] Ignore ARP traffic:
  12. ##-============================-##
  13. darkstat -i eth0 -f "not arp"
  14.  
  15.  
  16. ##-=====================-##
  17. ##   [+] SSH traffic:
  18. ##-=====================-##
  19. darkstat -i eth0 -f "port 22"
  20.  
  21.  
  22. ##-=========================-##
  23. ##   [+] OpenVPN traffic:
  24. ##-=========================-##
  25. darkstat -i eth0 -f "port 1194"
  26.  
  27.  
  28. ##-===========================================-##
  29. ##   [+] Show hex dumps of received traffic
  30. ##-===========================================-##
  31. darkstat --verbose -i eth0 --hexdump
  32.  
  33.  
  34. ##-===========================-##
  35. ##   [+] Show HTTP traffic
  36. ##-===========================-##
  37. darkstat -i eth0 -p 80
  38.  
  39.  
  40. ##-=======================================================-##
  41. ##   [+] dont account for traffic between internal IPs:
  42. ##-=======================================================-##
  43. darkstat -i eth0 -f "not (src net 192.168.0 and dst net 192.168.0)"
  44.  
  45.  
  46. ##-=================================================================-##
  47. ##   [+] graph all traffic entering and leaving the local network
  48. ##-=================================================================-##
  49. darkstat -i eth0 -l 192.168.1.0/255.255.255.0
  50.  
  51. ## ---------------------------------------------------------------- ##
  52. ##  [?] account for traffic on the Internet-facing  interface,
  53. ##  [?] but only  serve  web pages to our private local network
  54. ##  [?] where we have the IP address 192.168.0.1:
  55. ## ---------------------------------------------------------------- ##
  56. darkstat -i eth0 -b 192.168.0.1
  57.  
  58.  
  59.  
  60. ##-===============================================-##
  61. ##   [+] import a darkstat database
  62. ##-===============================================-##
  63. darkstat --verbose --import $File
  64.  
  65.  
  66. ##-===============================================-##
  67. ##   [+] export in-memory darkstat database
  68. ##-===============================================-##
  69. darkstat --verbose --export $File
  70.  
  71.  
  72. ##-======================================================-##
  73. ##   [+] Export hex dumps of received traffic to file:
  74. ##-======================================================-##
  75. darkstat --verbose -i eth0 --hexdump --export $File
  76.  
  77.  
  78.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement