Advertisement
dzocesrce

[OS] Popular IP addresses

Feb 1st, 2024 (edited)
639
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.64 KB | None | 0 0
  1. #septemvri 2023 ispit
  2. #!/bin/bash
  3. #komandata e prilicno dolga, treba da se vnimava koga vleguva vo nov red za da se izvrsi kako so treba...
  4. #datotekata last.txt e nalik komandata last na OS serverot na PuTTy
  5. IP_ADRESI=`cat last.txt | grep -v still | awk '{print $1, $3, $10}' | sed -e 's/(//g' -e 's/)//g' -e 's/:/ /g' | awk '$3>0 || $4>10 {print $2, $1}' | sort -n -r | uniq | sed 's/ /|/g' | tr '\n' '|' | awk -F\| '{ for(i=1;i<NF;i+=2) { for(j=i;j<NF;j+=2) { if($i == $j) { if($(i+1) != $(j+1)) {print  $i} }}}}'`
  6. echo "IP adresite koi se pristapeni od poveke korisnici od OS serverot se:"
  7. for line in $IP_ADRESI
  8. do
  9.         echo $line
  10. done
  11.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement