Zmajk0

Untitled

Nov 24th, 2020
68
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #! /usr/bin /env bash
  2. # Author: Gazda Limeni
  3. # Koriscenje: bash gazda-lst.sh
  4. # Deskripcija: Besplatni open source ASN ip range skaner.
  5.  
  6.  
  7. script_name=$(basename "${0}")
  8. script_version="0.2.1"
  9. script_name=$(basename "${0}")
  10. script_version="0.2.1"
  11.  
  12. if hash whois &> /dev/null; then
  13. echo "whois je installiran"
  14. elif hash jwhois &> /dev/null; then
  15. echo "jwhois je installiran"
  16. else
  17. echo "jwhois ili whois nisu installirani, molimo vas installirajte jedno od ta dva da bi ste nastavili."
  18. echo "Izlazim iz skripte"
  19. exit 100
  20. fi
  21.  
  22. echo -e ""
  23. echo -e "\e[32m#################################################################\e[0m"
  24. echo -e "\e[32m# \e[31m Besplatna Open Source Lista Borned By G A Z D A #\e[0m"
  25. echo -e "\e[32m# \e[31mhttps://ipinfo.io/countries - ovde mozete naci pun kurac ASn-a #\e[0m"
  26. echo -e "\e[32m#################################################################\e[0m"
  27.  
  28. while read asn; do
  29. whois -h whois.radb.net -- "-i origin ${1:-$asn}" | grep -Eo "([0-9.]+){4}/[0-9]+" >> gazda.lst
  30. echo -e "$asn <-- added to list"
  31. done < asn.txt
  32. echo -e ""
  33. echo -e "\e[34mSve ip adrese su sacuvane u gazda.lst\e[0m"
  34.  
RAW Paste Data