Exemplo n.º 1
0
input_mode_group.add_argument('-r',
                              '--repository',
                              type=str,
                              help='Repository name')
input_mode_group.add_argument('-u', '--user', type=str, help='User name')
parser.add_argument('-f',
                    '--full-domain',
                    action="store_true",
                    help='Use full domain')
parser.add_argument('-b',
                    '--banner',
                    action="store_true",
                    help="Print banner and exit")
argv = parser.parse_args()

engine = Engine()
input_wordlist = starter(argv)


def main():
    try:
        GitQueries = engine.return_query(input_wordlist, argv)
    except Exception as E:
        print(f"{Color.bad} Error: {E},{E.__class__} Exiting!")
        exit()
    for Query in GitQueries:
        print("{} Dorking Github using: {}".format(
            Color.information, colored(Query, color='cyan')))
        try:
            engine.search_orchestrator(Query)
        except Exception as E:
Exemplo n.º 2
0
from lib.PathFunctions import urler, unender, ender, unstarter

parser = ArgumentParser(description=colored("Mass hunt SSRF", color='yellow'), epilog=colored("Check your server logs", color='yellow'))
input_group = parser.add_mutually_exclusive_group()
server_group = parser.add_mutually_exclusive_group()
input_group.add_argument("---", "---", dest="stdin", action="store_true", help="Stdin")
input_group.add_argument("-w", "--wordlist", type=str, help="Absolute path to wordlist")
input_group.add_argument("-u", "--url", type=str, help="Url")
server_group.add_argument("-s", "--server", type=str, help="Server name")
server_group.add_argument("-a", "--auto", type=str, help="Server path")
parser.add_argument("-t", "--threads", type=int, help="No. of threads")
parser.add_argument("-b", "--banner", action="store_true", help="Print banner and exit")
argv = parser.parse_args()

input_wordlist = starter(argv)
Payloader = Engine()

def main():
    if argv.server:
        p = Payloader.generate_payloads(input_wordlist, urler(argv.server))
    elif argv.auto:
        if ',' in argv.auto:
            server_path, public_path = argv.auto.split(',')
            public_url = unender(ender(ngrok.connect(port = port), '/') + unstarter(public_path, '/'), '/')
        else:
            server_path = argv.auto
            public_url = unender(ngrok.connect(port = port), '/')
        system(f"(cd {server_path}; fuser -k {port}/tcp 1>/dev/null 2>/dev/null; php -S 0.0.0.0:{port} 1>/dev/null 2>/dev/null &)")
        p = Payloader.generate_payloads(input_wordlist, urler(public_url))
    with ThreadPoolExecutor(max_workers=argv.threads) as mapper:
        mapper.map(try_payload, p)
Exemplo n.º 3
0
from termcolor import colored
from traceback import print_exc
from re import search, IGNORECASE
from urllib.parse import urlparse

from lib.Engine import Engine
from lib.PathFunctions import urler, unurler, unender
from lib.Functions import manage_output, shannon_entropy
from lib.Globals import base64char, hexchar, dom_sources_regex, dom_sinks_regex
from lib.Globals import web_services_regex, custom_sensitive, custom_insensitive, Color
from lib.Globals import url_regex, subdomain_regex, path_regex, single_path_regex, library_regex

JSE = Engine()


class JSExtract:
    def __init__(self, argv):
        self.jstext_continuer = 0
        self.argv = argv

    def extract_from_url(self, url: str) -> bool:
        try:
            output_list = []
            jsurl = urler(url)
            parsed_url = urlparse(jsurl)
            print(
                f"{Color.information} Getting data from {colored(jsurl, color='yellow', attrs=['bold'])}"
            )
            output_list.append(
                (f"URL: {colored(jsurl, color='yellow', attrs=['bold'])}\n\n"))
            (lambda __after:
Exemplo n.º 4
0
                    '--wordlist',
                    type=str,
                    help='Absolute path to wordlist')
output_group.add_argument('-oD',
                          '--output-directory',
                          type=str,
                          help='Output directory')
output_group.add_argument('-o', '--output', type=str, help='Output file')
parser.add_argument('-b',
                    '--banner',
                    action="store_true",
                    help='Print banner and exit')
argv = parser.parse_args()

starter(argv)
GoEngine = Engine(argv.domain)
input_wordlist = (line.rstrip('\n') for line in open(argv.wordlist) if line)


def main():
    for line in input_wordlist:
        result = GoEngine.search(line)
        if argv.output_directory:
            output_directory_writer(argv.output_directory, argv.domain, result)
        if argv.output:
            output_writer(argv.output, result)


if __name__ == "__main__":
    main()