Skip to content

Commit

Permalink
2.0.1 release
Browse files Browse the repository at this point in the history
2.0.1 release
  • Loading branch information
maldevel committed Jan 15, 2016
1 parent 269d6c1 commit 8545d3b
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 21 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -61,4 +61,5 @@ RemoteSystemsTempFiles
.project
.pydevproject
.metadata
.settings
.settings
*.prefs
3 changes: 3 additions & 0 deletions .settings/org.eclipse.core.resources.prefs
@@ -1,4 +1,7 @@
eclipse.preferences.version=1
encoding//core/FileExporter.py=UTF-8
encoding//core/IpGeoLocation.py=UTF-8
encoding//core/IpGeoLocationLib.py=UTF-8
encoding//core/Logger.py=UTF-8
encoding//core/Menu.py=UTF-8
encoding/ipgeolocation.py=UTF-8
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -47,7 +47,7 @@ usage: ipgeolocation.py [-h] [-m] [-t TARGET] [-T file] [-u User-Agent]
[-U file] [-g] [--noprint] [-v] [--nolog] [-x PROXY]
[-X file] [-e file] [-ec file] [-ex file]
IPGeolocation 2.0
IPGeolocation 2.0.1
--[ Retrieve IP Geolocation information from ip-api.com
--[ Copyright (c) 2015-2016 maldevel (@maldevel)
Expand Down
22 changes: 9 additions & 13 deletions core/IpGeoLocationLib.py
Expand Up @@ -38,8 +38,7 @@
class IpGeoLocationLib:
"""Retrieve IP Geolocation information from http://ip-api.com"""


def __init__(self):
def __init__(self, target, noprint=False, verbose=False, nolog=False):
self.URL = 'http://ip-api.com'
self.RequestURL = self.URL + '/json/{}'
self.BOLD = '\033[1m'
Expand All @@ -50,22 +49,19 @@ def __init__(self):
self.TargetsFile = None
self.ProxiesFile = None
self.Targets = None
self.Verbose = False
self.NoPrint = False
self.NoLog = False
self.Verbose = verbose
self.NoPrint = noprint
self.NoLog = nolog
self.Target = target


def GetInfo(self, target, userAgent, targetsFile=None,
def GetInfo(self, userAgent, targetsFile=None,
userAgentFile=None, proxy=False, proxiesFile=None,
noprint=False, verbose=False, nolog=False, exportToCSVFile=None,
exportToXMLFile=None, exportToTXTFile=None,
googleMaps=False):
exportToCSVFile=None, exportToXMLFile=None,
exportToTXTFile=None, googleMaps=False):
"""Retrieve information"""

self.UserAgent = userAgent
self.Verbose = verbose
self.NoPrint = noprint
self.NoLog = nolog

try:

Expand Down Expand Up @@ -98,7 +94,7 @@ def GetInfo(self, target, userAgent, targetsFile=None,
results = self.__retrieveGeolocations()

else:
results = self.__retrieveGeolocation(target)
results = self.__retrieveGeolocation(self.Target)

#export information
if exportToCSVFile and not os.path.exists(exportToCSVFile) and os.access(os.path.dirname(exportToCSVFile), os.W_OK):
Expand Down
2 changes: 1 addition & 1 deletion core/Menu.py
Expand Up @@ -27,7 +27,7 @@

__author__ = 'maldevel'
__twitter__ = '@maldevel'
__version__ = '2.0'
__version__ = '2.0.1'
__year__ = '2015-2016'


Expand Down
9 changes: 4 additions & 5 deletions ipgeolocation.py
Expand Up @@ -73,16 +73,15 @@ def main():


#init lib
ipGeoLocRequest = IpGeoLocationLib()
ipGeoLocRequest = IpGeoLocationLib(args.target, args.noprint, args.verbose, args.nolog)

print(banner)

#retrieve information
if not ipGeoLocRequest.GetInfo(args.target, args.uagent, args.tlist,
args.ulist, args.proxy, args.xlist,
args.noprint, args.verbose, args.nolog,
if not ipGeoLocRequest.GetInfo(args.uagent, args.tlist,
args.ulist, args.proxy, args.xlist,
args.csv, args.xml, args.txt, args.g):
PrintError("Retrieving IP Geolocation information failed.")
PrintError("Retrieving IP Geolocation information failed.", args.nolog)
sys.exit(8)


Expand Down

0 comments on commit 8545d3b

Please sign in to comment.