Ejemplo n.º 1
0
def main():

    # no args provided
    if len(sys.argv) == 1:
        parser.print_help()
        sys.exit(1)
    
    logsDir = os.path.join(os.getcwd(), 'logs')
    #resultsDir = os.path.join(os.getcwd(), 'results')
    if not os.path.exists(logsDir):
        os.mkdir(logsDir)
    #if not os.path.exists(resultsDir):
    #    os.mkdir(resultsDir)
        
    logger = Logger(args.nolog, args.verbose)
    
    #single target or multiple targets 
    if(args.target and args.tlist):
        logger.PrintError("You can request Geolocation information either for a single target(-t) or a list of targets(-T). Not both!", args.nolog)
        sys.exit(2)
        
    #my ip address or single target
    if(args.target and args.myip):
        logger.PrintError("You can request Geolocation information either for a single target(-t) or your own IP address. Not both!", args.nolog)
        sys.exit(3)
        
    #multiple targets or my ip address
    if(args.tlist and args.myip):
        logger.PrintError("You can request Geolocation information either for a list of targets(-T) or your own IP address. Not both!", args.nolog)
        sys.exit(4)
    
    #single target and google maps only allowed
    if(args.tlist and args.g):
        logger.PrintError("Google maps location is working only with single targets.", args.nolog)
        sys.exit(5)
    
    #specify user-agent or random
    if(args.uagent and args.ulist):
        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)
        sys.exit(6)
        
    #specify proxy or random
    if(args.proxy and args.xlist):
        logger.PrintError("You can either specify a proxy or let IPGeolocation pick random proxy connections for you from a file.", args.nolog)
        sys.exit(7)
        
        
    #init lib
    ipGeoLocRequest = IpGeoLocationLib(args.target, logger, args.noprint)
    
    print(banner)
    
    #retrieve information
    if not ipGeoLocRequest.GetInfo(args.uagent, args.tlist, 
                                     args.ulist, args.proxy, args.xlist,
                                     args.csv, args.xml, args.txt, args.g):
        logger.PrintError("Retrieving IP Geolocation information failed.")
        sys.exit(8)
Ejemplo n.º 2
0
def main():

    # no args provided
    if len(sys.argv) == 1:
        parser.print_help()
        sys.exit(1)
      
    #single target or multiple targets 
    if(args.target and args.tlist):
        PrintError("You can request Geolocation information either for a single target(-t) or a list of targets(-T). Not both!", args.nolog)
        sys.exit(2)
        
    #my ip address or single target
    if(args.target and args.myip):
        PrintError("You can request Geolocation information either for a single target(-t) or your own IP address. Not both!", args.nolog)
        sys.exit(3)
        
    #multiple targets or my ip address
    if(args.tlist and args.myip):
        PrintError("You can request Geolocation information either for a list of targets(-T) or your own IP address. Not both!", args.nolog)
        sys.exit(4)
    
    #single target and google maps only allowed
    if(args.tlist and args.g):
        PrintError("Google maps location is working only with single targets.", args.nolog)
        sys.exit(5)
    
    #specify user-agent or random
    if(args.uagent and args.ulist):
        PrintError("You can either specify a user-agent string or let IPGeolocation pick random user-agent strings for you from a file.", args.nolog)
        sys.exit(6)
        
    #specify proxy or random
    if(args.proxy and args.xlist):
        PrintError("You can either specify a proxy or let IPGeolocation pick random proxy connections for you from a file.", args.nolog)
        sys.exit(7)
        
        
    #init lib
    ipGeoLocRequest = IpGeoLocationLib(args.target, args.noprint, args.verbose, args.nolog)
    
    print(banner)
    
    #retrieve information
    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.", args.nolog)
        sys.exit(8)
Ejemplo n.º 3
0
from core.IpGeoLocationLib import IpGeoLocationLib

from core.Logger import Logger

from core.Menu import parser,args,banner

    

def main():


    # no args provided

    if len(sys.argv) == 1:

        parser.print_help()

        sys.exit(1)

    

    logsDir = os.path.join(os.getcwd(), 'logs')

    #resultsDir = os.path.join(os.getcwd(), 'results')

    if not os.path.exists(logsDir):

        os.mkdir(logsDir)

    #if not os.path.exists(resultsDir):
