Ejemplo n.º 1
0

from argparse import RawTextHelpFormatter
import argparse, os
from urllib.parse import urlparse
from core.Logger import Red


banner = """
{0} 

{1} Retrieve IP Geolocation information from ip-api.com
{1} Copyright (c) {2} {3} ({4})
{1} ip-api.com service will automatically ban any IP addresses doing over 150 requests per minute.

""".format(Red('IPGeolocation ' + __version__), Red('--['), __year__, __author__, __twitter__)


def checkFileRead(filename):
    """Check if file exists and we have access to read it"""
    if os.path.isfile(filename) and os.access(filename, os.R_OK):
        return filename
    else:
        raise argparse.ArgumentTypeError("Invalid {} file (File does not exist, insufficient permissions or it's not a file).".format(filename))


def checkFileWrite(filename):
    """Check if we can write to file"""
    if os.path.isfile(filename):
        raise argparse.ArgumentTypeError("File {} already exists.".format(filename))
    elif os.path.isdir(filename):
Ejemplo n.º 2
0
    
"""

from argparse import RawTextHelpFormatter
import argparse, os
from urllib.parse import urlparse
from core.Logger import Red

banner = """
{0} 

{1} Retrieve IP Geolocation information from ip-api.com
{1} kopyright (c) {2} {3} ({4})
{1} ip-api.com service will automatically ban any IP addresses doing over 150 requests per minute.

""".format(Red('vaporwave ' + __version__), Red('--['), __author__,
           __twitter__)


def checkFileRead(filename):
    """Check if file exists and we have access to read it"""
    if os.path.isfile(filename) and os.access(filename, os.R_OK):
        return filename
    else:
        raise argparse.ArgumentTypeError(
            "Invalid {} file (File does not exist, insufficient permissions or it's not a file)."
            .format(filename))


def checkFileWrite(filename):
    """Check if we can write to file"""
Ejemplo n.º 3
0
__year__ = '2020-2021'
__made__ = 'Remake From MALDEVEL(ENGLISH) to Indonesia '

from argparse import RawTextHelpFormatter
import argparse, os
from urllib.parse import urlparse
from core.Logger import Red

banner = """
{0} 

{1} Retdapatkan informasi Geolokasi IP dari ip-api.com
{1} Copyright (c) {2} {3} ({4})
{1} Layanan ip-api.com akan secara otomatis mencekal alamat IP yang melakukan lebih dari 150 permintaan per menit.

""".format(Red('IPGeolocation ' + __version__), Red('--['), __year__,
           __author__, __twitter__, __made__)


def checkFileRead(filename):
    """Check if file exists and we have access to read it"""
    if os.path.isfile(filename) and os.access(filename, os.R_OK):
        return filename
    else:
        raise argparse.ArgumentTypeError(
            "Tidak Valid {} file (File tidak ada, izin tidak memadai atau bukan file)."
            .format(filename))


def checkFileWrite(filename):
    """Check if we can write to file"""
Ejemplo n.º 4
0
from core.Logger import Red
from core.Logger import Green

banner = """
{0} 

{1}                                                                      
{1}                            _____________                              
{1}    88888 _   _   _   _   _|             |_   _   _   _   _ 88888      
{1}    00000<_>-<_>-<_>-<_>-<_| D R O I D S |_>-<_>-<_>-<_>-<_>00000      
{1}    88888' `-' `-' `-' `-' |_____________| `-' `-' `-' `-' '88888      
{1}                                                                       



""".format(Red('LOOKUP IP ' + __version__), Red('--['), __year__, __author__)


def checkFileRead(filename):
    """Check if file exists and we have access to read it"""
    if os.path.isfile(filename) and os.access(filename, os.R_OK):
        return filename
    else:
        raise argparse.ArgumentTypeError(
            "Invalid {} file (File does not exist, insufficient permissions or it's not a file)."
            .format(filename))


def checkFileWrite(filename):
    """Check if we can write to file"""
    if os.path.isfile(filename):