Ejemplo n.º 1
0
def loadModule(module_name):
    try:
        with open("config/parsers.json",'r') as file_module:
            config = file_module.read()
            module_json = json.loads(config)
        if module_name not in module_json.keys():
            os.system('cls' if os.name == 'nt' else 'clear')
            print(banner())
            if module_name is None:
                pass
            else:
                print('\n{RED}[!]{END} Module {YELLOW}\"%s\"{END} not found in module file.'.format(**colors) % module_name)
            print('\n{GREEN}[+]{END} Modules found:'.format(**colors))
            for modules in module_json.keys():
                print('    {GREEN}+{END} %s'.format(**colors) % modules)
            print('\n\n')
            sys.exit()
        else:
            return(module_json[module_name])
            
    except FileNotFoundError:
        os.system('cls' if os.name == 'nt' else 'clear')
        print(banner())
        print("\n{RED}[!]{END} Configuration file not found in {YELLOW}\"configs/\"{END}.".format(**colors))
        print("{RED}[!]{END} Please, get file {YELLOW}parsers.json{END} in {YELLOW}github.com/UnkL4b/GitMiner{END} and put in {YELLOW}\"configs/\"{END}\n\n".format(**colors))
        sys.exit()
Ejemplo n.º 2
0
def loadModule(module_name):
    try:
        with open("config/parsers.json", 'r') as file_module:
            config = file_module.read()
            module_json = json.loads(config)
        if module_name not in module_json.keys():
            os.system('cls' if os.name == 'nt' else 'clear')
            print(banner())
            if module_name is None:
                pass
            else:
                print(
                    '\n{RED}[!]{END} Module {YELLOW}\"%s\"{END} not found in module file.'
                    .format(**colors) % module_name)
            print('\n{GREEN}[+]{END} Modules found:'.format(**colors))
            for modules in module_json.keys():
                print('    {GREEN}+{END} %s'.format(**colors) % modules)
            print('\n\n')
            sys.exit()
        else:
            return (module_json[module_name])

    except FileNotFoundError:
        os.system('cls' if os.name == 'nt' else 'clear')
        print(banner())
        print(
            "\n{RED}[!]{END} Configuration file not found in {YELLOW}\"configs/\"{END}."
            .format(**colors))
        print(
            "{RED}[!]{END} Please, get file {YELLOW}parsers.json{END} in {YELLOW}github.com/UnkL4b/GitMiner{END} and put in {YELLOW}\"configs/\"{END}\n\n"
            .format(**colors))
        sys.exit()
Ejemplo n.º 3
0
 def __init__(self):
     self.description = bn.banner()
     parser = argparse.ArgumentParser(prog=self.description,
                                      usage='%(prog)s [options]')
     parser.add_argument(
         '-d',
         '--domain',
         nargs='?',
         metavar='{BLUE}\'example.com\'{FIM}'.format(**colors),
         type=str,
         required=True,
         help='{YELLOW}\'Specify your domain\'{FIM}'.format(**colors))
     self.args = parser.parse_args()
Ejemplo n.º 4
0
 def __init__(self):
     self.descricao = bn.banner()
     parser = argparse.ArgumentParser(self.descricao)
     parser.add_argument(
         '-q',
         '--query',
         metavar='{BLUE}\'filename:shadow path:etc\'{END}'.format(**colors),
         help='{YELLOW}Specify search term{END}'.format(**colors))
     parser.add_argument(
         '-m',
         '--module',
         metavar='{BLUE}wordpress{END}'.format(**colors),
         help='{YELLOW}Specify the search module{END}'.format(**colors),
         default=None)
     parser.add_argument('-l',
                         '--list',
                         help='{YELLOW}List modules{END}'.format(**colors),
                         action='store_true')
     parser.add_argument(
         '-o',
         '--output',
         metavar='{BLUE}result.txt{END}'.format(**colors),
         help='{YELLOW}Specify the output file where it will be saved{END}'.
         format(**colors),
         default=None)
     parser.add_argument(
         '-r',
         '--regex',
         metavar='{BLUE}\'/^\s*(.*?);?\s*$/gm\'{END}'.format(**colors),
         help='{YELLOW}Set regex to search in file{END}'.format(**colors),
         default=None)
     parser.add_argument('-c',
                         '--cookie',
                         metavar='{BLUE}cookie.txt{END}'.format(**colors),
                         default=None)
     self.url = "https://github.com"
     self.args = parser.parse_args()
     if self.args.list is True:
         loadModule(self.args.module)
     if self.args.query is None or self.args.cookie is None:
         os.system('cls' if os.name == 'nt' else 'clear')
         parser.print_help()
         exit()
     with open(self.args.cookie) as txt:
         for line in txt:
             self.cookie = headers.parseCookie(line)
     self.search_term = "/search?o=desc&q=%s&s=indexed&type=Code" % self.args.query
     self.config = None
     self.number_page = None
