Advertisement
D0cEvil

Bash - IP Geolocation Lookup

Dec 27th, 2022
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.33 KB | Cybersecurity | 0 0
  1. #!/bin/bash
  2.  
  3. #rm -R /tmp/info.txt
  4. FILE='/tmp/badip.list'  #Это файлик с IP-адресами
  5. while read line; do
  6.      echo
  7.      T1=`geoiplookup $line`
  8.      T2=`curl ipinfo.io/$line`
  9.      #T3=`whois $line`
  10.      echo "$T1" >> /tmp/info.txt
  11.      echo "$T2" >> /tmp/info.txt
  12.      #echo "$T3" >> /tmp/info.txt
  13. done < $FILE
Tags: BASH
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement