-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgeoip.sh
52 lines (51 loc) · 1.63 KB
/
geoip.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
clear
sudo apt-get install geoip-bin gedit -y
mkdir ~/GeoIP
clear
echo ""
echo "================================================================================"
echo " IP Geolocalization"
echo "================================================================================"
echo ""
echo " ===== Digite o IP ou Domínio: ====="
read ip
echo ""
echo " ===== Quar que os dados capturados sejam salvos em nota? ====="
echo ""
echo " 1 - Sim"
echo " 2 - Não *"
echo ""
echo " ===== Resposta: ====="
read dados
echo ""
echo " Pressione <ENTER> para buscar dados!"
read #pause
echo "================================================================================"
echo ""
clear
echo "================================================================================"
echo " IP Geolocalization"
echo "================================================================================"
echo ""
echo " ===== Dados encontrados: ====="
echo ""
if [[ $dados -eq 1 ]];
then
geoiplookup $ip
echo ""
echo "============================================================================="
echo ""
echo " Pressione <ENTER> para ver a nota!"
read #pause
geoiplookup $ip > ~/GeoIP/$ip.txt & gedit ~/GeoIP/$ip.txt
exit
else
geoiplookup $ip
fi
echo ""
echo "==============================================================================="
echo ""
echo " Pressione <ENTER> para sair..."
read #pause
clear