Ejemplo n.º 5
0
 def __init__(self):
     self.descricao = bn.banner()
     parser = argparse.ArgumentParser(self.descricao)
     parser.add_argument(
         '-q',
         '--query',
         metavar='{BLUE}\'filename:shadow path:etc\'{END}'.format(**colors),
         help='{YELLOW}Specify search term{END}'.format(**colors))
     parser.add_argument(
         '-m',
         '--module',
         metavar='{BLUE}wordpress{END}'.format(**colors),
         help='{YELLOW}Specify the search module{END}'.format(**colors),
         default=None)
     parser.add_argument(
         '-o',
         '--output',
         metavar='{BLUE}result.txt{END}'.format(**colors),
         help='{YELLOW}Specify the output file where it will be saved{END}'.
         format(**colors),
         default=None)
     parser.add_argument(
         '-r',
         '--regex',
         metavar='{BLUE}\'/^\s*(.*?);?\s*$/gm\'{END}'.format(**colors),
         help='{YELLOW}Set regex to search in file{END}'.format(**colors),
         default=None)
     parser.add_argument(
         '-c',
         '--cookie',
         metavar=
         '{BLUE}_octo=GH1.1.2098292984896.153133829439; _ga=GA1.2.36424941.153192375318; user_session=oZIxL2_ajeDplJSndfl37ddaLAEsR2l7myXiiI53STrfhqnaN; __Host-user_session_same_site=oXZxv9_ajeDplV0gAEsmyXiiI53STrfhDN; logged_in=yes; dotcom_user=unkl4b; tz=America%2FSao_Paulo; has_recent_activity=1; _gh_sess=MmxxOXBKQ1RId3NOVGpGcG54aEVnT1o0dGhxdGdzWVpySnFRd1dVYUk5TFZpZXFuTWxOdW1FK1IyM0pONjlzQWtZM2xtaFR3ZDdxlGMCsrWnBIdnhUN0tjVUtMYU1GeG5Pbm5DMThuWUFETnZjcllGOUNkRGUwNUtKOVJTaGR5eUJYamhWRE5XRnMWZZN3Y3dlpFNDZXL1NWUEN4c093RFhQd3RJQ1NBdmhrVDE3VVNiUFF3dHBycC9FeDZ3cFVXV0ZBdXZieUY5WDRlOE9ZSG5sNmRHUmllcmk0Up1MTcyTXZrN1RHYmJSdz09--434afdd652b37745f995ab55fc83{END}'
         .format(**colors),
         help='{YELLOW}Specify the cookie for your github{END}'.format(
             **colors),
         default=None)
     self.url = "https://github.com"
     self.args = parser.parse_args()
     if self.args.query is None or self.args.cookie is None:
         os.system('cls' if os.name == 'nt' else 'clear')
         parser.print_help()
         exit()
     self.cookie = headers.parseCookie(self.args.cookie)
     self.search_term = "/search?o=desc&q=%s&s=indexed&type=Code" % self.args.query
     self.config = None
     self.number_page = None
