-
Notifications
You must be signed in to change notification settings - Fork 35
/
geo-recon.py
executable file
·86 lines (59 loc) · 1.82 KB
/
geo-recon.py
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
import sys
if sys.version_info<(3,0):
sys.stderr.write("\nYou need python 3.0 or later to run this script\n")
sys.stderr.write("Please update and make sure you use the command python3 geo-recon.py <IP NUMBER> <COMMAND>\n\n")
sys.exit(0)
import requests
import json
from colorama import Fore, Back, Style
import os
from modules.commands import command
from modules.commands import listCommand
from modules.helps import help
from modules.welcome import welcome
from modules.getData import getGeo
from modules.checkIp import check
from modules.nmapVerify import verify
from modules.myip import myIp
syA = sys.argv
def zero(syA):
#Verify for argumements and IPs, if not it will read the banner and will close
if (len(sys.argv) == 1):
welcome()
sys.exit(0)
else:
#Verify if the user has nmap, if not it will install automatic
verify()
zero(syA)
#Test for use and execute
if (len(sys.argv) > 1):
syA1 = sys.argv[1]
if sys.argv[1].startswith('-'):
if syA1 == "--help" or syA1 == '-h':
os.system('clear')
welcome()
help(syA1)
elif syA1 == '-b' or syA1 == '--banner':
os.system('clear')
welcome()
elif syA1 == '-c' or syA1 == '--commands':
os.system('clear')
welcome()
listCommand()
elif syA1 == 'localhost':
ip = myIp()
os.system('clear')
welcome()
syA1 = ip
getGeo(syA1)
check(syA1)
else:
os.system('clear')
welcome()
print(Fore.WHITE + '\n Wait a minute....')
getGeo(syA1)
check(syA1)
if (len(sys.argv) > 2):
syA1 = sys.argv[1]
syA2 = sys.argv[2]
command(syA2, syA1)