Ejemplo n.º 4
0
def main():

    # no args provided
    if len(sys.argv) == 1:
        parser.print_help()
        sys.exit(1)

    logsDir = os.path.join(os.getcwd(), 'logs')
    #resultsDir = os.path.join(os.getcwd(), 'results')
    if not os.path.exists(logsDir):
        os.mkdir(logsDir)
    #if not os.path.exists(resultsDir):
    #    os.mkdir(resultsDir)

    logger = Logger(args.nolog, args.verbose)

    #single target or multiple targets
    if (args.target and args.tlist):
        logger.PrintError(
            "Вы можете запросить геолокационную информацию либо для одной цели (- t), либо для списка целей(-T). Только не оба!",
            args.nolog)
        sys.exit(2)

    #my ip address or single target
    if (args.target and args.myip):
        logger.PrintError(
            "Вы можете запросить геолокационную информацию либо для одной цели (- t), либо для вашего собственного IP-адреса. Только не оба!",
            args.nolog)
        sys.exit(3)

    #multiple targets or my ip address
    if (args.tlist and args.myip):
        logger.PrintError(
            "Вы можете запросить геолокационную информацию либо для списка целей (- T), либо для вашего собственного IP-адреса. Только не оба!!",
            args.nolog)
        sys.exit(4)

    #single target and google maps only allowed
    if (args.tlist and args.g):
        logger.PrintError(
            "Google maps location работает только с одиночными целями.",
            args.nolog)
        sys.exit(5)

    #specify user-agent or random
    if (args.uagent and args.ulist):
        logger.PrintError(
            "Вы можете либо указать строку агента пользователя, либо позволить IPGeolocation выбрать случайные строки агента пользователя для вас из файла.",
            args.nolog)
        sys.exit(6)

    #specify proxy or random
    if (args.proxy and args.xlist):
        logger.PrintError(
            "Вы можете либо указать прокси-сервер, либо позволить IPGeolocation выбрать случайные прокси-соединения для вас из файла.",
            args.nolog)
        sys.exit(7)

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

    print(banner)

    #retrieve information
    if not ipGeoLocRequest.GetInfo(args.uagent, args.tlist, args.ulist,
                                   args.proxy, args.xlist, args.csv, args.xml,
                                   args.txt, args.g):
        logger.PrintError(
            "Не удалось получить информацию о геолокации IP-адресов.")
        sys.exit(8)
Ejemplo n.º 5
0
def main():


    # no args provided

    if len(sys.argv) == 1:

        parser.print_help()

        sys.exit(1)

    

    logsDir = os.path.join(os.getcwd(), 'logs')

    #resultsDir = os.path.join(os.getcwd(), 'results')

    if not os.path.exists(logsDir):

        os.mkdir(logsDir)

    #if not os.path.exists(resultsDir):

    # os.mkdir(resultsDir)

        

    logger = Logger(args.nolog, args.verbose)

    

    #single target or multiple targets 

    if(args.target and args.tlist):

        logger.PrintError("Anda dapat meminta informasi FCAlokasi untuk satu target (-t) atau daftar target (-T). Tidak keduanya! ", Args.nolog")

        sys.exit(2)

        

    #my ip address or single target

    if(args.target and args.myip):

        logger.PrintError("Anda dapat meminta informasi FCAlokasi untuk daftar target (-T) atau alamat IP Anda sendiri. Tidak keduanya! ", Args.nolog")

        sys.exit(3)

        

    #multiple targets or my ip address

    if(args.tlist and args.myip):

        logger.PrintError("Anda dapat meminta informasi FCAlokasi untuk daftar target (-T) atau alamat IP Anda sendiri. Tidak keduanya! ", Args.nolog")

        sys.exit(4)

    

    #single target and google maps only allowed

    if(args.tlist and args.g):

        logger.PrintError("Google maps location is working only with single targets.", args.nolog)

        sys.exit(5)

    

    #specify user-agent or random

    if(args.uagent and args.ulist):

        logger.PrintError("You can either specify a user-agent string or let IPFCAocation pick random user-agent strings for you from a file.", args.nolog)

        sys.exit(6)

        

    #specify proxy or random

    if(args.proxy and args.xlist):

        logger.PrintError("You can either specify a proxy or let FRI3NDS CYBER ARMY LACAK TOOLS pick random proxy connections for you from a file.", args.nolog)

        sys.exit(7)

        

        

    #init lib

    ipFCALocRequest = IPFCALocationLib(args.target, logger, args.noprint)

    

    print(banner)

    

    #retrieve information

    if not ipGeoLocRequest.GetInfo(args.uagent, args.tlist, 

                                     args.ulist, args.proxy, args.xlist,

                                     args.csv, args.xml, args.txt, args.g):

        logger.PrintError("Retrieving FRI3NDS CYBER ARMY LACAK TOOLS information failed.")

        sys.exit(8)