BrendanClements

bashscan

Jun 22nd, 2021 (edited)
550
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.40 KB | None | 0 0
  1. #!/bin/bash
  2. get_config() {
  3. iwconfig 2>&1 | sed -n -e 's/^.*Access Point: //p'
  4. } #(bnbfreak, 2013)
  5.  
  6. get_rssi() {
  7. iwconfig | awk -F'[ =]+' '/Signal level/ {print $7}'
  8. } #(John, 2016)
  9.  
  10. while true; do
  11.   date "+%T.%1N" | tee -a scan3.txt
  12.   config=$(get_config)
  13.   rssi=$(get_rssi)
  14.   echo "$config" | tee -a scan3.txt
  15.   echo "$rssi" | tee -a scan3.txt
  16.   echo "" | tee -a scan3.txt
  17.   sleep 1
  18. done
Add Comment
Please, Sign In to add comment