Ejemplo n.º 6
0
 def __init__(self):
     self.descricao = bn.banner()
     parser = argparse.ArgumentParser(self.descricao)
     parser.add_argument('-q','--query', metavar='{BLUE}\'filename:shadow path:etc\'{END}'.format(**colors), help='{YELLOW}Specify search term{END}'.format(**colors))
     parser.add_argument('-m','--module', metavar='{BLUE}wordpress{END}'.format(**colors), help='{YELLOW}Specify the search module{END}'.format(**colors), default=None)
     parser.add_argument('-o','--output', metavar='{BLUE}result.txt{END}'.format(**colors), help='{YELLOW}Specify the output file where it will be saved{END}'.format(**colors), default=None)
     parser.add_argument('-r', '--regex', metavar='{BLUE}\'/^\s*(.*?);?\s*$/gm\'{END}'.format(**colors), help='{YELLOW}Set regex to search in file{END}'.format(**colors), default=None)
     parser.add_argument('-c','--cookie', metavar='{BLUE}_octo=GH1.1.2098292984896.153133829439; _ga=GA1.2.36424941.153192375318; user_session=oZIxL2_ajeDplJSndfl37ddaLAEsR2l7myXiiI53STrfhqnaN; __Host-user_session_same_site=oXZxv9_ajeDplV0gAEsmyXiiI53STrfhDN; logged_in=yes; dotcom_user=unkl4b; tz=America%2FSao_Paulo; has_recent_activity=1; _gh_sess=MmxxOXBKQ1RId3NOVGpGcG54aEVnT1o0dGhxdGdzWVpySnFRd1dVYUk5TFZpZXFuTWxOdW1FK1IyM0pONjlzQWtZM2xtaFR3ZDdxlGMCsrWnBIdnhUN0tjVUtMYU1GeG5Pbm5DMThuWUFETnZjcllGOUNkRGUwNUtKOVJTaGR5eUJYamhWRE5XRnMWZZN3Y3dlpFNDZXL1NWUEN4c093RFhQd3RJQ1NBdmhrVDE3VVNiUFF3dHBycC9FeDZ3cFVXV0ZBdXZieUY5WDRlOE9ZSG5sNmRHUmllcmk0Up1MTcyTXZrN1RHYmJSdz09--434afdd652b37745f995ab55fc83{END}'.format(**colors), help='{YELLOW}Specify the cookie for your github{END}'.format(**colors), default=None)
     self.url = "https://github.com"
     self.args = parser.parse_args()
     if self.args.query is None or self.args.cookie is None:
         os.system('cls' if os.name == 'nt' else 'clear')
         parser.print_help()
         exit()
     self.cookie = headers.parseCookie(self.args.cookie)
     self.search_term = "/search?o=desc&q=%s&s=indexed&type=Code" % self.args.query
     self.config = None
     self.number_page = None
Ejemplo n.º 7
0
def start():

	descricao = ban.banner()
	print(descricao)

	iniciar = time.time()
	if __name__ == '__main__':
		alvo = input('Informe o alvo [127.0.0.1]: ')
		t_IP = gethostbyname(alvo)
		print('Iniciando varredura no alvo: {YELLOW}{}{END}'.format(t_IP, **colors))

		# Quantida de portas deve ser definida de 1-65535 dentro da range
		for i in range(21, 100):
			s = socket(AF_INET, SOCK_STREAM)

			conn = s.connect_ex((t_IP, i))
			if(conn == 0):
				print('Porta {}: {GREEN}ABERTA{END}'.format((i), **colors))
			s.close()
	print('Tempo total: {}'.format(time.time() - iniciar))
Ejemplo n.º 8
0
 def __init__(self):
     self.description = banana.banner()
     parser = argparse.ArgumentParser(
         description=
         'Simple tool to help you catch aws credentials, when dev falter - B4d C0d3',
         prog=self.description,
         usage='%(prog)s [ I want to play a game ] ')
     parser.add_argument(
         '-d',
         '--domain',
         nargs='?',
         metavar='{BLUE}example.com{FIM}'.format(**colors),
         type=str,
         help='{CYAN}{BOLD}Specify your domain{FIM}'.format(**colors))
     parser.add_argument(
         '-u',
         '--url',
         nargs='?',
         metavar='{BLUE}https://www.example.com{FIM}'.format(**colors),
         type=str,
         help='{CYAN}{BOLD}Specify a URL{FIM}'.format(**colors))
     self.args = parser.parse_args()
Ejemplo n.º 9
0
import os
from config import banner as arte
from config.banner import cores
from config.modulos import *

os.system('cls' if os == 'nt' else
          'clear')  # Limpa a tela considerando o sistema operacional

registros = []  # Realiza o armazenamento das informações
opcoes = 0  # op do menu

try:

    while (opcoes <= 6):

        descricao = arte.banner()
        print(descricao)

        print(
            '{amarelo}[1]{finale} - Modo de cadastro para adicionar um novo usuário.'
            .format(**cores))
        print(
            '{amarelo}[2]{finale} - Modo de busca, procura um usuário a partir do apelido inserido.'
            .format(**cores))
        print(
            '{amarelo}[3]{finale} - Exibir quantidade de usuários cadastrados.'
            .format(**cores))
        print(
            '{amarelo}[4]{finale} - Modo de exclusão, capaz de excluir um usuário.'
            .format(**cores))
        print('{amarelo}[5]{finale} - Nível de acesso no sistema'.format(