Advertisement
noes1s

Linux trick: Detect Stuff

May 10th, 2011
263
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.42 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. showinterfaces=$(airmon-ng | awk '/[0-9]/{print $1}')
  4.  
  5. usedinterface=$(route -nA inet | awk '/UG/{print $8}')
  6.  
  7. gatewayip=$(route -nA inet | awk '/UG/{print $2}')
  8.  
  9. externalip=$(wget -qO- http://www.sputnick-area.net/ip)
  10.  
  11. interfacesip=$(ip -o addr show | awk '/inet/ {print $2, $3, $4}' | column -t | grep -v lo)
  12.  
  13. servicerunning=$(ps -A | grep $service)
  14.  
  15. listfiles=$(ls -lAB | grep ^- | awk '{print $8}')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement