[
  {
    "path": "README.md",
    "content": "# OPRecon v1.8-BETA\r\nUsing this you can find informations via PhoneInFoga(In-Built), Find location via IP Address & website link via IPGeoLocation(In-Built) and Phone Number Tracker(Made by @AbirHasan2005). Phone Number Tracker will give you IP Address using phone number. For more information join my Telegram Group.\r\n\r\n## Telegram Group: http://t.me/linux_repo\r\nJoin Telegram Group for help and Feedback.\r\n\r\n## Social Sites:\r\n- Twitter: https://twitter.com/AbirHasan2005 [Only Follow]\r\n- Instagram: https://instagram.com/AbirHasan2005 [Only Follow]\r\n- Facebook: https://facebook.com/AbirHasan2005 [Only Follow]\r\n- GitHub: https://github.com/AbirHasan2005 \r\n- Telegram Group: http://t.me/linux_repo [Chat]\r\n\r\n![Screenshot](https://github.com/AbirHasan2005/OPRecon/blob/master/capture.png)\r\n\r\n## How to use:\r\n- Compatible with:\r\n\t- Linux(Desktop)\r\n\t- Termux(Android)\r\n- Requirements:\r\n\t- Python3\r\n\t- pip3\r\n\t- Git\r\n- pip packages:\r\n\t- termcolor\r\n\t- colorama\r\n\t- requests\r\n\t- bs4\r\n\t- html5lib\r\n\t- phonenumbers\r\n\t- argparse\r\n\t- urllib3\r\n- Commands:\r\n```\r\ngit clone https://github.com/AbirHasan2005/OPRecon\r\ncd OPRecon\r\npython3 -m pip install -r requirements.txt\r\nchmod +x *\r\nbash run.sh\r\n```\r\n\r\n[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://paypal.me/AbirHasan2005)"
  },
  {
    "path": "files/RESOURCES.md",
    "content": "### Inderstanding phone numbers\r\n\r\n    http://whitepages.fr/phonesystem/\r\n    https://support.twilio.com/hc/en-us/articles/223183008-Formatting-International-Phone-Numbers\r\n    https://en.wikipedia.org/wiki/National_conventions_for_writing_telephone_numbers\r\n\r\n### Open data\r\n\r\n    https://api.ovh.com/console/#/telephony\r\n    https://countrycode.org/\r\n    http://www.countryareacode.net/en/\r\n    http://directory.didww.com/area-prefixes\r\n    http://hs3x.com/\r\n    http://www.numinfo.net/\r\n\r\n# Data sources\r\n\r\nBoth free and premium resources are included. Be careful, the listing of a data source here does not mean it has been verified or is used in the tool. Data might be false. Use it as an OSINT framework.\r\n\r\n### Reputation / fraud\r\n\r\n    scamcallfighters.com\r\n    signal-arnaques.com\r\n    \r\n### Disposable numbers\r\n\r\n    receive-sms-online.com\r\n    receive-sms-now.com\r\n    hs3x.com\r\n    twilio.com\r\n    freesmsverification.com\r\n    freeonlinephone.org\r\n    sms-receive.net\r\n    smsreceivefree.com\r\n    receive-a-sms.com\r\n    receivefreesms.com\r\n    freephonenum.com\r\n    receive-smss.com\r\n    receivetxt.com\r\n    temp-mails.com\r\n    receive-sms.com\r\n    receivesmsonline.net\r\n    receivefreesms.com\r\n    sms-receive.net\r\n    pinger.com (=> textnow.com)\r\n    receive-a-sms.com\r\n    k7.net\r\n    kall8.com\r\n    faxaway.com\r\n    receivesmsonline.com\r\n    receive-sms-online.info\r\n    sellaite.com\r\n    getfreesmsnumber.com\r\n    smsreceiving.com\r\n    smstibo.com\r\n    catchsms.com\r\n    freesmscode.com\r\n    smsreceiveonline.com\r\n    smslisten.com\r\n    sms.sellaite.com\r\n    \r\n### Individuals\r\n\r\n    Facebook\r\n    True People\r\n    Fast People\r\n    Background Check\r\n    Pipl\r\n    Spytox\r\n    Makelia\r\n    IvyCall\r\n    PhoneSearch\r\n    411\r\n    USPhone\r\n    WP Plus\r\n    Thats Them\r\n    True Caller\r\n    Sync.me\r\n    WhoCallsMe\r\n    ZabaSearch\r\n    DexKnows\r\n    WeLeakInfo\r\n    OK Caller\r\n    SearchBug\r\n    numinfo.net\r\n    \r\n### Google dork examples\r\n\r\n    `insubject:\"+XXXXXXXXX\" | insubject:\"+XXXXX\" | insubject:\"XXXXX XXX XXX`\r\n    `insubject:\"XXXXXXXXX\" | intitle:\"XXXXXXXXX\"`\r\n    `intext:\"XXXXXXXXX\" ext:doc | ext:docx | ext:odt | ext:pdf | ext:rtf | ext:sxw | ext:psw | ext:ppt | ext:pptx | ext:pps | ext:csv | ext:txt | ext:html`\r\n    `site:\"hs3x.com\" intext:\"+XXXXXXXXX\"`\r\n    `site:signal-arnaques.com intext:\"XXXXXXXXX\" intitle:\" | Phone Fraud\"`\r\n"
  },
  {
    "path": "files/core/FileExporter.py",
    "content": "#!/usr/bin/env python3\r\n# encoding: UTF-8\r\n\r\n\"\"\"\r\n    This file is part of IPGeoLocation tool.\r\n    Copyright (C) 2015-2016 @maldevel\r\n    https://github.com/maldevel/IPGeoLocation\r\n    \r\n    IPGeoLocation - Retrieve IP Geolocation information \r\n    Powered by http://ip-api.com\r\n    \r\n    This program is free software: you can redistribute it and/or modify\r\n    it under the terms of the GNU General Public License as published by\r\n    the Free Software Foundation, either version 3 of the License, or\r\n    (at your option) any later version.\r\n\r\n    This program is distributed in the hope that it will be useful,\r\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r\n    GNU General Public License for more details.\r\n\r\n    You should have received a copy of the GNU General Public License\r\n    along with this program.  If not, see <http://www.gnu.org/licenses/>.\r\n    \r\n    For more see the file 'LICENSE' for copying permission.\r\n\"\"\"\r\n\r\n__author__ = 'maldevel'\r\n\r\nimport csv\r\nfrom xml.etree import ElementTree as etree\r\nfrom collections import OrderedDict\r\n\r\nclass FileExporter:\r\n    \r\n    def __init__(self):\r\n        pass\r\n    \r\n    def ExportListToCSV(self, ipGeoLocObjs, filename):\r\n        return self.__ExportToCSV(ipGeoLocObjs, filename)\r\n        \r\n    def ExportToCSV(self, ipGeoLocObj, filename):\r\n        return self.__ExportToCSV([ipGeoLocObj], filename)\r\n    \r\n    def ExportListToXML(self, ipGeoLocObjs, filename):\r\n        return self.__ExportToXML(ipGeoLocObjs, filename)\r\n    \r\n    def ExportToXML(self, ipGeoLocObj, filename):\r\n        return self.__ExportToXML([ipGeoLocObj], filename)\r\n\r\n    def ExportListToTXT(self, ipGeoLocObjs, filename):\r\n        return self.__ExportToTXT(ipGeoLocObjs, filename)\r\n        \r\n    def ExportToTXT(self, ipGeoLocObj, filename):\r\n        return self.__ExportToTXT([ipGeoLocObj], filename)\r\n    \r\n    def __ExportToTXT(self, ipGeoLocObjs, filename):\r\n        try:\r\n            with open(filename, 'w') as txtfile:\r\n                txtfile.write('Results IPGeolocation\\n')\r\n                for ipGeoLocObj in ipGeoLocObjs:\r\n                    if ipGeoLocObj:\r\n                        txtfile.write('Target: {}\\n'.format(ipGeoLocObj.Query))\r\n                        txtfile.write('IP: {}\\n'.format(ipGeoLocObj.IP))\r\n                        txtfile.write('ASN: {}\\n'.format(ipGeoLocObj.ASN))\r\n                        txtfile.write('City: {}\\n'.format(ipGeoLocObj.City))\r\n                        txtfile.write('Country: {}\\n'.format(ipGeoLocObj.Country))\r\n                        txtfile.write('Country Code: {}\\n'.format(ipGeoLocObj.CountryCode))\r\n                        txtfile.write('ISP: {}\\n'.format(ipGeoLocObj.ISP))\r\n                        txtfile.write('Latitude: {}\\n'.format(ipGeoLocObj.Latitude))\r\n                        txtfile.write('Longtitude: {}\\n'.format(ipGeoLocObj.Longtitude))\r\n                        txtfile.write('Organization: {}\\n'.format(ipGeoLocObj.Organization))\r\n                        txtfile.write('Region: {}\\n'.format(ipGeoLocObj.Region))\r\n                        txtfile.write('Region Name: {}\\n'.format(ipGeoLocObj.RegionName))\r\n                        txtfile.write('Timezone: {}\\n'.format(ipGeoLocObj.Timezone))\r\n                        txtfile.write('Zip: {}\\n'.format(ipGeoLocObj.Zip))\r\n                        txtfile.write('Google Maps: {}\\n'.format(ipGeoLocObj.GoogleMapsLink))\r\n                        txtfile.write('\\n')\r\n            return True\r\n        except:\r\n            return False\r\n        \r\n        \r\n    def __ExportToXML(self, ipGeoLocObjs, filename):\r\n        try:\r\n            root = etree.Element('Results')\r\n            \r\n            for ipGeoLocObj in ipGeoLocObjs:\r\n                if ipGeoLocObj:\r\n                    orderedData = OrderedDict(sorted(ipGeoLocObj.ToDict().items()))\r\n                    self.__add_items(etree.SubElement(root, 'IPGeolocation'),\r\n                      ((key.replace(' ', ''), value) for key, value in orderedData.items()))\r\n        \r\n                    tree = etree.ElementTree(root)\r\n\r\n            tree.write(filename, xml_declaration=True, encoding='utf-8')\r\n                        \r\n            return True\r\n        except:\r\n            return False\r\n        \r\n        \r\n    def __ExportToCSV(self, ipGeoLocObjs, filename):\r\n        try:\r\n            with open(filename, 'w', newline='') as csvfile:\r\n                writer = csv.writer(csvfile, delimiter=';', quoting=csv.QUOTE_MINIMAL)\r\n                writer.writerow(['Results', 'IPGeolocation'])\r\n                for ipGeoLocObj in ipGeoLocObjs:\r\n                    if ipGeoLocObj:\r\n                        writer.writerow(['Target', ipGeoLocObj.Query])\r\n                        writer.writerow(['IP', ipGeoLocObj.IP])\r\n                        writer.writerow(['ASN', ipGeoLocObj.ASN])\r\n                        writer.writerow(['City', ipGeoLocObj.City])\r\n                        writer.writerow(['Country', ipGeoLocObj.Country])\r\n                        writer.writerow(['Country Code', ipGeoLocObj.CountryCode])\r\n                        writer.writerow(['ISP', ipGeoLocObj.ISP])\r\n                        writer.writerow(['Latitude', ipGeoLocObj.Latitude])\r\n                        writer.writerow(['Longtitude', ipGeoLocObj.Longtitude])\r\n                        writer.writerow(['Organization', ipGeoLocObj.Organization])\r\n                        writer.writerow(['Region', ipGeoLocObj.Region])\r\n                        writer.writerow(['Region Name', ipGeoLocObj.RegionName])\r\n                        writer.writerow(['Timezone', ipGeoLocObj.Timezone])\r\n                        writer.writerow(['Zip', ipGeoLocObj.Zip])\r\n                        writer.writerow(['Google Maps', ipGeoLocObj.GoogleMapsLink])\r\n                        writer.writerow([])\r\n            return True\r\n        except:\r\n            return False\r\n        \r\n    \r\n    def __add_items(self, root, items):\r\n        for name, text in items:\r\n            elem = etree.SubElement(root, name)\r\n            elem.text = text\r\n\r\n"
  },
  {
    "path": "files/core/IpGeoLocation.py",
    "content": "#!/usr/bin/env python3\r\n# encoding: UTF-8\r\n\r\n\"\"\"\r\n    This file is part of IPGeoLocation tool.\r\n    Copyright (C) 2015-2016 @maldevel\r\n    https://github.com/maldevel/IPGeoLocation\r\n    \r\n    IPGeoLocation - Retrieve IP Geolocation information \r\n    Powered by http://ip-api.com\r\n    \r\n    This program is free software: you can redistribute it and/or modify\r\n    it under the terms of the GNU General Public License as published by\r\n    the Free Software Foundation, either version 3 of the License, or\r\n    (at your option) any later version.\r\n\r\n    This program is distributed in the hope that it will be useful,\r\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r\n    GNU General Public License for more details.\r\n\r\n    You should have received a copy of the GNU General Public License\r\n    along with this program.  If not, see <http://www.gnu.org/licenses/>.\r\n    \r\n    For more see the file 'LICENSE' for copying permission.\r\n\"\"\"\r\n\r\n__author__ = 'maldevel'\r\n\r\n\r\nclass IpGeoLocation:\r\n    \"\"\"Represents an IP Geolocation information object\"\"\"\r\n    \r\n    def __init__(self, query, jsonData = None):\r\n        self.Query = query\r\n        self.ASN = '-'\r\n        self.City = '-'\r\n        self.Country = '-'\r\n        self.CountryCode = '-'\r\n        self.ISP = '-'\r\n        self.Latitude = 0.0\r\n        self.Longtitude = 0.0\r\n        self.Organization = '-'\r\n        self.IP = '0.0.0.0'\r\n        self.Region = '-'\r\n        self.RegionName = '-'\r\n        self.Status = '-'\r\n        self.Timezone = '-'\r\n        self.Zip = '-'\r\n        self.GoogleMapsLink = ''\r\n        \r\n        if jsonData != None:\r\n            if type(jsonData) is dict:\r\n                if 'as' in jsonData: \r\n                    self.ASN = jsonData['as']\r\n                \r\n                if 'city' in jsonData:\r\n                    self.City = jsonData['city']\r\n                 \r\n                if 'country' in jsonData:\r\n                    self.Country = jsonData['country']\r\n                   \r\n                if 'countryCode' in jsonData:\r\n                    self.CountryCode = jsonData['countryCode']\r\n                   \r\n                if 'isp' in jsonData:\r\n                    self.ISP = jsonData['isp']\r\n                   \r\n                if 'lat' in jsonData:\r\n                    self.Latitude = jsonData['lat']\r\n                  \r\n                if 'lon' in jsonData:\r\n                    self.Longtitude = jsonData['lon']\r\n                  \r\n                if 'org' in jsonData:\r\n                    self.Organization = jsonData['org']\r\n                   \r\n                if 'query' in jsonData:\r\n                    self.IP = jsonData['query']\r\n                  \r\n                if 'region' in jsonData:\r\n                    self.Region = jsonData['region']\r\n                  \r\n                if 'regionName' in jsonData:\r\n                    self.RegionName = jsonData['regionName']\r\n                  \r\n                if 'status' in jsonData:\r\n                    self.Status = jsonData['status']\r\n                   \r\n                if 'timezone' in jsonData:\r\n                    self.Timezone = jsonData['timezone']\r\n                   \r\n                if 'zip' in jsonData:\r\n                    self.Zip = jsonData['zip']\r\n                \r\n                if type(self.Latitude) == float and type(self.Longtitude) == float: \r\n                    self.GoogleMapsLink = 'http://www.google.com/maps/place/{0},{1}/@{0},{1},16z'.format(self.Latitude, self.Longtitude)\r\n                    \r\n                    \r\n    def ToDict(self):\r\n        #self.__dict__.\r\n        return {'Target':self.Query, 'IP':self.IP, 'ASN':self.ASN, 'City':self.City, \r\n                    'Country':self.Country, 'Country Code':self.CountryCode, 'ISP':self.ISP, \r\n                    'Latitude':str(self.Latitude), 'Longtitude':str(self.Longtitude), \r\n                    'Organization':self.Organization, 'Region':self.Region, \r\n                    'Region Name':self.RegionName, 'Timezone':self.Timezone, \r\n                    'Zip':self.Zip, 'Google Maps':self.GoogleMapsLink\r\n                } "
  },
  {
    "path": "files/core/IpGeoLocationLib.py",
    "content": "#!/usr/bin/env python3\r\n# encoding: UTF-8\r\n\r\n\"\"\"\r\n    This file is part of IPGeoLocation tool.\r\n    Copyright (C) 2015-2016 @maldevel\r\n    https://github.com/maldevel/IPGeoLocation\r\n    \r\n    IPGeoLocation - Retrieve IP Geolocation information \r\n    Powered by http://ip-api.com\r\n    \r\n    This program is free software: you can redistribute it and/or modify\r\n    it under the terms of the GNU General Public License as published by\r\n    the Free Software Foundation, either version 3 of the License, or\r\n    (at your option) any later version.\r\n\r\n    This program is distributed in the hope that it will be useful,\r\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r\n    GNU General Public License for more details.\r\n\r\n    You should have received a copy of the GNU General Public License\r\n    along with this program.  If not, see <http://www.gnu.org/licenses/>.\r\n    \r\n    For more see the file 'LICENSE' for copying permission.\r\n\"\"\"\r\n\r\n__author__ = 'maldevel'\r\n\r\nfrom core.Utils import Utils\r\nimport json, random, os\r\nfrom core.MyExceptions import *\r\nfrom core.IpGeoLocation import IpGeoLocation\r\nfrom time import sleep\r\nfrom core.FileExporter import FileExporter\r\nfrom urllib.parse import urlparse\r\nfrom urllib import request \r\n\r\nclass IpGeoLocationLib:\r\n    \"\"\"Retrieve IP Geolocation information from http://ip-api.com\"\"\"\r\n    \r\n    def __init__(self, target, logger, noprint=False, nolog=False, verbose=False):    \r\n        self.URL = 'http://ip-api.com'\r\n        self.RequestURL = self.URL + '/json/{}'\r\n        self.BOLD = '\\033[1m'\r\n        self.Proxy = None\r\n        self.UserAgentFile = None\r\n        self.UserAgents = None\r\n        self.Proxies = None\r\n        self.TargetsFile = None\r\n        self.ProxiesFile = None\r\n        self.Targets = None\r\n        self.NoPrint = noprint\r\n        self.Target = target\r\n        self.Logger = logger\r\n        self.Utils = Utils(nolog, verbose)\r\n        \r\n    def GetInfo(self, userAgent, targetsFile=None, \r\n                userAgentFile=None, proxy=False, proxiesFile=None, \r\n                exportToCSVFile=None, exportToXMLFile=None, \r\n                exportToTXTFile=None, googleMaps=False):\r\n        \"\"\"Retrieve information\"\"\"\r\n        \r\n        self.UserAgent = userAgent\r\n        \r\n        try:\r\n            \r\n            #check proxies file and load it\r\n            if proxiesFile and os.path.isfile(proxiesFile) and os.access(proxiesFile, os.R_OK):\r\n                self.ProxiesFile = proxiesFile\r\n                self.Logger.Print('Loading Proxies from file {}..'.format(self.ProxiesFile))\r\n                self.__loadProxies()\r\n            \r\n            #check user-agent strings file and load it\r\n            if userAgentFile and os.path.isfile(userAgentFile) and os.access(userAgentFile, os.R_OK):\r\n                self.UserAgentFile = userAgentFile\r\n                self.Logger.Print('Loading User-Agent strings from file {}..'.format(self.UserAgentFile))\r\n                self.__loadUserAgents()\r\n            \r\n            #check targets file and load it\r\n            if targetsFile and os.path.isfile(targetsFile) and os.access(targetsFile, os.R_OK):\r\n                self.TargetsFile = targetsFile\r\n                self.Logger.Print('Loading targets from file {}..'.format(self.TargetsFile))\r\n                self.__loadTargets()\r\n\r\n            #check if proxy valid and configure connection\r\n            if proxy:\r\n                self.__configureProxy(proxy)\r\n            \r\n            \r\n            #retrieve information\r\n            results = None\r\n            if self.TargetsFile:\r\n                results = self.__retrieveGeolocations()\r\n            \r\n            else:\r\n                results = self.__retrieveGeolocation(self.Target)\r\n            \r\n            #export information\r\n            if exportToCSVFile and not os.path.exists(exportToCSVFile) and os.access(os.path.dirname(exportToCSVFile), os.W_OK):\r\n                self.__exportResultsToCSV(results, exportToCSVFile)\r\n                \r\n            if exportToXMLFile and not os.path.exists(exportToXMLFile) and os.access(os.path.dirname(exportToXMLFile), os.W_OK):\r\n                self.__exportResultsToXML(results, exportToXMLFile)\r\n                \r\n            if exportToTXTFile and not os.path.exists(exportToTXTFile) and os.access(os.path.dirname(exportToTXTFile), os.W_OK):\r\n                self.__exportResultsToTXT(results, exportToTXTFile)\r\n            \r\n            #open location in Google Maps with default browser\r\n            if googleMaps and type(results) is IpGeoLocation:\r\n                self.Utils.openLocationInGoogleMaps(results)\r\n                \r\n            return True\r\n        \r\n        except UserAgentFileEmptyError:\r\n            self.Logger.PrintError(\"User-Agent strings file is empty!\")\r\n        except InvalidTargetError:\r\n            self.Logger.PrintError('Please provide a valid Domain or IP address!')\r\n        except TargetsFileEmptyError:\r\n            self.Logger.PrintError('Targets file is empty!')\r\n        except UserAgentFileNotSpecifiedError:\r\n            self.Logger.PrintError('User-Agent strings file has not been provided!')\r\n        except TargetsFileNotSpecifiedError:\r\n            self.Logger.PrintError('Targets file has not been provided!')\r\n        except ProxyServerNotReachableError:\r\n            self.Logger.PrintError('Proxy server not reachable!')\r\n        except ProxiesFileNotSpecifiedError:\r\n            self.Logger.PrintError('Proxies file has not been provided!')\r\n        except ProxiesFileEmptyError:\r\n            self.Logger.PrintError('Proxies file is empty!')\r\n        except InvalidProxyUrlError:\r\n            self.Logger.PrintError('Proxy URL is not valid!')\r\n        except Exception as error:\r\n            self.Logger.PrintError('An unexpected error occurred {}!'.format(error))\r\n        \r\n        return False\r\n    \r\n    def __checkProxyUrl(self, url):\r\n        \"\"\"Check if proxy url is valid\"\"\"\r\n        url_checked = urlparse(url)\r\n        if (url_checked.scheme not in ('http', 'https')) | (url_checked.netloc == ''):\r\n            return False\r\n        return url_checked\r\n    \r\n    \r\n    def __configureProxy(self, proxy):\r\n        #proxy = self.__checkProxyUrl(proxy)\r\n        #if not proxy:\r\n        #    raise MyExceptions.InvalidProxyUrlError()\r\n        \r\n        self.Utils.checkProxyConn(self.URL, proxy.netloc)\r\n        self.Proxy = proxy\r\n        proxyHandler = request.ProxyHandler({'http':proxy.scheme + '://' + proxy.netloc})\r\n        opener = request.build_opener(proxyHandler)\r\n        request.install_opener(opener)\r\n        self.Logger.Print('Proxy ({}) has been configured.'.format(proxy.scheme + '://' + proxy.netloc))\r\n                \r\n                \r\n    def __exportResultsToCSV(self, objToExport, csvFile):\r\n        \"\"\"Export results to csv file\"\"\"\r\n        fileExporter = FileExporter()\r\n        self.Logger.Print('Saving results to {} CSV file.'.format(csvFile))\r\n        success = False\r\n        \r\n        if type(objToExport) is IpGeoLocation:\r\n            success = fileExporter.ExportToCSV(objToExport, csvFile)\r\n        elif type(objToExport) is list:\r\n            success = fileExporter.ExportListToCSV(objToExport, csvFile)\r\n        \r\n        if not success:\r\n            self.Logger.PrintError('Saving results to {} CSV file failed.'.format(csvFile))\r\n            \r\n    \r\n    def __exportResultsToXML(self, objToExport, xmlFile):\r\n        \"\"\"Export results to xml file\"\"\"\r\n        fileExporter = FileExporter()\r\n        self.Logger.Print('Saving results to {} XML file.'.format(xmlFile))\r\n        success = False\r\n        \r\n        if type(objToExport) is IpGeoLocation:\r\n            success = fileExporter.ExportToXML(objToExport, xmlFile)\r\n        elif type(objToExport) is list:\r\n            success = fileExporter.ExportListToXML(objToExport, xmlFile)\r\n        \r\n        if not success:\r\n            self.Logger.PrintError('Saving results to {} XML file failed.'.format(xmlFile))\r\n            \r\n            \r\n    def __exportResultsToTXT(self, objToExport, txtFile):\r\n        \"\"\"Export results to text file\"\"\"\r\n        fileExporter = FileExporter()\r\n        self.Logger.Print('Saving results to {} text file.'.format(txtFile))\r\n        success = False\r\n        \r\n        if type(objToExport) is IpGeoLocation:\r\n            success = fileExporter.ExportToTXT(objToExport, txtFile)\r\n        elif type(objToExport) is list:\r\n            success = fileExporter.ExportListToTXT(objToExport, txtFile)\r\n        \r\n        if not success:\r\n            self.Logger.PrintError('Saving results to {} text file failed.'.format(txtFile))\r\n            \r\n        \r\n    def __retrieveGeolocations (self):\r\n        \"\"\"Retrieve IP Geolocation for each target in the list\"\"\"\r\n        IpGeoLocObjs = []\r\n                    \r\n        for target in self.Targets:\r\n            IpGeoLocObjs.append(self.__retrieveGeolocation(target))\r\n            if len(self.Targets)>=150:\r\n                sleep(.500) #1/2 sec - ip-api will automatically ban any IP address doing over 150 requests per minute\r\n                \r\n        return IpGeoLocObjs\r\n        \r\n        \r\n    def __retrieveGeolocation(self, target):\r\n        \"\"\"Retrieve IP Geolocation for single target\"\"\"\r\n        \r\n        if not target:\r\n            query = 'My IP'\r\n            target=''\r\n            \r\n        elif self.Utils.isValidIPAddress(target):\r\n            query = target\r\n            \r\n        else:\r\n            ip = self.Utils.hostnameToIP(target)#domain?\r\n            if not ip:\r\n                raise InvalidTargetError()\r\n            \r\n            query = target\r\n            target = ip\r\n        \r\n        \r\n        #pick random user-agent string\r\n        if self.UserAgentFile:\r\n            self.__pickRandomUserAgent()\r\n            \r\n            \r\n        #pick random proxy connection\r\n        if self.ProxiesFile:\r\n            self.__pickRandomProxy()\r\n            \r\n        \r\n        self.Logger.Print('Retrieving {} Geolocation..'.format(query))\r\n        \r\n        req = request.Request(self.RequestURL.format(target), data=None, headers={\r\n          'User-Agent':self.UserAgent\r\n        })\r\n        \r\n        response = request.urlopen(req)\r\n        \r\n        if response.code == 200:\r\n            \r\n            self.Logger.Print('User-Agent used: {}'.format(self.UserAgent))\r\n            \r\n            encoding = response.headers.get_content_charset()\r\n            ipGeoLocObj = IpGeoLocation(query, json.loads(response.read().decode(encoding)))\r\n            \r\n            self.Logger.Print('Geolocation information has been retrieved for {}({}).'.format(query, ipGeoLocObj.IP))\r\n            \r\n            if not self.NoPrint:\r\n                self.Logger.PrintIPGeoLocation(ipGeoLocObj)\r\n                \r\n            return ipGeoLocObj\r\n\r\n        return False\r\n    \r\n    \r\n    def __loadProxies(self):\r\n        \"\"\"Load proxies from file\"\"\"\r\n        if not self.ProxiesFile:\r\n            raise ProxiesFileNotSpecifiedError()\r\n        \r\n        self.Proxies = [line.strip() for line in open(self.ProxiesFile, 'r') if line.strip()]\r\n        self.Logger.Print('{} Proxies loaded.'.format(len(self.Proxies)))\r\n                \r\n        if len(self.Proxies) == 0:\r\n            raise ProxiesFileEmptyError()\r\n        \r\n        \r\n    def __loadUserAgents(self):\r\n        \"\"\"Load user-agent strings from file\"\"\"\r\n        if not self.UserAgentFile:\r\n            raise UserAgentFileNotSpecifiedError()\r\n        \r\n        self.UserAgents = [line.strip() for line in open(self.UserAgentFile, 'r') if line.strip()]\r\n        self.Logger.Print('{} User-Agent strings loaded.'.format(len(self.UserAgents)))\r\n\r\n        if len(self.UserAgents) == 0:\r\n            raise UserAgentFileEmptyError()\r\n        \r\n        \r\n    def __loadTargets(self):\r\n        \"\"\"Load targets from file\"\"\"\r\n        if not self.TargetsFile:\r\n            raise TargetsFileNotSpecifiedError()\r\n        \r\n        self.Targets = [line.strip() for line in open(self.TargetsFile, 'r') if line.strip()]\r\n        self.Logger.Print('{} Targets loaded.'.format(len(self.Targets)))\r\n            \r\n        if len(self.Targets) == 0:\r\n            raise TargetsFileEmptyError()\r\n\r\n\r\n    def __pickRandomProxy(self):\r\n        \"\"\"Pick randomly a proxy from the list\"\"\"\r\n        if not self.Proxies or len(self.Proxies) == 0:\r\n            raise ProxiesFileEmptyError()\r\n        \r\n        self.__configureProxy(random.choice(self.Proxies))\r\n \r\n \r\n    def __pickRandomUserAgent(self):\r\n        \"\"\"Pick randomly a user-agent string from the list\"\"\"\r\n        if not self.UserAgents or len(self.UserAgents) == 0:\r\n            raise UserAgentFileEmptyError()\r\n        \r\n        self.UserAgent = random.choice(self.UserAgents)\r\n        \r\n"
  },
  {
    "path": "files/core/Logger.py",
    "content": "#!/usr/bin/env python3\r\n# encoding: UTF-8\r\n\r\n\"\"\"\r\n    This file is part of IPGeoLocation tool.\r\n    Copyright (C) 2015-2016 @maldevel\r\n    https://github.com/maldevel/IPGeoLocation\r\n    \r\n    IPGeoLocation - Retrieve IP Geolocation information \r\n    Powered by http://ip-api.com\r\n    \r\n    This program is free software: you can redistribute it and/or modify\r\n    it under the terms of the GNU General Public License as published by\r\n    the Free Software Foundation, either version 3 of the License, or\r\n    (at your option) any later version.\r\n\r\n    This program is distributed in the hope that it will be useful,\r\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r\n    GNU General Public License for more details.\r\n\r\n    You should have received a copy of the GNU General Public License\r\n    along with this program.  If not, see <http://www.gnu.org/licenses/>.\r\n    \r\n    For more see the file 'LICENSE' for copying permission.\r\n\"\"\"\r\n\r\n__author__ = 'maldevel'\r\n\r\nfrom datetime import datetime\r\nimport os\r\nfrom termcolor import colored\r\nfrom sys import platform as _platform\r\n\r\n\r\nif _platform == 'win32':\r\n    import colorama\r\n    colorama.init()\r\n\r\ndef Red(value):\r\n        return colored(value, 'red', attrs=['bold'])\r\n    \r\ndef Green(value):\r\n    return colored(value, 'green', attrs=['bold'])\r\n    \r\n          \r\nclass Logger:\r\n    \r\n    def __init__(self, nolog=False, verbose=False):\r\n        self.NoLog = nolog\r\n        self.Verbose = verbose\r\n        \r\n        \r\n    def WriteLog(self, messagetype, message):\r\n        filename = '{}.log'.format(datetime.strftime(datetime.now(), \"%Y%m%d\"))\r\n        path = os.path.join('.', 'logs', filename)\r\n        with open(path, 'a') as logFile:\r\n            logFile.write('[{}] {} - {}\\n'.format(messagetype, datetime.strftime(datetime.now(), \"%Y-%m-%d %H:%M:%S\"), message))\r\n              \r\n              \r\n    def PrintError(self, message):\r\n        \"\"\"Print/Log error message\"\"\"\r\n        if not self.NoLog:\r\n            self.WriteLog('ERROR', message)\r\n        \r\n        print('[{}] {}'.format(Red('ERROR'), message))\r\n    \r\n    \r\n    def PrintResult(self, title, value):\r\n        \"\"\"print result to terminal\"\"\"\r\n        print('{}: {}'.format(title, Green(value)))\r\n    \r\n    \r\n    def Print(self, message):\r\n        \"\"\"print/log info message\"\"\"\r\n        if not self.NoLog:\r\n            self.WriteLog('INFO', message)\r\n            \r\n        if self.Verbose:\r\n            print('[{}] {}'.format(Green('**'), message))\r\n    \r\n    \r\n    def PrintIPGeoLocation(self, ipGeoLocation):\r\n        \"\"\"print IP Geolocation information to terminal\"\"\"\r\n        self.PrintResult('\\nTarget', ipGeoLocation.Query)\r\n        self.PrintResult('IP', ipGeoLocation.IP)\r\n        self.PrintResult('ASN', ipGeoLocation.ASN)\r\n        self.PrintResult('City', ipGeoLocation.City)\r\n        self.PrintResult('Country', ipGeoLocation.Country)\r\n        self.PrintResult('Country Code', ipGeoLocation.CountryCode)\r\n        self.PrintResult('ISP', ipGeoLocation.ISP)\r\n        self.PrintResult('Latitude', str(ipGeoLocation.Latitude))\r\n        self.PrintResult('Longtitude', str(ipGeoLocation.Longtitude))\r\n        self.PrintResult('Organization', ipGeoLocation.Organization)\r\n        self.PrintResult('Region Code', ipGeoLocation.Region)\r\n        self.PrintResult('Region Name', ipGeoLocation.RegionName)\r\n        self.PrintResult('Timezone', ipGeoLocation.Timezone)\r\n        self.PrintResult('Zip Code', ipGeoLocation.Zip)\r\n        self.PrintResult('Google Maps', ipGeoLocation.GoogleMapsLink)\r\n        print()\r\n        #.encode('cp737', errors='replace').decode('cp737')\r\n    "
  },
  {
    "path": "files/core/Menu.py",
    "content": "#!/usr/bin/env python3\r\n# encoding: UTF-8\r\n\r\n\"\"\"\r\n    This file is part of IPGeoLocation tool.\r\n    Copyright (C) 2015-2016 @maldevel\r\n    https://github.com/maldevel/IPGeoLocation\r\n    \r\n    IPGeoLocation - Retrieve IP Geolocation information \r\n    Powered by http://ip-api.com\r\n    \r\n    This program is free software: you can redistribute it and/or modify\r\n    it under the terms of the GNU General Public License as published by\r\n    the Free Software Foundation, either version 3 of the License, or\r\n    (at your option) any later version.\r\n\r\n    This program is distributed in the hope that it will be useful,\r\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r\n    GNU General Public License for more details.\r\n\r\n    You should have received a copy of the GNU General Public License\r\n    along with this program.  If not, see <http://www.gnu.org/licenses/>.\r\n    \r\n    For more see the file 'LICENSE' for copying permission.\r\n\"\"\"\r\n\r\n__author__   = 'maldevel'\r\n__twitter__  = '@maldevel'\r\n__version__  = '2.0.4'\r\n__year__     = '2015-2016'\r\n\r\n\r\nfrom argparse import RawTextHelpFormatter\r\nimport argparse, os\r\nfrom urllib.parse import urlparse\r\nfrom core.Logger import Red\r\n\r\n\r\nbanner = \"\"\"\r\n{0} \r\n\r\n{1} Retrieve IP Geolocation information from ip-api.com\r\n{1} Copyright (c) {2} {3} ({4})\r\n{1} ip-api.com service will automatically ban any IP addresses doing over 150 requests per minute.\r\n\r\n\"\"\".format(Red('IPGeolocation ' + __version__), Red('--['), __year__, __author__, __twitter__)\r\n\r\n\r\ndef checkFileRead(filename):\r\n    \"\"\"Check if file exists and we have access to read it\"\"\"\r\n    if os.path.isfile(filename) and os.access(filename, os.R_OK):\r\n        return filename\r\n    else:\r\n        raise argparse.ArgumentTypeError(\"Invalid {} file (File does not exist, insufficient permissions or it's not a file).\".format(filename))\r\n\r\n\r\ndef checkFileWrite(filename):\r\n    \"\"\"Check if we can write to file\"\"\"\r\n    if os.path.isfile(filename):\r\n        raise argparse.ArgumentTypeError(\"File {} already exists.\".format(filename))\r\n    elif os.path.isdir(filename):\r\n        raise argparse.ArgumentTypeError(\"Folder provided. Please provide a file.\")\r\n    elif os.access(os.path.dirname(filename), os.W_OK):\r\n        return filename\r\n    else:\r\n        raise argparse.ArgumentTypeError(\"Unable to write to {} file (Insufficient permissions).\".format(filename))\r\n    \r\n    \r\ndef checkProxyUrl(url):\r\n    \"\"\"Check if proxy url is valid\"\"\"\r\n    url_checked = urlparse(url)\r\n    if (url_checked.scheme not in ('http', 'https')) | (url_checked.netloc == ''):\r\n        raise argparse.ArgumentTypeError('Invalid {} Proxy URL (example: http://127.0.0.1:8080).'.format(url))\r\n    return url_checked\r\n\r\n\r\nparser = argparse.ArgumentParser(description=banner, formatter_class=RawTextHelpFormatter)\r\n    \r\n#pick target/s\r\nparser.add_argument('-m', '--my-ip',  \r\n                    dest='myip',\r\n                    action='store_true', \r\n                    help='Get Geolocation info for my IP address.')\r\n\r\nparser.add_argument('-t', '--target',  \r\n                    help='IP Address or Domain to be analyzed.')\r\n\r\nparser.add_argument('-T', '--tlist', \r\n                    metavar='file',\r\n                    type=checkFileRead, \r\n                    help='A list of IPs/Domains targets, each target in new line.')\r\n\r\n\r\n#user-agent configuration\r\nparser.add_argument('-u', '--user-agent', \r\n                    metavar='User-Agent', \r\n                    dest='uagent',\r\n                    default='IP2GeoLocation {}'.format(__version__), \r\n                    help='Set the User-Agent request header (default: IP2GeoLocation {}).'.format(__version__))\r\n\r\nparser.add_argument('-U', '--ulist', \r\n                    metavar='file', \r\n                    type=checkFileRead, \r\n                    help='A list of User-Agent strings, each string in new line.')\r\n\r\n\r\n#misc options\r\nparser.add_argument('-g', \r\n                    action='store_true', \r\n                    help='Open IP location in Google maps with default browser.')\r\n\r\nparser.add_argument('--noprint', \r\n                    action='store_true', \r\n                    help='IPGeolocation will print IP Geolocation info to terminal. It is possible to tell IPGeolocation not to print results to terminal with this option.')\r\n\r\nparser.add_argument('-v', '--verbose', \r\n                    action='store_true', \r\n                    help='Enable verbose output.')\r\n\r\nparser.add_argument('--nolog', \r\n                    action='store_true', \r\n                    help='IPGeolocation will save a .log file. It is possible to tell IPGeolocation not to save those log files with this option.')\r\n\r\n\r\n#anonymity options\r\nparser.add_argument('-x', '--proxy', \r\n                    type=checkProxyUrl, \r\n                    help='Setup proxy server (example: http://127.0.0.1:8080)')\r\n\r\nparser.add_argument('-X', '--xlist', \r\n                    metavar='file', \r\n                    type=checkFileRead, \r\n                    help='A list of proxies, each proxy url in new line.')\r\n\r\n\r\n#export options\r\nparser.add_argument('-e', '--txt', \r\n                    metavar='file', \r\n                    type=checkFileWrite, \r\n                    help='Export results.')\r\n\r\nparser.add_argument('-ec', '--csv', \r\n                    metavar='file', \r\n                    type=checkFileWrite, \r\n                    help='Export results in CSV format.')\r\n\r\nparser.add_argument('-ex', '--xml', \r\n                    metavar='file', \r\n                    type=checkFileWrite, \r\n                    help='Export results in XML format.')\r\n\r\n\r\nargs = parser.parse_args()"
  },
  {
    "path": "files/core/MyExceptions.py",
    "content": "#!/usr/bin/env python3\r\n# encoding: UTF-8\r\n\r\n\"\"\"\r\n    This file is part of IPGeoLocation tool.\r\n    Copyright (C) 2015-2016 @maldevel\r\n    https://github.com/maldevel/IPGeoLocation\r\n    \r\n    IPGeoLocation - Retrieve IP Geolocation information \r\n    Powered by http://ip-api.com\r\n    \r\n    This program is free software: you can redistribute it and/or modify\r\n    it under the terms of the GNU General Public License as published by\r\n    the Free Software Foundation, either version 3 of the License, or\r\n    (at your option) any later version.\r\n\r\n    This program is distributed in the hope that it will be useful,\r\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r\n    GNU General Public License for more details.\r\n\r\n    You should have received a copy of the GNU General Public License\r\n    along with this program.  If not, see <http://www.gnu.org/licenses/>.\r\n    \r\n    For more see the file 'LICENSE' for copying permission.\r\n\"\"\"\r\n\r\n__author__ = 'maldevel'\r\n\r\n\r\nclass UserAgentFileEmptyError(Exception):\r\n    pass\r\n\r\nclass InvalidTargetError(Exception):\r\n    pass\r\n\r\nclass TargetsFileEmptyError(Exception):\r\n    pass\r\n\r\nclass TargetsFileNotSpecifiedError(Exception):\r\n    pass\r\n\r\nclass UserAgentFileNotSpecifiedError(Exception):\r\n    pass\r\n\r\nclass ProxyServerNotReachableError(Exception):\r\n    pass\r\n\r\nclass ProxiesFileNotSpecifiedError(Exception):\r\n    pass\r\n\r\nclass ProxiesFileEmptyError(Exception):\r\n    pass\r\n\r\nclass InvalidProxyUrlError(Exception):\r\n    pass"
  },
  {
    "path": "files/core/Utils.py",
    "content": "#!/usr/bin/env python3\r\n# encoding: UTF-8\r\n\r\n\"\"\"\r\n    This file is part of IPGeoLocation tool.\r\n    Copyright (C) 2015-2016 @maldevel\r\n    https://github.com/maldevel/IPGeoLocation\r\n    \r\n    IPGeoLocation - Retrieve IP Geolocation information \r\n    Powered by http://ip-api.com\r\n    \r\n    This program is free software: you can redistribute it and/or modify\r\n    it under the terms of the GNU General Public License as published by\r\n    the Free Software Foundation, either version 3 of the License, or\r\n    (at your option) any later version.\r\n\r\n    This program is distributed in the hope that it will be useful,\r\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r\n    GNU General Public License for more details.\r\n\r\n    You should have received a copy of the GNU General Public License\r\n    along with this program.  If not, see <http://www.gnu.org/licenses/>.\r\n    \r\n    For more see the file 'LICENSE' for copying permission.\r\n\"\"\"\r\n\r\n__author__ = 'maldevel'\r\n\r\nimport webbrowser, ipaddress, socket\r\nfrom sys import platform as _platform\r\nfrom subprocess import call\r\nfrom urllib import request\r\nfrom core import MyExceptions \r\nfrom core.Logger import Logger\r\n\r\nclass Utils:\r\n    \r\n    def __init__(self, nolog=False, verbose=False):    \r\n        self.Logger = Logger(nolog, verbose)\r\n        \r\n        \r\n    def openLocationInGoogleMaps(self, ipGeolObj):\r\n        \"\"\"Open IP Geolocation in Google Maps with default browser\"\"\"\r\n        if type(ipGeolObj.Longtitude) == float and type(ipGeolObj.Latitude) == float:\r\n            self.Logger.Print('Opening Geolocation in browser..')\r\n            \r\n            if _platform == 'cygwin':\r\n                call(['cygstart', ipGeolObj.GoogleMapsLink])\r\n                \r\n            elif _platform == 'win32' or _platform == 'linux' or _platform == 'linux2':\r\n                webbrowser.open(ipGeolObj.GoogleMapsLink)\r\n            \r\n            else:\r\n                self.Logger.PrintError('-g option is not available on your platform.')\r\n                \r\n                \r\n    def hostnameToIP(self, hostname):\r\n        \"\"\"Resolve hostname to IP address\"\"\"\r\n        try:\r\n            return socket.gethostbyname(hostname)\r\n        except:\r\n            return False\r\n    \r\n    \r\n    def isValidIPAddress(self, ip):\r\n        \"\"\"Check if ip is a valid IPv4/IPv6 address\"\"\"\r\n        try:\r\n            ipaddress.ip_address(ip)\r\n            return True\r\n        except:\r\n            return False\r\n    \r\n            \r\n    def checkProxyConn(self, url, proxy):\r\n        \"\"\"check proxy connectivity\"\"\"\r\n        check = True\r\n        self.Logger.Print('Testing proxy {} connectivity..'.format(proxy))\r\n    \r\n        try:\r\n            req = request.Request(url)\r\n            req.set_proxy(proxy, 'http')\r\n            request.urlopen(req)\r\n        except:\r\n            check = False\r\n        \r\n        if check == True:\r\n            self.Logger.Print('Proxy server is reachable.')\r\n        else:\r\n            raise MyExceptions.ProxyServerNotReachableError()\r\n            \r\n            "
  },
  {
    "path": "files/core/__init__.py",
    "content": "\"\"\"\r\n    This file is part of IPGeoLocation tool.\r\n    Copyright (C) 2015-2016 @maldevel\r\n    https://github.com/maldevel/IPGeoLocation\r\n    \r\n    IPGeoLocation - Retrieve IP Geolocation information \r\n    Powered by http://ip-api.com\r\n    \r\n    This program is free software: you can redistribute it and/or modify\r\n    it under the terms of the GNU General Public License as published by\r\n    the Free Software Foundation, either version 3 of the License, or\r\n    (at your option) any later version.\r\n\r\n    This program is distributed in the hope that it will be useful,\r\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r\n    GNU General Public License for more details.\r\n\r\n    You should have received a copy of the GNU General Public License\r\n    along with this program.  If not, see <http://www.gnu.org/licenses/>.\r\n    \r\n    For more see the file 'LICENSE' for copying permission.\r\n\"\"\"\r\n\r\n__author__ = 'maldevel'"
  },
  {
    "path": "files/examples/input.txt",
    "content": "+856 20 99 453 217\r\n+59172768361\r\n+32474123456\r\n+1 (541) 754-3010\r\n+86 591 2284 8571\r\n+7 496 4819375\r\n39172768361\r\n"
  },
  {
    "path": "files/ipgeolocation.py",
    "content": "#!/usr/bin/env python3\r\n# encoding: UTF-8\r\n\r\n\"\"\"\r\n    This file is part of IPGeoLocation tool.\r\n    Copyright (C) 2015-2016 @maldevel\r\n    https://github.com/maldevel/IPGeoLocation\r\n    \r\n    IPGeoLocation - Retrieve IP Geolocation information \r\n    Powered by http://ip-api.com\r\n    \r\n    This program is free software: you can redistribute it and/or modify\r\n    it under the terms of the GNU General Public License as published by\r\n    the Free Software Foundation, either version 3 of the License, or\r\n    (at your option) any later version.\r\n\r\n    This program is distributed in the hope that it will be useful,\r\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r\n    GNU General Public License for more details.\r\n\r\n    You should have received a copy of the GNU General Public License\r\n    along with this program.  If not, see <http://www.gnu.org/licenses/>.\r\n    \r\n    For more see the file 'LICENSE' for copying permission.\r\n\"\"\"\r\n\r\n__author__  = 'maldevel'\r\n\r\n\r\nimport sys, os\r\nfrom core.IpGeoLocationLib import IpGeoLocationLib\r\nfrom core.Logger import Logger\r\nfrom core.Menu import parser,args,banner\r\n    \r\ndef main():\r\n\r\n    # no args provided\r\n    if len(sys.argv) == 1:\r\n        parser.print_help()\r\n        sys.exit(1)\r\n    \r\n    logsDir = os.path.join(os.getcwd(), 'logs')\r\n    #resultsDir = os.path.join(os.getcwd(), 'results')\r\n    if not os.path.exists(logsDir):\r\n        os.mkdir(logsDir)\r\n    #if not os.path.exists(resultsDir):\r\n    #    os.mkdir(resultsDir)\r\n        \r\n    logger = Logger(args.nolog, args.verbose)\r\n    \r\n    #single target or multiple targets \r\n    if(args.target and args.tlist):\r\n        logger.PrintError(\"You can request Geolocation information either for a single target(-t) or a list of targets(-T). Not both!\", args.nolog)\r\n        sys.exit(2)\r\n        \r\n    #my ip address or single target\r\n    if(args.target and args.myip):\r\n        logger.PrintError(\"You can request Geolocation information either for a single target(-t) or your own IP address. Not both!\", args.nolog)\r\n        sys.exit(3)\r\n        \r\n    #multiple targets or my ip address\r\n    if(args.tlist and args.myip):\r\n        logger.PrintError(\"You can request Geolocation information either for a list of targets(-T) or your own IP address. Not both!\", args.nolog)\r\n        sys.exit(4)\r\n    \r\n    #single target and google maps only allowed\r\n    if(args.tlist and args.g):\r\n        logger.PrintError(\"Google maps location is working only with single targets.\", args.nolog)\r\n        sys.exit(5)\r\n    \r\n    #specify user-agent or random\r\n    if(args.uagent and args.ulist):\r\n        logger.PrintError(\"You can either specify a user-agent string or let IPGeolocation pick random user-agent strings for you from a file.\", args.nolog)\r\n        sys.exit(6)\r\n        \r\n    #specify proxy or random\r\n    if(args.proxy and args.xlist):\r\n        logger.PrintError(\"You can either specify a proxy or let IPGeolocation pick random proxy connections for you from a file.\", args.nolog)\r\n        sys.exit(7)\r\n        \r\n        \r\n    #init lib\r\n    ipGeoLocRequest = IpGeoLocationLib(args.target, logger, args.noprint)\r\n    \r\n    print(banner)\r\n    \r\n    #retrieve information\r\n    if not ipGeoLocRequest.GetInfo(args.uagent, args.tlist, \r\n                                     args.ulist, args.proxy, args.xlist,\r\n                                     args.csv, args.xml, args.txt, args.g):\r\n        logger.PrintError(\"Retrieving IP Geolocation information failed.\")\r\n        sys.exit(8)\r\n\r\n\r\nif __name__ == '__main__':\r\n    main()\r\n    "
  },
  {
    "path": "files/osint/disposable_num_providers.json",
    "content": "[\r\n  {\r\n    \"site\": \"hs3x.com\",\r\n    \"request\": \"site:\\\"hs3x.com\\\" intext:\\\"+$n\\\"\",\r\n    \"stop\": 1\r\n  },\r\n  {\r\n    \"site\": \"receive-sms-now.com\",\r\n    \"request\": \"site:\\\"receive-sms-now.com\\\" intext:\\\"$n\\\"\",\r\n    \"stop\": 1\r\n  },\r\n  {\r\n    \"site\": \"smslisten.com\",\r\n    \"request\": \"site:\\\"smslisten.com\\\" intext:\\\"$n\\\"\",\r\n    \"stop\": 1\r\n  },\r\n  {\r\n    \"site\": \"smsnumbersonline.com\",\r\n    \"request\": \"site:\\\"smsnumbersonline.com\\\" intext:\\\"+$n\\\"\",\r\n    \"stop\": 1\r\n  },\r\n  {\r\n    \"site\": \"freesmscode.com\",\r\n    \"request\": \"site:\\\"freesmscode.com\\\" intext:\\\"+$n\\\"\",\r\n    \"stop\": 1\r\n  },\r\n  {\r\n    \"site\": \"catchsms.com\",\r\n    \"request\": \"site:\\\"catchsms.com\\\" intext:\\\"+$n\\\"\",\r\n    \"stop\": 1\r\n  },\r\n  {\r\n    \"site\": \"smstibo.com\",\r\n    \"request\": \"site:\\\"smstibo.com\\\" intext:\\\"+$n\\\"\",\r\n    \"stop\": 1\r\n  },\r\n  {\r\n    \"site\": \"smsreceiving.com\",\r\n    \"request\": \"site:\\\"smsreceiving.com\\\" intext:\\\"+$n\\\"\",\r\n    \"stop\": 1\r\n  },\r\n  {\r\n    \"site\": \"getfreesmsnumber.com\",\r\n    \"request\": \"site:\\\"getfreesmsnumber.com\\\" intext:\\\"+$n\\\"\",\r\n    \"stop\": 1\r\n  },\r\n  {\r\n    \"site\": \"sellaite.com\",\r\n    \"request\": \"site:\\\"sellaite.com\\\" intext:\\\"+$n\\\"\",\r\n    \"stop\": 1\r\n  },\r\n  {\r\n    \"site\": \"receive-sms-online.info\",\r\n    \"request\": \"site:\\\"receive-sms-online.info\\\" intext:\\\"+$n\\\"\",\r\n    \"stop\": 1\r\n  },\r\n  {\r\n    \"site\": \"receivesmsonline.com\",\r\n    \"request\": \"site:\\\"receivesmsonline.com\\\" intext:\\\"+$n\\\"\",\r\n    \"stop\": 1\r\n  },\r\n  {\r\n    \"site\": \"receive-a-sms.com\",\r\n    \"request\": \"site:\\\"receive-a-sms.com\\\" intext:\\\"+$n\\\"\",\r\n    \"stop\": 1\r\n  },\r\n  {\r\n    \"site\": \"sms-receive.net\",\r\n    \"request\": \"site:\\\"sms-receive.net\\\" intext:\\\"+$n\\\"\",\r\n    \"stop\": 1\r\n  },\r\n  {\r\n    \"site\": \"receivefreesms.com\",\r\n    \"request\": \"site:\\\"receivefreesms.com\\\" intext:\\\"+$n\\\"\",\r\n    \"stop\": 1\r\n  },\r\n  {\r\n    \"site\": \"receive-sms.com\",\r\n    \"request\": \"site:\\\"receive-sms.com\\\" intext:\\\"+$n\\\"\",\r\n    \"stop\": 1\r\n  },\r\n  {\r\n    \"site\": \"receivetxt.com\",\r\n    \"request\": \"site:\\\"receivetxt.com\\\" $n\",\r\n    \"stop\": 1\r\n  },\r\n  {\r\n    \"site\": \"freephonenum.com\",\r\n    \"request\": \"site:\\\"freephonenum.com\\\" intext:\\\"$n\\\"\",\r\n    \"stop\": 1\r\n  },\r\n  {\r\n    \"site\": \"freesmsverification.com\",\r\n    \"request\": \"site:\\\"freesmsverification.com\\\" $n\",\r\n    \"stop\": 1\r\n  },\r\n  {\r\n    \"site\": \"receive-sms-online.com\",\r\n    \"request\": \"site:\\\"receive-sms-online.com\\\" intext:\\\"$n\\\"\",\r\n    \"stop\": 1\r\n  },\r\n  {\r\n    \"site\": \"smslive.co\",\r\n    \"request\": \"site:\\\"smslive.co\\\" intext:\\\"$n\\\"\",\r\n    \"stop\": 1\r\n  }\r\n]\r\n"
  },
  {
    "path": "files/osint/individuals.json",
    "content": "[\r\n  {\r\n    \"site\": \"numinfo.net\",\r\n    \"request\": \"site:\\\"numinfo.net\\\" intext:\\\"$n\\\" | intext:\\\"$i\\\"\",\r\n    \"dialCode\": null,\r\n    \"stop\": 2\r\n  },\r\n  {\r\n    \"site\": \"sync.me\",\r\n    \"request\": \"site:\\\"sync.me\\\" intext:\\\"$n\\\" | intext:\\\"$i\\\"\",\r\n    \"dialCode\": null,\r\n    \"stop\": 1\r\n  },\r\n  {\r\n    \"site\": \"whocallsyou.de\",\r\n    \"request\": \"site:\\\"whocallsyou.de\\\" intext:\\\"0$n\\\"\",\r\n    \"dialCode\": null,\r\n    \"stop\": 1\r\n  },\r\n  {\r\n    \"site\": \"pastebin.com\",\r\n    \"request\": \"site:\\\"pastebin.com\\\" intext:\\\"$n\\\" | intext:\\\"$i\\\"\",\r\n    \"dialCode\": null,\r\n    \"stop\": 5\r\n  },\r\n  {\r\n    \"site\": \"whycall.me\",\r\n    \"request\": \"site:\\\"whycall.me\\\" intext:\\\"$n\\\" | intext:\\\"$l\\\"\",\r\n    \"dialCode\": null,\r\n    \"stop\": 1\r\n  }\r\n]\r\n"
  },
  {
    "path": "files/osint/reputation.json",
    "content": "[\r\n  {\r\n    \"title\": \"reputation report on whosenumber.info\",\r\n    \"request\": \"site:\\\"whosenumber.info\\\" intext:\\\"$n\\\" intitle:\\\"who called\\\"\",\r\n    \"stop\": 1\r\n  },\r\n  {\r\n    \"title\": \"phone fraud footprints\",\r\n    \"request\": \"intitle:\\\"Phone Fraud\\\" intext:\\\"$n\\\" | intext:\\\"$i\\\"\",\r\n    \"stop\": 5\r\n  }\r\n]\r\n"
  },
  {
    "path": "files/osint/social_medias.json",
    "content": "[\r\n  {\r\n    \"site\": \"facebook.com\",\r\n    \"request\": \"site:\\\"facebook.com\\\" intext:\\\"$i\\\" | intext:\\\"$n\\\"\",\r\n    \"stop\": 5\r\n  },\r\n  {\r\n    \"site\": \"twitter.com\",\r\n    \"request\": \"site:\\\"twitter.com\\\" intext:\\\"$i\\\" | intext:\\\"$n\\\"\",\r\n    \"stop\": 5\r\n  },\r\n  {\r\n    \"site\": \"linkedin.com\",\r\n    \"request\": \"site:\\\"linkedin.com\\\" intext:\\\"$i\\\" | intext:\\\"$n\\\"\",\r\n    \"stop\": 5\r\n  },\r\n  {\r\n    \"site\": \"instagram.com\",\r\n    \"request\": \"site:\\\"instagram.com\\\" intext:\\\"$i\\\" | intext:\\\"$n\\\"\",\r\n    \"stop\": 5\r\n  }\r\n]\r\n"
  },
  {
    "path": "files/phoneinfoga.py",
    "content": "#!/usr/bin/env python3\r\n\r\n__version__ = 'v2.3.8-BETA'\r\n\r\ntry:\r\n    import sys\r\n    from colorama import Fore, Style\r\n    import atexit\r\n    import argparse\r\n    import random\r\nexcept KeyboardInterrupt:\r\n    print('[!] Exiting.')\r\n    sys.exit()\r\nexcept:\r\n    print('\\033[91m[!] Missing requirements.\\033[92m')\r\n    sys.exit()\r\n\r\ndef banner():\r\n    print(\"\\033[92m    ___ _                       _____        __                   \")\r\n    print(\"   / _ \\ |__   ___  _ __   ___  \\_   \\_ __  / _| ___   __ _  __ _ \")\r\n    print(\"  / /_)/ '_ \\ / _ \\| '_ \\ / _ \\  / /\\/ '_ \\| |_ / _ \\ / _` |/ _` |\")\r\n    print(\" / ___/| | | | (_) | | | |  __/\\/ /_ | | | |  _| (_) | (_| | (_| |\")\r\n    print(\" \\/    |_| |_|\\___/|_| |_|\\___\\____/ |_| |_|_|  \\___/ \\__, |\\__,_|\")\r\n    print(\"                                                      |___/       \")\r\n    print(\" PhoneInfoga version {}\".format(__version__))\r\n    print(\" Coded by Charon IV\")\r\n    print(\" Modified by @AbirHasan2005\")\r\n    print(\"\\n\")\r\n\r\nbanner()\r\n\r\nif sys.version_info[0] < 3:\r\n    print(\"\\033[1m\\033[93m(!) Please run the tool using Python 3\" + Style.RESET_ALL)\r\n    sys.exit()\r\n\r\nparser = argparse.ArgumentParser(description=\r\n    \"Advanced information gathering tool for phone numbers (https://github.com/sundowndev/PhoneInfoga) version {}\".format(__version__),\r\n                                 usage='%(prog)s -n <number> [options]')\r\n\r\nparser.add_argument('-n', '--number', metavar='number', type=str,\r\n                    help='The phone number to scan (E164 or international format)')\r\n\r\nparser.add_argument('-i', '--input', metavar=\"input_file\", type=argparse.FileType('r'),\r\n                    help='Phone number list to scan (one per line)')\r\n\r\nparser.add_argument('-o', '--output', metavar=\"output_file\", type=argparse.FileType('w'),\r\n                    help='Output to save scan results')\r\n\r\nparser.add_argument('-s', '--scanner', metavar=\"scanner\", default=\"all\", type=str,\r\n                    help='The scanner to use')\r\n\r\nparser.add_argument('--osint', action='store_true',\r\n                    help='Use OSINT reconnaissance')\r\n\r\nparser.add_argument('-u', '--update', action='store_true',\r\n                    help='Update the project(Not Working)')\r\n\r\nargs = parser.parse_args()\r\n\r\ndef resetColors():\r\n    if not args.output:\r\n        print(Style.RESET_ALL)\r\n\r\n# Reset text color at exit\r\natexit.register(resetColors)\r\n\r\n# If any param is passed, execute help command\r\nif not len(sys.argv) > 1:\r\n    parser.print_help()\r\n    sys.exit()\r\n\r\ntry:\r\n    import time\r\n    import hashlib\r\n    import json\r\n    import re\r\n    import requests\r\n    import urllib3\r\n    from bs4 import BeautifulSoup\r\n    import html5lib\r\n    import phonenumbers\r\n    from phonenumbers import carrier\r\n    from phonenumbers import geocoder\r\n    from phonenumbers import timezone\r\nexcept KeyboardInterrupt:\r\n    print('\\033[91m[!] Exiting.')\r\n    sys.exit()\r\nexcept:\r\n    print('\\033[91m[!] Missing requirements.\\033[92m')\r\n    sys.exit()\r\n\r\nrequests.packages.urllib3.disable_warnings()\r\nrequests.packages.urllib3.util.ssl_.DEFAULT_CIPHERS += 'HIGH:!DH:!aNULL'\r\ntry:\r\n    requests.packages.urllib3.contrib.pyopenssl.DEFAULT_SSL_CIPHER_LIST += 'HIGH:!DH:!aNULL'\r\nexcept AttributeError:\r\n    # no pyopenssl support used / needed / available\r\n    pass\r\n\r\nif args.update:\r\n    def download_file(url, target_path):\r\n        response = requests.get(url, stream=True)\r\n        handle = open(target_path, \"wb\")\r\n        for chunk in response.iter_content(chunk_size=512):\r\n            if chunk:  # filter out keep-alive new chunks\r\n                handle.write(chunk)\r\n\r\n    print('Updating PhoneInfoga...')\r\n    print('Actual version: {}'.format(__version__))\r\n\r\n    # Fetching last github tag\r\n    new_version = json.loads(requests.get('https://api.github.com/repos/sundowndev/PhoneInfoga/tags').content)[0]['name']\r\n    print('Last version: {}'.format(new_version))\r\n\r\n    osintFiles = ['disposable_num_providers.json', 'individuals.json', 'reputation.json', 'social_medias.json']\r\n\r\n    try:\r\n        print('[*] Updating OSINT files')\r\n\r\n        for file in osintFiles:\r\n            url = 'https://raw.githubusercontent.com/sundowndev/PhoneInfoga/master/osint/{}'.format(file)\r\n            output_directory = 'osint/{}'.format(file)\r\n            download_file(url, output_directory)\r\n\r\n        print('[*] Updating python script')\r\n\r\n        url = 'https://raw.githubusercontent.com/sundowndev/PhoneInfoga/master/phoneinfoga.py'\r\n        output_directory = 'phoneinfoga.py'\r\n        download_file(url, output_directory)\r\n    except:\r\n        print('Update failed. Try using git pull.')\r\n        sys.exit()\r\n\r\n    print('The tool was successfully updated.')\r\n    sys.exit()\r\n\r\nscanners = ['any', 'all', 'numverify', 'ovh']\r\n\r\nuagent = []\r\nuagent.append(\"Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0) Opera 12.14\")\r\nuagent.append(\"Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:26.0) Gecko/20100101 Firefox/26.0\")\r\nuagent.append(\"Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.3) Gecko/20090913 Firefox/3.5.3\")\r\nuagent.append(\"Mozilla/5.0 (Windows; U; Windows NT 6.1; en; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)\")\r\nuagent.append(\"Mozilla/5.0 (Windows NT 6.2) AppleWebKit/535.7 (KHTML, like Gecko) Comodo_Dragon/16.1.1.0 Chrome/16.0.912.63 Safari/535.7\")\r\nuagent.append(\"Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)\")\r\nuagent.append(\"Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.1) Gecko/20090718 Firefox/3.5.1\")\r\nuagent.append(\"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:63.0) Gecko/20100101 Firefox/63.0\")\r\n\r\nnumber = '' # Full number format\r\nlocalNumber = '' # Local number format\r\ninternationalNumber = '' # International numberformat\r\nnumberCountryCode = '' # Dial code; e.g:\"+33\"\r\nnumberCountry = '' # Country; e.g:France\r\n\r\ngoogleAbuseToken = ''\r\ncustomFormatting = ''\r\n\r\ndef search(req, stop):\r\n    global googleAbuseToken\r\n    global uagent\r\n\r\n    chosenUserAgent = random.choice(uagent)\r\n\r\n    s = requests.Session()\r\n    headers = {\r\n        'User-Agent': chosenUserAgent,\r\n        'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',\r\n        'Accept-Language': 'en-us,en;q=0.5',\r\n        'Accept-Encoding': 'gzip,deflate',\r\n        'Accept-Charset': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',\r\n        'Keep-Alive': '115',\r\n        'Connection': 'keep-alive',\r\n        'Cookie': 'Cookie: CGIC=Ij90ZXh0L2h0bWwsYXBwbGljYXRpb24veGh0bWwreG1sLGFwcGxpY2F0aW9uL3htbDtxPTAuOSwqLyo7cT0wLjg; CONSENT=YES+RE.fr+20150809-08-0; 1P_JAR=2018-11-28-14; NID=148=aSdSHJz71rufCokaUC93nH3H7lOb8E7BNezDWV-PyyiHTXqWK5Y5hsvj7IAzhZAK04-QNTXjYoLXVu_eiAJkiE46DlNn6JjjgCtY-7Fr0I4JaH-PZRb7WFgSTjiFqh0fw2cCWyN69DeP92dzMd572tQW2Z1gPwno3xuPrYC1T64wOud1DjZDhVAZkpk6UkBrU0PBcnLWL7YdL6IbEaCQlAI9BwaxoH_eywPVyS9V; SID=uAYeu3gT23GCz-ktdGInQuOSf-5SSzl3Plw11-CwsEYY0mqJLSiv7tFKeRpB_5iz8SH5lg.; HSID=AZmH_ctAfs0XbWOCJ; SSID=A0PcRJSylWIxJYTq_; APISID=HHB2bKfJ-2ZUL5-R/Ac0GK3qtM8EHkloNw; SAPISID=wQoxetHBpyo4pJKE/A2P6DUM9zGnStpIVt; SIDCC=ABtHo-EhFAa2AJrJIUgRGtRooWyVK0bAwiQ4UgDmKamfe88xOYBXM47FoL5oZaTxR3H-eOp7-rE; OTZ=4671861_52_52_123900_48_436380; OGPC=873035776-8:; OGP=-873035776:;'\r\n    }\r\n\r\n    try:\r\n        URL = 'https://www.google.com/search?tbs=li:1&q={}&amp;gws_rd=ssl'.format(req)\r\n        r = s.get(URL + googleAbuseToken, headers=headers)\r\n\r\n        while r.status_code == 503:\r\n            print(code_warning + 'You are temporary blacklisted from Google search. Complete the captcha at the following URL and copy/paste the content of GOOGLE_ABUSE_EXEMPTION cookie : {}'.format(URL))\r\n            print('\\n' + code_info + 'Need help ? Read https://github.com/sundowndev/PhoneInfoga#dealing-with-google-captcha')\r\n            token = input('\\nGOOGLE_ABUSE_EXEMPTION=')\r\n            googleAbuseToken = '&google_abuse=' + token\r\n            r = s.get(URL + googleAbuseToken, headers=headers)\r\n\r\n        soup = BeautifulSoup(r.content, 'html.parser')\r\n        results = soup.find(\"div\", id=\"search\").find_all(\"div\", class_=\"g\")\r\n\r\n        links = []\r\n        counter = 0\r\n\r\n        for result in results:\r\n            counter += 1\r\n\r\n            if int(counter) > int(stop):\r\n                break\r\n\r\n            url = result.find(\"a\").get('href')\r\n            url = re.sub(r'(?:\\/url\\?q\\=)', '', url)\r\n            url = re.sub(r'(?:\\/url\\?url\\=)', '', url)\r\n            url = re.sub(r'(?:\\&sa\\=)(?:.*)', '', url)\r\n            url = re.sub(r'(?:\\&rct\\=)(?:.*)', '', url)\r\n\r\n            if re.match(r\"^(?:\\/search\\?q\\=)\", url) is not None:\r\n                url = 'https://google.com' + url\r\n\r\n            links.append(url)\r\n\r\n        return links\r\n    except:\r\n        print(code_error + 'Request failed. Please retry or open an issue on GitHub.')\r\n\r\ndef formatNumber(InputNumber):\r\n    return re.sub(\"(?:\\+)?(?:[^[0-9]*)\", \"\", InputNumber)\r\n\r\ndef localScan(InputNumber):\r\n    global number\r\n    global localNumber\r\n    global internationalNumber\r\n    global numberCountryCode\r\n    global numberCountry\r\n\r\n    print(code_info + 'Running local scan ...')\r\n\r\n    FormattedPhoneNumber = \"+\" + formatNumber(InputNumber)\r\n\r\n    try:\r\n        PhoneNumberObject = phonenumbers.parse(FormattedPhoneNumber, None)\r\n    except:\r\n        return False\r\n    else:\r\n        if not phonenumbers.is_valid_number(PhoneNumberObject):\r\n            return False\r\n\r\n        number = phonenumbers.format_number(PhoneNumberObject, phonenumbers.PhoneNumberFormat.E164).replace('+', '')\r\n        numberCountryCode = phonenumbers.format_number(PhoneNumberObject, phonenumbers.PhoneNumberFormat.INTERNATIONAL).split(' ')[0]\r\n\r\n        countryRequest = json.loads(requests.request('GET', 'https://restcountries.eu/rest/v2/callingcode/{}'.format(numberCountryCode.replace('+', ''))).content)\r\n        numberCountry = countryRequest[0]['alpha2Code']\r\n\r\n        localNumber = phonenumbers.format_number(PhoneNumberObject, phonenumbers.PhoneNumberFormat.E164).replace(numberCountryCode, '')\r\n        internationalNumber = phonenumbers.format_number(PhoneNumberObject, phonenumbers.PhoneNumberFormat.INTERNATIONAL)\r\n\r\n        print(code_result + 'International format: {}'.format(internationalNumber))\r\n        print(code_result + 'Local format: 0{}'.format(localNumber))\r\n        print(code_result + 'Country code: {}'.format(numberCountryCode))\r\n        print(code_result + 'Location: {}'.format(geocoder.description_for_number(PhoneNumberObject, \"en\")))\r\n        print(code_result + 'Carrier: {}'.format(carrier.name_for_number(PhoneNumberObject, 'en')))\r\n        print(code_result + 'Area: {}'.format(geocoder.description_for_number(PhoneNumberObject, 'en')))\r\n        for timezoneResult in timezone.time_zones_for_number(PhoneNumberObject):\r\n            print(code_result + 'Timezone: {}'.format(timezoneResult))\r\n\r\n        if phonenumbers.is_possible_number(PhoneNumberObject):\r\n            print(code_info + 'The number is valid and possible.')\r\n        else:\r\n            print(code_warning + 'The number is valid but might not be possible.')\r\n\r\ndef numverifyScan():\r\n    global number\r\n\r\n    if not args.scanner == 'numverify' and not args.scanner == 'all':\r\n        return -1\r\n\r\n    print(code_info + 'Running Numverify.com scan ...')\r\n\r\n    requestSecret = ''\r\n    resp = requests.get('https://numverify.com/')\r\n    soup = BeautifulSoup(resp.text, \"html5lib\")\r\n    for tag in soup.find_all(\"input\", type=\"hidden\"):\r\n        if tag['name'] == \"scl_request_secret\":\r\n            requestSecret = tag['value']\r\n            break\r\n\r\n    apiKey = hashlib.md5((number + requestSecret).encode('utf-8')).hexdigest()\r\n\r\n    headers = {\r\n        'host': \"numverify.com\",\r\n        'connection': \"keep-alive\",\r\n        'content-length': \"49\",\r\n        'accept': \"application/json\",\r\n        'origin': \"https://numverify.com\",\r\n        'x-requested-with': \"XMLHttpRequest\",\r\n        'user-agent': \"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36\",\r\n        'content-type': \"multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW\",\r\n        'referer': \"https://numverify.com/\",\r\n        'accept-encoding': \"gzip, deflate, br\",\r\n        'accept-language': \"en-US,en;q=0.9,fr;q=0.8,la;q=0.7,es;q=0.6,zh-CN;q=0.5,zh;q=0.4\",\r\n        'cache-control': \"no-cache\"\r\n    }\r\n\r\n    response = requests.request(\"GET\", \"https://numverify.com/php_helper_scripts/phone_api.php?secret_key={}&number={}\".format(apiKey, number), data=\"\", headers=headers)\r\n\r\n    if response.content == \"Unauthorized\" or response.status_code != 200:\r\n        print((code_error + \"An error occured while calling the API (bad request or wrong api key).\"))\r\n        return -1\r\n\r\n    data = json.loads(response.content)\r\n\r\n    if data[\"valid\"] == False:\r\n        print((code_error + \"Error: Please specify a valid phone number. Example: +6464806649\"))\r\n        sys.exit()\r\n\r\n    InternationalNumber = '({}){}'.format(data[\"country_prefix\"], data[\"local_format\"])\r\n\r\n    print((code_result + \"Number: ({}) {}\").format(data[\"country_prefix\"],data[\"local_format\"]))\r\n    print((code_result + \"Country: {} ({})\").format(data[\"country_name\"],data[\"country_code\"]))\r\n    print((code_result + \"Location: {}\").format(data[\"location\"]))\r\n    print((code_result + \"Carrier: {}\").format(data[\"carrier\"]))\r\n    print((code_result + \"Line type: {}\").format(data[\"line_type\"]))\r\n\r\n    if data[\"line_type\"] == 'landline':\r\n        print((code_warning + \"This is most likely a landline, but it can still be a fixed VoIP number.\"))\r\n    elif data[\"line_type\"] == 'mobile':\r\n        print((code_warning + \"This is most likely a mobile number, but it can still be a VoIP number.\"))\r\n\r\ndef ovhScan():\r\n    global localNumber\r\n    global numberCountry\r\n\r\n    if not args.scanner == 'ovh' and not args.scanner == 'all':\r\n        return -1\r\n\r\n    print(code_info + 'Running OVH scan...')\r\n\r\n    querystring = { \"country\": numberCountry.lower() }\r\n\r\n    headers = {\r\n        'accept': \"application/json\",\r\n        'cache-control': \"no-cache\"\r\n    }\r\n\r\n    response = requests.request(\"GET\", \"https://api.ovh.com/1.0/telephony/number/detailedZones\", data=\"\", headers=headers, params=querystring)\r\n\r\n    data = json.loads(response.content)\r\n\r\n    if isinstance(data, list):\r\n        askedNumber = \"0\" + localNumber.replace(localNumber[-4:], 'xxxx')\r\n\r\n        for voip_number in data:\r\n            if voip_number['number'] == askedNumber:\r\n                print((code_info + \"1 result found in OVH database\"))\r\n                print((code_result + \"Number range: {}\".format(voip_number['number'])))\r\n                print((code_result + \"City: {}\".format(voip_number['city'])))\r\n                print((code_result + \"Zip code: {}\".format(voip_number['zipCode'] if voip_number['zipCode'] is not None else '')))\r\n                askForExit()\r\n\r\ndef replaceVariables(string):\r\n    global number\r\n    global internationalNumber\r\n    global localNumber\r\n\r\n    string = string.replace('$n', number)\r\n    string = string.replace('$i', internationalNumber)\r\n    string = string.replace('$l', localNumber)\r\n\r\n    return string\r\n\r\ndef osintIndividualScan():\r\n    global number\r\n    global internationalNumber\r\n    global numberCountryCode\r\n    global customFormatting\r\n\r\n    dorks = json.load(open('osint/individuals.json'))\r\n\r\n    for dork in dorks:\r\n        if dork['dialCode'] is None or dork['dialCode'] == numberCountryCode:\r\n            if customFormatting:\r\n                dorkRequest = replaceVariables(dork['request']) + ' | intext:\"{}\"'.format(customFormatting)\r\n            else:\r\n                dorkRequest = replaceVariables(dork['request'])\r\n\r\n            print((code_info + \"Searching for footprints on {}...\".format(dork['site'])))\r\n            for result in search(dorkRequest, stop=dork['stop']):\r\n                if result:\r\n                    print((code_result + \"URL: \" + result))\r\n        else:\r\n            return -1\r\n\r\ndef osintReputationScan():\r\n    global number\r\n    global internationalNumber\r\n    global customFormatting\r\n\r\n    dorks = json.load(open('osint/reputation.json'))\r\n\r\n    for dork in dorks:\r\n        if customFormatting:\r\n            dorkRequest = replaceVariables(dork['request']) + ' | intext:\"{}\"'.format(customFormatting)\r\n        else:\r\n            dorkRequest = replaceVariables(dork['request'])\r\n\r\n        print((code_info + \"Searching for {}...\".format(dork['title'])))\r\n        for result in search(dorkRequest, stop=dork['stop']):\r\n            if result:\r\n                print((code_result + \"URL: \" + result))\r\n\r\ndef osintSocialMediaScan():\r\n    global number\r\n    global internationalNumber\r\n    global customFormatting\r\n\r\n    dorks = json.load(open('osint/social_medias.json'))\r\n\r\n    for dork in dorks:\r\n        if customFormatting:\r\n            dorkRequest = replaceVariables(dork['request']) + ' | intext:\"{}\"'.format(customFormatting)\r\n        else:\r\n            dorkRequest = replaceVariables(dork['request'])\r\n\r\n        print((code_info + \"Searching for footprints on {}...\".format(dork['site'])))\r\n        for result in search(dorkRequest, stop=dork['stop']):\r\n            if result:\r\n                print((code_result + \"URL: \" + result))\r\n\r\ndef osintDisposableNumScan():\r\n    global number\r\n\r\n    dorks = json.load(open('osint/disposable_num_providers.json'))\r\n\r\n    for dork in dorks:\r\n        dorkRequest = replaceVariables(dork['request'])\r\n\r\n        print((code_info + \"Searching for footprints on {}...\".format(dork['site'])))\r\n        for result in search(dorkRequest, stop=dork['stop']):\r\n            if result:\r\n                print((code_result + \"Result found: {}\".format(dork['site'])))\r\n                print((code_result + \"URL: \" + result))\r\n                askForExit()\r\n\r\ndef osintScan():\r\n    global number\r\n    global localNumber\r\n    global internationalNumber\r\n    global numberCountryCode\r\n    global numberCountry\r\n    global customFormatting\r\n\r\n    if not args.osint:\r\n        return -1\r\n\r\n    print(code_info + 'Running OSINT footprint reconnaissance ...')\r\n\r\n    # Whitepages\r\n    print((code_info + \"Generating scan URL on 411.com ...\"))\r\n    print(code_result + \"Scan URL: https://www.411.com/phone/{}\".format(internationalNumber.replace('+', '').replace(' ', '-')))\r\n\r\n    askingCustomPayload = input(code_info + 'Would you like to use an additional format for this number ? (y/N) ')\r\n\r\n    if askingCustomPayload == 'y' or askingCustomPayload == 'yes':\r\n        customFormatting = input(code_info + 'Custom format: ')\r\n\r\n    print((code_info + '---- Web pages footprints ----'))\r\n\r\n    print((code_info + \"Searching for footprints on web pages ... (limit=5)\"))\r\n    if customFormatting:\r\n        req = '{} | intext:\"{}\" | intext:\"{}\" | intext:\"{}\"'.format(number,number,internationalNumber,customFormatting)\r\n    else:\r\n        req = '{} | intext:\"{}\" | intext:\"{}\"'.format(number,number,internationalNumber)\r\n    for result in search(req, stop=5):\r\n        if result:\r\n            print((code_result + \"Result found: \" + result))\r\n\r\n    # Documents\r\n    print((code_info + \"Searching for documents ... (limit=10)\"))\r\n    if customFormatting:\r\n        req = 'intext:\"{}\" | intext:\"{}\" | intext:\"{}\" ext:doc | ext:docx | ext:odt | ext:pdf | ext:rtf | ext:sxw | ext:psw | ext:ppt | ext:pptx | ext:pps | ext:csv | ext:txt'.format(number,internationalNumber,customFormatting)\r\n    else:\r\n        req = 'intext:\"{}\" | intext:\"{}\" ext:doc | ext:docx | ext:odt | ext:pdf | ext:rtf | ext:sxw | ext:psw | ext:ppt | ext:pptx | ext:pps | ext:csv | ext:txt'.format(number,internationalNumber)\r\n    for result in search('intext:\"{}\" | intext:\"{}\" ext:doc | ext:docx | ext:odt | ext:pdf | ext:rtf | ext:sxw | ext:psw | ext:ppt | ext:pptx | ext:pps | ext:csv | ext:txt'.format(number,internationalNumber), stop=10):\r\n        if result:\r\n            print((code_result + \"Result found: \" + result))\r\n\r\n    print((code_info + '---- Reputation footprints ----'))\r\n\r\n    osintReputationScan()\r\n\r\n    print((code_info + \"Generating URL on scamcallfighters.com ...\"))\r\n    print(code_result + 'http://www.scamcallfighters.com/search-phone-{}.html'.format(number))\r\n\r\n    tmpNumAsk = input(code_info + \"Would you like to search for temporary number providers footprints ? (Y/n) \")\r\n\r\n    if tmpNumAsk.lower() != 'n' and tmpNumAsk.lower() != 'no':\r\n        print((code_info + '---- Temporary number providers footprints ----'))\r\n\r\n        print((code_info + \"Searching for phone number on tempophone.com...\"))\r\n        response = requests.request(\"GET\", \"https://tempophone.com/api/v1/phones\")\r\n        data = json.loads(response.content)\r\n        for voip_number in data['objects']:\r\n            if voip_number['phone'] == formatNumber(number):\r\n                print((code_result + \"Found a temporary number provider: tempophone.com\"))\r\n                askForExit()\r\n\r\n        osintDisposableNumScan()\r\n\r\n    print((code_info + '---- Social media footprints ----'))\r\n\r\n    osintSocialMediaScan()\r\n\r\n    print((code_info + '---- Phone books footprints ----'))\r\n\r\n    if numberCountryCode == '+1':\r\n        print((code_info + \"Generating URL on True People ... \"))\r\n        print(code_result + 'https://www.truepeoplesearch.com/results?phoneno={}'.format(internationalNumber.replace(' ', '')))\r\n\r\n    osintIndividualScan()\r\n\r\ndef askForExit():\r\n    if not args.output:\r\n        user_input = input(code_info + \"Continue scanning ? (y/n) \")\r\n\r\n        if user_input.lower() == 'y' or user_input.lower() == 'yes':\r\n            return -1\r\n        else:\r\n            print(code_info + \"Good bye!\")\r\n            sys.exit()\r\n\r\ndef scanNumber(InputNumber):\r\n    print(code_title + \"[!] ---- Fetching informations for {} ---- [!]\".format(formatNumber(InputNumber)))\r\n\r\n    localScan(InputNumber)\r\n\r\n    global number\r\n    global localNumber\r\n    global internationalNumber\r\n    global numberCountryCode\r\n    global numberCountry\r\n\r\n    if not number:\r\n        print((code_error + \"\\033[91mError: number {} is not valid.\\n\\033[92mFor help join Telegram Group:\\033[96m http://t.me/linux_repo\\n\\n\\033[91mSkipping ...\\033[92m\".format(formatNumber(InputNumber))))\r\n        sys.exit()\r\n\r\n    numverifyScan()\r\n    ovhScan()\r\n    osintScan()\r\n\r\n    print(code_info + \"Scan finished!\")\r\n\r\n    print('\\n' + Style.RESET_ALL)\r\n\r\ntry:\r\n    if args.output:\r\n        code_info = '[*] '\r\n        code_warning = '(!) '\r\n        code_result = '[+] '\r\n        code_error = '[!] '\r\n        code_title = ''\r\n\r\n        if args.osint:\r\n            print('\\033[91m[!] OSINT scanner is not available using output option (sorry).\\033[92m')\r\n            sys.exit()\r\n\r\n        sys.stdout = args.output\r\n        banner()\r\n    else:\r\n        code_info = Fore.RESET + Style.BRIGHT + '[*] '\r\n        code_warning = Fore.YELLOW + Style.BRIGHT + '(!) '\r\n        code_result = Fore.GREEN + Style.BRIGHT + '[+] '\r\n        code_error = Fore.RED + Style.BRIGHT + '[!] '\r\n        code_title = Fore.YELLOW + Style.BRIGHT\r\n\r\n    # Verify scanner option\r\n    if not args.scanner in scanners:\r\n        print((code_error + \"Error: scanner doesn't exists.\"))\r\n        sys.exit()\r\n\r\n    if args.number:\r\n        scanNumber(args.number)\r\n    elif args.input:\r\n        for line in args.input.readlines():\r\n            scanNumber(line)\r\n\r\n    if args.output:\r\n        args.output.close()\r\nexcept KeyboardInterrupt:\r\n    print((\"\\n\" + code_error + \"Scan interrupted. Good bye!\"))\r\n    sys.exit()\r\n"
  },
  {
    "path": "files/tracker.py",
    "content": "#!/usr/bin/python\r\n# -*- coding: utf-8 -*-\r\nimport sys\r\nimport requests\r\nimport json\r\nimport time\r\nimport urllib\r\nimport os\r\n\r\nclass color:\r\n   PURPLE = '\\033[95m'\r\n   CYAN = '\\033[96m'\r\n   DARKCYAN = '\\033[36m'\r\n   BLUE = '\\033[94m'\r\n   GREEN = '\\033[92m'\r\n   YELLOW = '\\033[93m'\r\n   RED = '\\033[91m'\r\n   BOLD = '\\033[1m'\r\n   UNDERLINE = '\\033[4m'\r\n   END = '\\033[0m'\r\n   HEADER = '\\033[95m'\r\n   OKBLUE = '\\033[94m'\r\n   OKGREEN = '\\033[92m'\r\n   WARNING = '\\033[93m'\r\n   FAIL = '\\033[91m'\r\n\r\nclass config:\r\n\tkey = \"2dfa8e4851add96619e675427cdb72f1\" #go to https://numverify.com/ and sign up if if get error. This API token is mine so after 100 use of this token this tool will not work. So you have to wait for next update or ask at my Telegram Group: http://t.me/linux_repo\r\n\r\ndef banner():\r\n\tos.system('clear')\r\n\tprint  (color.BLUE + \"\"\"\r\n████████╗██████╗  █████╗  ██████╗██╗  ██╗███████╗██████╗ \r\n╚══██╔══╝██╔══██╗██╔══██╗██╔════╝██║ ██╔╝██╔════╝██╔══██╗\r\n   ██║   ██████╔╝███████║██║     █████╔╝ █████╗  ██████╔╝\r\n   ██║   ██╔══██╗██╔══██║██║     ██╔═██╗ ██╔══╝  ██╔══██╗\r\n   ██║   ██║  ██║██║  ██║╚██████╗██║  ██╗███████╗██║  ██║\r\n   ╚═╝   ╚═╝  ╚═╝╚═╝  ╚═╝ ╚═════╝╚═╝  ╚═╝╚══════╝╚═╝  ╚═╝\r\n\tVersion: 1.6-DEV by @AbirHasan2005                 \r\n\t\"\"\" + color.END)\r\n\r\ndef main():\r\n\tbanner()\r\n\tif len(sys.argv) == 2:\r\n\t\tnumber = sys.argv[1]\r\n\t\tapi = \"http://apilayer.net/api/validate?access_key=\" + config.key + \"&number=\" + number + \"&country_code=&format=1\"\r\n\t\toutput = requests.get(api)\r\n\t\tcontent = output.text\r\n\t\tobj = json.loads(content)\r\n\t\tcountry_code = obj['country_code']\r\n\t\tcountry_name = obj['country_name']\r\n\t\tlocation = obj['location']\r\n\t\tcarrier = obj['carrier']\r\n\t\tline_type = obj['line_type']\r\n\r\n\t\tprint (color.BLUE + \"[+] \" + color.END + \"Phone number information gathering\")\r\n\t\tprint (\"--------------------------------------\")\r\n\t\ttime.sleep(0.2)\r\n\r\n\t\tif country_code == \"\":\r\n\t\t\tprint (\" - Getting Country\t\t[ \" + color.RED + \"FAILED \" + color.END + \"] \")\r\n\t\telse:\r\n\t\t\tprint (\" - Getting Country\t\t[ \" + color.GREEN + \"OK \" + color.END + \"]\")\r\n\r\n\t\ttime.sleep(0.2)\r\n\t\tif country_name == \"\":\r\n\t\t\tprint (\" - Getting Country Name\t\t[ \" + color.RED + \"FAILED \" + color.END + \"]\")\r\n\t\telse:\r\n\t\t\tprint (\" - Getting Country Name\t\t[ \" + color.GREEN + \"OK \" + color.END + \"]\")\r\n\r\n\t\ttime.sleep(0.2)\r\n\t\tif location == \"\":\r\n\t\t\tprint (\" - Getting Location\t\t[ \" + color.RED + \"FAILED \" + color.END + \"]\")\r\n\t\telse:\r\n\t\t\tprint (\" - Getting Location\t\t[ \" + color.GREEN + \"OK \" + color.END + \"]\")\r\n\r\n\t\ttime.sleep(0.2)\r\n\t\tif carrier == \"\":\r\n\t\t\tprint (\" - Getting Carrier\t\t[ \" + color.RED + \"FAILED \" + color.END + \"]\")\r\n\t\telse:\r\n\t\t\tprint (\" - Getting Carrier\t\t[ \" + color.GREEN + \"OK \" + color.END + \"]\")\r\n\r\n\t\ttime.sleep(0.2)\r\n\t\tif line_type == None:\r\n\t\t\tprint (\" - Getting Device\t\t[ \" + color.RED + \"FAILED \" + color.END + \"]\")\r\n\t\telse:\r\n\t\t\tprint (\" - Getting Device\t\t[ \" + color.GREEN + \"OK \" + color.END + \"]\")\r\n\r\n\t\tprint (\"\")\r\n\t\tprint (color.BLUE + \"[+] \" + color.END + \"Information Output\")\r\n\t\tprint (\"--------------------------------------\")\r\n\t\tprint (\" - Phone number: \" +str(number))\r\n\t\tprint (\" - Country: \" +str(country_code))\r\n\t\tprint (\" - Country Name: \" +str(country_name))\r\n\t\tprint (\" - Location: \" +str(location))\r\n\t\tprint (\" - Carrier: \" +str(carrier))\r\n\t\tprint (\" - Device: \" +str(line_type))\r\n\telse:\r\n\t\tprint (\"[TRACKER] Usage:\")\r\n\t\tprint (\"./%s <phone-number>\" % (sys.argv[0]))\r\n\t\tprint (\"./%s +13213707446\" % (sys.argv[0]))\r\n\r\nmain()"
  },
  {
    "path": "requirements.txt",
    "content": "termcolor\r\ncolorama\r\nrequests\r\nbs4\r\nhtml5lib\r\nphonenumbers\r\nargparse\r\nurllib3"
  },
  {
    "path": "run.sh",
    "content": "#!/bin/bash\n# This script was coded by @AbirHasan2005\n# Please give me credits if you us any codes from here.\n# Telegram Group: http://t.me/linux_repo\n# GitHub: https://github.com/AbirHasan2005\n# If you find any problem in this script than please report to my Telegram Group.\n\nclear\n\nbanner() {\nprintf \"\\n\\e[1;92m\"\nprintf \"\\n\\e[1;92m░█▀█░█▀█░█▀▄░█▀▀░█▀▀░█▀█░█▀█\"\nprintf \"\\n\\e[1;92m░█░█░█▀▀░█▀▄░█▀▀░█░░░█░█░█░█\"\nprintf \"\\n\\e[1;92m░▀▀▀░▀░░░▀░▀░▀▀▀░▀▀▀░▀▀▀░▀░▀  \\e[1;95mv1.8-BETA\\n\"\nprintf \"\\n\\e[1;92m   Coded by \\e[1;94m@AbirHasan2005\\n\\n\\e[1;92m\"\n}\ndependencies() {\ncommand -v git > /dev/null 2>&1 || { echo >&2 \"Package GIT is not installed ... Aborting ...\"; exit 1; }\ncommand -v python3 > /dev/null 2>&1 || { echo >&2 \"Package Python3 is not installed ... Aborting ...\"; exit 1; }\n}\nscript() {\nprintf \"\\n\\e[1;92m[\\e[1;93m01\\e[1;92m] Find information via phone number\\n[\\e[1;93m02\\e[1;92m] Find location via IP Address/Website Link\\n[\\e[1;93m03\\e[1;92m] Phone Number Tracker (Recommanded to find IP Address)\\n[\\e[1;93m04\\e[1;92m] Exit\"\nread -p $'\\n\\n\\e[1;92m[\\e[0m\\e[1;77m*\\e[0m\\e[1;92m]\\e[1;93m Choose an option: \\e[1;93m' option\n\nif [[ $option == 1 || $option == 01 ]]; then\n\tprintf \"\\n\\nEnter your phone number in international format ...\\n\"\n\tread -p $'\\n\\n\\e[1;92m[\\e[0m\\e[1;77m*\\e[0m\\e[1;92m]\\e[1;93m Enter Number: \\e[1;92m' optiona\n\n\tprintf \"\\n\\e[1;92m This process will take a few moments ...\\n\\n\\e[1;92m\"\n\tsleep 2.9\n\tpython3 files/phoneinfoga.py -n $optiona\n\tprintf \"\\n\\n\\e[1;92mNOTE: If you get any problem while using this tool than please report to\\nTelegram Group: \\e[1;96mhttp://t.me/linux_repo\\e[1;92m\\n\"\n\tscript\n\nelif [[ $option == 2 || $option == 02 ]]; then\n\tprintf \"\\n\\n\\e[1;92mEnter IP Address or website link to find location ...\\nExample: 198.235.36.25\\n         google.com   \\e[1;91m[Don't enter \\e[1;96mhttp://\\e[1;91m]\"\n\tread -p $'\\n\\n\\e[1;92m[\\e[0m\\e[1;77m*\\e[0m\\e[1;92m]\\e[1;93m Enter: \\e[1;92m' optionb\n\n\tprintf \"\\n\\e[1;92m Please wait ...\\n\\n\\e[1;92m\"\n\tsleep 3\n\tpython3 files/ipgeolocation.py -t $optionb\n\tprintf \"\\n\\n\\e[1;92mNOTE: If you get any problem while using this tool than please report to\\nTelegram Group: \\e[1;96mhttp://t.me/linux_repo\\e[1;92m\\n\"\n\tscript\n\nelif [[ $option == 3 || $option == 03 ]]; then\n\tprintf \"\\n\\nEnter your phone number in international format ...\\n\"\n\tread -p $'\\n\\n\\e[1;92m[\\e[0m\\e[1;77m*\\e[0m\\e[1;92m]\\e[1;93m Enter Number: \\e[1;92m' optionc\n\n\tpython3 files/tracker.py $optionc\n\tprintf \"\\n\\n\\e[1;92mNOTE: If you get any problem while using this tool than please report to\\nTelegram Group: \\e[1;96mhttp://t.me/linux_repo\\e[1;92m\\n\"\n\tscript\n\nelif [[ $option == 4 || $option == 04 ]]; then\n\tprintf \"\\n\\n\\e[1;92m Join Telegram Group for feedback:\\e[1;96m http://t.me/linux_repo\\e[1;92m\\n\"\n\texit 1\n\nelse\n\tprintf \"\\n\\n\\e[1;91mCommand not found!\\e[1;92m\\n\"\n\tprintf \"\\n\\n\\e[1;92mNOTE: If you get any problem while using this tool than please report to\\nTelegram Group: \\e[1;96mhttp://t.me/linux_repo\\e[1;92m\\n\"\n\nfi\n}\n\nbanner\ndependencies\nscript"
  },
  {
    "path": "update.sh",
    "content": "#!/bin/bash\n# Update Script for OPRecon v2.1-Stable\n# Script created by @AbirHasan2005\n\n\ndependencies() {\n\ncommand -v git > /dev/null 2>&1 || { echo >&2 \"Package GIT is not installed ... Unable to update ...\"; exit 1; }\n\n}\n\nscript() {\n\nclear\nprintf \"\\n \\e[1;92mUpdating \\e[1;94mOPRecon\\e[1;92m ...\\n\\n\"\nsleep 1.5\ncd ..\nrm -rf OPRecon\ngit clone https://github.com/AbirHasan2005/OPRecon\ncd OPRecon\nchmod +x run.sh\nprintf \"\\n\\e[1;92mRestarting ...\\n\\e[0m\"\nbash run.sh\ncd ..\n\n}\n\ndependencies\nscript\n\n"
  }
]