Exemplo n.º 1
0
 def extend():
     if pyoptions.more:
         for _ in walks_all_files(paths.weblist_path):
             yield "".join(_)
         for _ in walks_all_files(paths.syslist_path):
             yield "".join(_)
     for _ in extend_enter(rawlist, leet=leet):
         yield "".join(_)
Exemplo n.º 2
0
def extend_magic(rawlist, need_passcratch=False):
    prefix = pystrs.EXTEND_prefix
    if rawlist == []:
        exit(pyoptions.CRLF +
             cool.red("[-] raw extend resource cannot be empty"))

    leet = pyoptions.extend_leet
    if need_passcratch:
        prefix = pystrs.PASSCRAPER_prefix
        leet = pyoptions.passcraper_leet
        rawstorepath = os.path.join(
            paths.results_path, "%s_%s%s" %
            (pystrs.SCFATCH_prefix, mybuildtime(), pyoptions.filextension))
        with open(rawstorepath, "a") as f:
            for line in rawlist:
                f.write(str(line) + pyoptions.CRLF)

    finalstorepath = os.path.join(
        paths.results_path,
        "%s_%s%s" % (prefix, mybuildtime(), pyoptions.filextension))
    with open(finalstorepath, "a") as f:
        if not pyoptions.args_pick:
            for _ in walks_all_files(paths.weblist_path):
                f.write(
                    pyoptions.operator.get(pyoptions.encode)(str(_) +
                                                             pyoptions.CRLF))
            if pyoptions.level <= 1:
                for _ in walks_all_files(paths.syslist_path):
                    f.write(
                        pyoptions.operator.get(
                            pyoptions.encode)(str(_) + pyoptions.CRLF))
            for _ in extend_enter(rawlist, leet=leet):
                f.write(
                    pyoptions.operator.get(pyoptions.encode)(str(_) +
                                                             pyoptions.CRLF))
        else:
            for _ in walks_all_files(paths.weblist_path):
                if pyoptions.minlen <= len(_) <= pyoptions.maxlen:
                    f.write(
                        pyoptions.operator.get(
                            pyoptions.encode)(str(_) + pyoptions.CRLF))
            if pyoptions.level <= 1:
                for _ in walks_all_files(paths.syslist_path):
                    if pyoptions.minlen <= len(_) <= pyoptions.maxlen:
                        f.write(
                            pyoptions.operator.get(
                                pyoptions.encode)(str(_) + pyoptions.CRLF))
            for _ in extend_enter(rawlist, leet=leet):
                if pyoptions.minlen <= len(_) <= pyoptions.maxlen:
                    f.write(
                        pyoptions.operator.get(
                            pyoptions.encode)(str(_) + pyoptions.CRLF))

    finishprinter(finishcounter(finalstorepath), finalstorepath)
Exemplo n.º 3
0
    def do_run(self, args):
        pystrs.startime = time.time()
        results = []
        storepath = os.path.join(
            paths.results_path, '%s_%s%s' %
            (pystrs.SEDB_prefix, mybuildtime(), pyoptions.filextension))
        with open(storepath, "a") as f:
            # SingleRule
            for single in SingleRule(pystrs.sedb_dict[pystrs.sedb_range[0]],
                                     pystrs.sedb_dict[pystrs.sedb_range[1]],
                                     pystrs.sedb_dict[pystrs.sedb_range[2]],
                                     pystrs.sedb_dict[pystrs.sedb_range[3]],
                                     pystrs.sedb_dict[pystrs.sedb_range[4]],
                                     pystrs.sedb_dict[pystrs.sedb_range[5]],
                                     pystrs.sedb_dict[pystrs.sedb_range[6]],
                                     pystrs.sedb_dict[pystrs.sedb_range[7]],
                                     pystrs.sedb_dict[pystrs.sedb_range[8]],
                                     pystrs.sedb_dict[pystrs.sedb_range[9]],
                                     pystrs.sedb_dict[pystrs.sedb_range[10]],
                                     pystrs.sedb_dict[pystrs.sedb_range[11]],
                                     pystrs.sedb_dict[pystrs.sedb_range[12]],
                                     pystrs.sedb_dict[pystrs.sedb_range[13]],
                                     pystrs.sedb_dict[pystrs.sedb_range[14]]):
                results.append(single)
            # SDrule
            for sd in SDrule(pystrs.sedb_dict[pystrs.sedb_range[0]],
                             pystrs.sedb_dict[pystrs.sedb_range[3]]):
                results.append(sd)
            for sd in SDrule(pystrs.sedb_dict[pystrs.sedb_range[0]],
                             pystrs.sedb_dict[pystrs.sedb_range[13]]):
                results.append(sd)
            # EB
            for eb in EB(pystrs.sedb_dict[pystrs.sedb_range[1]],
                         pystrs.sedb_dict[pystrs.sedb_range[3]]):
                results.append(eb)
            for eb in EB(pystrs.sedb_dict[pystrs.sedb_range[1]],
                         pystrs.sedb_dict[pystrs.sedb_range[13]]):
                results.append(eb)
            # Mailrule
            for mr in Mailrule(pystrs.sedb_dict[pystrs.sedb_range[8]],
                               pystrs.sedb_dict[pystrs.sedb_range[0]]):
                results.append(mr)
            for mr in Mailrule(pystrs.sedb_dict[pystrs.sedb_range[8]],
                               pystrs.sedb_dict[pystrs.sedb_range[1]]):
                results.append(mr)
            for mr in Mailrule(pystrs.sedb_dict[pystrs.sedb_range[8]],
                               pystrs.sedb_dict[pystrs.sedb_range[2]]):
                results.append(mr)
            for mr in Mailrule(pystrs.sedb_dict[pystrs.sedb_range[8]],
                               pystrs.sedb_dict[pystrs.sedb_range[4]]):
                results.append(mr)
            for mr in Mailrule(pystrs.sedb_dict[pystrs.sedb_range[8]],
                               pystrs.sedb_dict[pystrs.sedb_range[10]]):
                results.append(mr)
            for mr in Mailrule(pystrs.sedb_dict[pystrs.sedb_range[8]],
                               pystrs.sedb_dict[pystrs.sedb_range[14]]):
                results.append(mr)
            for mr in Mailrule(pystrs.sedb_dict[pystrs.sedb_range[8]],
                               pystrs.sedb_dict[pystrs.sedb_range[3]],
                               isstrs=False):
                results.append(mr)
            for mr in Mailrule(pystrs.sedb_dict[pystrs.sedb_range[8]],
                               pystrs.sedb_dict[pystrs.sedb_range[13]],
                               isstrs=False):
                results.append(mr)
            # NB
            for nn in NB(pystrs.sedb_dict[pystrs.sedb_range[10]],
                         pystrs.sedb_dict[pystrs.sedb_range[3]]):
                results.append(nn)
            for nn in NB(pystrs.sedb_dict[pystrs.sedb_range[10]],
                         pystrs.sedb_dict[pystrs.sedb_range[13]]):
                results.append(nn)

            # SB
            for sb in SB(pystrs.sedb_dict[pystrs.sedb_range[2]],
                         pystrs.sedb_dict[pystrs.sedb_range[3]]):
                results.append(sb)
            for sb in SB(pystrs.sedb_dict[pystrs.sedb_range[2]],
                         pystrs.sedb_dict[pystrs.sedb_range[13]]):
                results.append(sb)

            # NNrule
            for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[3]],
                             pystrs.sedb_dict[pystrs.sedb_range[5]]):
                results.append(nn)
            for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[3]],
                             pystrs.sedb_dict[pystrs.sedb_range[6]]):
                results.append(nn)
            for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[5]],
                             pystrs.sedb_dict[pystrs.sedb_range[13]]):
                results.append(nn)
            for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[6]],
                             pystrs.sedb_dict[pystrs.sedb_range[13]]):
                results.append(nn)
            for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[7]],
                             pystrs.sedb_dict[pystrs.sedb_range[13]]):
                results.append(nn)
            for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[9]],
                             pystrs.sedb_dict[pystrs.sedb_range[13]]):
                results.append(nn)
            for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[12]],
                             pystrs.sedb_dict[pystrs.sedb_range[13]]):
                results.append(nn)
            for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[3]],
                             pystrs.sedb_dict[pystrs.sedb_range[7]]):
                results.append(nn)
            for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[3]],
                             pystrs.sedb_dict[pystrs.sedb_range[9]]):
                results.append(nn)
            for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[3]],
                             pystrs.sedb_dict[pystrs.sedb_range[11]]):
                results.append(nn)
            for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[3]],
                             pystrs.sedb_dict[pystrs.sedb_range[12]]):
                results.append(nn)
            for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[3]],
                             pystrs.sedb_dict[pystrs.sedb_range[13]]):
                results.append(nn)

            # SNrule
            for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[4]],
                             pystrs.sedb_dict[pystrs.sedb_range[3]]):
                results.append(sn)
            for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[4]],
                             pystrs.sedb_dict[pystrs.sedb_range[5]]):
                results.append(sn)
            for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[4]],
                             pystrs.sedb_dict[pystrs.sedb_range[6]]):
                results.append(sn)
            for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[4]],
                             pystrs.sedb_dict[pystrs.sedb_range[7]]):
                results.append(sn)
            for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[4]],
                             pystrs.sedb_dict[pystrs.sedb_range[9]]):
                results.append(sn)
            for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[4]],
                             pystrs.sedb_dict[pystrs.sedb_range[11]]):
                results.append(sn)
            for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[4]],
                             pystrs.sedb_dict[pystrs.sedb_range[13]]):
                results.append(sn)

            for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[10]],
                             pystrs.sedb_dict[pystrs.sedb_range[3]]):
                results.append(sn)
            for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[10]],
                             pystrs.sedb_dict[pystrs.sedb_range[5]]):
                results.append(sn)
            for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[10]],
                             pystrs.sedb_dict[pystrs.sedb_range[6]]):
                results.append(sn)
            for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[10]],
                             pystrs.sedb_dict[pystrs.sedb_range[7]]):
                results.append(sn)
            for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[10]],
                             pystrs.sedb_dict[pystrs.sedb_range[9]]):
                results.append(sn)
            for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[10]],
                             pystrs.sedb_dict[pystrs.sedb_range[11]]):
                results.append(sn)
            for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[10]],
                             pystrs.sedb_dict[pystrs.sedb_range[13]]):
                results.append(sn)

            for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[14]],
                             pystrs.sedb_dict[pystrs.sedb_range[3]]):
                results.append(sn)
            for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[14]],
                             pystrs.sedb_dict[pystrs.sedb_range[5]]):
                results.append(sn)
            for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[14]],
                             pystrs.sedb_dict[pystrs.sedb_range[6]]):
                results.append(sn)
            for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[14]],
                             pystrs.sedb_dict[pystrs.sedb_range[7]]):
                results.append(sn)
            for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[14]],
                             pystrs.sedb_dict[pystrs.sedb_range[9]]):
                results.append(sn)
            for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[14]],
                             pystrs.sedb_dict[pystrs.sedb_range[11]]):
                results.append(sn)
            for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[14]],
                             pystrs.sedb_dict[pystrs.sedb_range[13]]):
                results.append(sn)

            # SSrule
            for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[0]],
                             pystrs.sedb_dict[pystrs.sedb_range[1]]):
                results.append(ss)
            for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[0]],
                             pystrs.sedb_dict[pystrs.sedb_range[4]]):
                results.append(ss)
            for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[0]],
                             pystrs.sedb_dict[pystrs.sedb_range[8]]):
                results.append(ss)
            for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[0]],
                             pystrs.sedb_dict[pystrs.sedb_range[10]]):
                results.append(ss)
            for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[0]],
                             pystrs.sedb_dict[pystrs.sedb_range[14]]):
                results.append(ss)
            for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[1]],
                             pystrs.sedb_dict[pystrs.sedb_range[4]]):
                results.append(ss)
            for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[1]],
                             pystrs.sedb_dict[pystrs.sedb_range[8]]):
                results.append(ss)
            for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[1]],
                             pystrs.sedb_dict[pystrs.sedb_range[10]]):
                results.append(ss)
            for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[1]],
                             pystrs.sedb_dict[pystrs.sedb_range[14]]):
                results.append(ss)
            for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[8]],
                             pystrs.sedb_dict[pystrs.sedb_range[10]]):
                results.append(ss)
            for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[8]],
                             pystrs.sedb_dict[pystrs.sedb_range[14]]):
                results.append(ss)
            for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[10]],
                             pystrs.sedb_dict[pystrs.sedb_range[14]]):
                results.append(ss)

            # WeakPass
            for weakpwd in walks_all_files(paths.sedblist_path):
                results.append(weakpwd)
            readylist = []
            readylist.extend(pystrs.sedb_dict[pystrs.sedb_range[0]])
            readylist.extend(pystrs.sedb_dict[pystrs.sedb_range[1]])
            readylist.extend(pystrs.sedb_dict[pystrs.sedb_range[2]])
            readylist.extend(pystrs.sedb_dict[pystrs.sedb_range[4]])
            readylist.extend(pystrs.sedb_dict[pystrs.sedb_range[10]])
            readylist.extend(pystrs.sedb_dict[pystrs.sedb_range[14]])
            # Using extend_enter plug
            for extendstr in extend_enter(readylist, leet=pyoptions.sedb_leet):
                results.append(extendstr)

            if not pyoptions.args_pick:
                for ur in unique(results):
                    f.write(ur + pyoptions.CRLF)
            else:
                for ur in unique(results):
                    if pyoptions.minlen <= len(ur) <= pyoptions.maxlen:
                        f.write(ur + pyoptions.CRLF)
        finishprinter(finishcounter(storepath), storepath)
Exemplo n.º 4
0
def extend_magic(rawlist, need_extendscratch=False):
    prefix = pystrs.EXTEND_prefix
    if rawlist == []:
        exit(pyoptions.CRLF +
             cool.red("[-] raw extend resource cannot be empty"))

    leet = pyoptions.extend_leet
    if need_extendscratch:
        prefix = pystrs.PASSCRAPER_prefix
        leet = pyoptions.passcraper_leet

    storepath = finalsavepath(paths.results_path, prefix, mybuildtime(),
                              pyoptions.filextension, paths.results_file_name)
    with open(storepath, "a") as f:
        for _ in walks_all_files(paths.weblist_path):
            item = filterforfun(
                "".join(_),
                head=pyoptions.head,
                tail=pyoptions.tail,
                lenght_is_filter=pyoptions.args_pick,
                minlen=pyoptions.minlen,
                maxlen=pyoptions.maxlen,
                regex_is_filter=True,
                regex=pyoptions.filter_regex,
                encode_is_filter=True,
                encode=pyoptions.encode,
                occur_is_filter=True,
                letter_occur=pyoptions.letter_occur,
                digital_occur=pyoptions.digital_occur,
                special_occur=pyoptions.special_occur,
                types_is_filter=True,
                letter_types=pyoptions.letter_types,
                digital_types=pyoptions.digital_types,
                special_types=pyoptions.special_types,
            )
            if item:
                f.write(item + pyoptions.CRLF)
        if pyoptions.level <= 1:
            for _ in walks_all_files(paths.syslist_path):
                item = filterforfun(
                    "".join(_),
                    head=pyoptions.head,
                    tail=pyoptions.tail,
                    lenght_is_filter=pyoptions.args_pick,
                    minlen=pyoptions.minlen,
                    maxlen=pyoptions.maxlen,
                    regex_is_filter=True,
                    regex=pyoptions.filter_regex,
                    encode_is_filter=True,
                    encode=pyoptions.encode,
                    occur_is_filter=True,
                    letter_occur=pyoptions.letter_occur,
                    digital_occur=pyoptions.digital_occur,
                    special_occur=pyoptions.special_occur,
                    types_is_filter=True,
                    letter_types=pyoptions.letter_types,
                    digital_types=pyoptions.digital_types,
                    special_types=pyoptions.special_types,
                )
                if item:
                    f.write(item + pyoptions.CRLF)
        for _ in extend_enter(rawlist, leet=leet):
            item = filterforfun(
                "".join(_),
                head=pyoptions.head,
                tail=pyoptions.tail,
                lenght_is_filter=pyoptions.args_pick,
                minlen=pyoptions.minlen,
                maxlen=pyoptions.maxlen,
                regex_is_filter=True,
                regex=pyoptions.filter_regex,
                encode_is_filter=True,
                encode=pyoptions.encode,
                occur_is_filter=True,
                letter_occur=pyoptions.letter_occur,
                digital_occur=pyoptions.digital_occur,
                special_occur=pyoptions.special_occur,
                types_is_filter=True,
                letter_types=pyoptions.letter_types,
                digital_types=pyoptions.digital_types,
                special_types=pyoptions.special_types,
            )
            if item:
                f.write(item + pyoptions.CRLF)

    finishprinter(finishcounter(storepath), storepath)
    def do_run(self, args):
        pystrs.startime = time.time()
        results = []
        storepath = finalsavepath(paths.results_path, pystrs.SEDB_prefix,
                                  mybuildtime(), pyoptions.filextension,
                                  paths.results_file_name)
        paths.results_file_name = None
        # SingleRule
        for single in SingleRule(pystrs.sedb_dict[pystrs.sedb_range[0]],
                                 pystrs.sedb_dict[pystrs.sedb_range[1]],
                                 pystrs.sedb_dict[pystrs.sedb_range[2]],
                                 pystrs.sedb_dict[pystrs.sedb_range[3]],
                                 pystrs.sedb_dict[pystrs.sedb_range[4]],
                                 pystrs.sedb_dict[pystrs.sedb_range[5]],
                                 pystrs.sedb_dict[pystrs.sedb_range[6]],
                                 pystrs.sedb_dict[pystrs.sedb_range[7]],
                                 pystrs.sedb_dict[pystrs.sedb_range[8]],
                                 pystrs.sedb_dict[pystrs.sedb_range[9]],
                                 pystrs.sedb_dict[pystrs.sedb_range[10]],
                                 pystrs.sedb_dict[pystrs.sedb_range[11]],
                                 pystrs.sedb_dict[pystrs.sedb_range[12]],
                                 pystrs.sedb_dict[pystrs.sedb_range[13]],
                                 pystrs.sedb_dict[pystrs.sedb_range[14]]):
            results.append(single)
        # SDrule
        for sd in SDrule(pystrs.sedb_dict[pystrs.sedb_range[0]],
                         pystrs.sedb_dict[pystrs.sedb_range[3]]):
            results.append(sd)
        for sd in SDrule(pystrs.sedb_dict[pystrs.sedb_range[0]],
                         pystrs.sedb_dict[pystrs.sedb_range[13]]):
            results.append(sd)
        # EB
        for eb in EB(pystrs.sedb_dict[pystrs.sedb_range[1]],
                     pystrs.sedb_dict[pystrs.sedb_range[3]]):
            results.append(eb)
        for eb in EB(pystrs.sedb_dict[pystrs.sedb_range[1]],
                     pystrs.sedb_dict[pystrs.sedb_range[13]]):
            results.append(eb)
        # Mailrule
        for mr in Mailrule(pystrs.sedb_dict[pystrs.sedb_range[8]],
                           pystrs.sedb_dict[pystrs.sedb_range[0]]):
            results.append(mr)
        for mr in Mailrule(pystrs.sedb_dict[pystrs.sedb_range[8]],
                           pystrs.sedb_dict[pystrs.sedb_range[1]]):
            results.append(mr)
        for mr in Mailrule(pystrs.sedb_dict[pystrs.sedb_range[8]],
                           pystrs.sedb_dict[pystrs.sedb_range[2]]):
            results.append(mr)
        for mr in Mailrule(pystrs.sedb_dict[pystrs.sedb_range[8]],
                           pystrs.sedb_dict[pystrs.sedb_range[4]]):
            results.append(mr)
        for mr in Mailrule(pystrs.sedb_dict[pystrs.sedb_range[8]],
                           pystrs.sedb_dict[pystrs.sedb_range[10]]):
            results.append(mr)
        for mr in Mailrule(pystrs.sedb_dict[pystrs.sedb_range[8]],
                           pystrs.sedb_dict[pystrs.sedb_range[14]]):
            results.append(mr)
        for mr in Mailrule(pystrs.sedb_dict[pystrs.sedb_range[8]],
                           pystrs.sedb_dict[pystrs.sedb_range[3]],
                           isstrs=False):
            results.append(mr)
        for mr in Mailrule(pystrs.sedb_dict[pystrs.sedb_range[8]],
                           pystrs.sedb_dict[pystrs.sedb_range[13]],
                           isstrs=False):
            results.append(mr)
        # NB
        for nn in NB(pystrs.sedb_dict[pystrs.sedb_range[10]],
                     pystrs.sedb_dict[pystrs.sedb_range[3]]):
            results.append(nn)
        for nn in NB(pystrs.sedb_dict[pystrs.sedb_range[10]],
                     pystrs.sedb_dict[pystrs.sedb_range[13]]):
            results.append(nn)

        # SB
        for sb in SB(pystrs.sedb_dict[pystrs.sedb_range[2]],
                     pystrs.sedb_dict[pystrs.sedb_range[3]]):
            results.append(sb)
        for sb in SB(pystrs.sedb_dict[pystrs.sedb_range[2]],
                     pystrs.sedb_dict[pystrs.sedb_range[13]]):
            results.append(sb)

        # NNrule
        for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[3]],
                         pystrs.sedb_dict[pystrs.sedb_range[5]]):
            results.append(nn)
        for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[3]],
                         pystrs.sedb_dict[pystrs.sedb_range[6]]):
            results.append(nn)
        for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[5]],
                         pystrs.sedb_dict[pystrs.sedb_range[13]]):
            results.append(nn)
        for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[6]],
                         pystrs.sedb_dict[pystrs.sedb_range[13]]):
            results.append(nn)
        for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[7]],
                         pystrs.sedb_dict[pystrs.sedb_range[13]]):
            results.append(nn)
        for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[9]],
                         pystrs.sedb_dict[pystrs.sedb_range[13]]):
            results.append(nn)
        for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[12]],
                         pystrs.sedb_dict[pystrs.sedb_range[13]]):
            results.append(nn)
        for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[3]],
                         pystrs.sedb_dict[pystrs.sedb_range[7]]):
            results.append(nn)
        for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[3]],
                         pystrs.sedb_dict[pystrs.sedb_range[9]]):
            results.append(nn)
        for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[3]],
                         pystrs.sedb_dict[pystrs.sedb_range[11]]):
            results.append(nn)
        for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[3]],
                         pystrs.sedb_dict[pystrs.sedb_range[12]]):
            results.append(nn)
        for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[3]],
                         pystrs.sedb_dict[pystrs.sedb_range[13]]):
            results.append(nn)

        # SNrule
        for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[4]],
                         pystrs.sedb_dict[pystrs.sedb_range[3]]):
            results.append(sn)
        for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[4]],
                         pystrs.sedb_dict[pystrs.sedb_range[5]]):
            results.append(sn)
        for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[4]],
                         pystrs.sedb_dict[pystrs.sedb_range[6]]):
            results.append(sn)
        for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[4]],
                         pystrs.sedb_dict[pystrs.sedb_range[7]]):
            results.append(sn)
        for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[4]],
                         pystrs.sedb_dict[pystrs.sedb_range[9]]):
            results.append(sn)
        for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[4]],
                         pystrs.sedb_dict[pystrs.sedb_range[11]]):
            results.append(sn)
        for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[4]],
                         pystrs.sedb_dict[pystrs.sedb_range[13]]):
            results.append(sn)

        for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[10]],
                         pystrs.sedb_dict[pystrs.sedb_range[3]]):
            results.append(sn)
        for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[10]],
                         pystrs.sedb_dict[pystrs.sedb_range[5]]):
            results.append(sn)
        for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[10]],
                         pystrs.sedb_dict[pystrs.sedb_range[6]]):
            results.append(sn)
        for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[10]],
                         pystrs.sedb_dict[pystrs.sedb_range[7]]):
            results.append(sn)
        for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[10]],
                         pystrs.sedb_dict[pystrs.sedb_range[9]]):
            results.append(sn)
        for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[10]],
                         pystrs.sedb_dict[pystrs.sedb_range[11]]):
            results.append(sn)
        for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[10]],
                         pystrs.sedb_dict[pystrs.sedb_range[13]]):
            results.append(sn)

        for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[14]],
                         pystrs.sedb_dict[pystrs.sedb_range[3]]):
            results.append(sn)
        for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[14]],
                         pystrs.sedb_dict[pystrs.sedb_range[5]]):
            results.append(sn)
        for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[14]],
                         pystrs.sedb_dict[pystrs.sedb_range[6]]):
            results.append(sn)
        for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[14]],
                         pystrs.sedb_dict[pystrs.sedb_range[7]]):
            results.append(sn)
        for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[14]],
                         pystrs.sedb_dict[pystrs.sedb_range[9]]):
            results.append(sn)
        for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[14]],
                         pystrs.sedb_dict[pystrs.sedb_range[11]]):
            results.append(sn)
        for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[14]],
                         pystrs.sedb_dict[pystrs.sedb_range[13]]):
            results.append(sn)

        # SSrule
        for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[0]],
                         pystrs.sedb_dict[pystrs.sedb_range[1]]):
            results.append(ss)
        for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[0]],
                         pystrs.sedb_dict[pystrs.sedb_range[4]]):
            results.append(ss)
        for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[0]],
                         pystrs.sedb_dict[pystrs.sedb_range[8]]):
            results.append(ss)
        for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[0]],
                         pystrs.sedb_dict[pystrs.sedb_range[10]]):
            results.append(ss)
        for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[0]],
                         pystrs.sedb_dict[pystrs.sedb_range[14]]):
            results.append(ss)
        for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[1]],
                         pystrs.sedb_dict[pystrs.sedb_range[4]]):
            results.append(ss)
        for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[1]],
                         pystrs.sedb_dict[pystrs.sedb_range[8]]):
            results.append(ss)
        for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[1]],
                         pystrs.sedb_dict[pystrs.sedb_range[10]]):
            results.append(ss)
        for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[1]],
                         pystrs.sedb_dict[pystrs.sedb_range[14]]):
            results.append(ss)
        for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[8]],
                         pystrs.sedb_dict[pystrs.sedb_range[10]]):
            results.append(ss)
        for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[8]],
                         pystrs.sedb_dict[pystrs.sedb_range[14]]):
            results.append(ss)
        for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[10]],
                         pystrs.sedb_dict[pystrs.sedb_range[14]]):
            results.append(ss)

        # WeakPass
        for weakpwd in walks_all_files(paths.sedblist_path):
            results.append(weakpwd)
        readylist = []
        readylist.extend(pystrs.sedb_dict[pystrs.sedb_range[0]])
        readylist.extend(pystrs.sedb_dict[pystrs.sedb_range[1]])
        readylist.extend(pystrs.sedb_dict[pystrs.sedb_range[2]])
        readylist.extend(pystrs.sedb_dict[pystrs.sedb_range[4]])
        readylist.extend(pystrs.sedb_dict[pystrs.sedb_range[10]])
        readylist.extend(pystrs.sedb_dict[pystrs.sedb_range[14]])
        # Using extend_enter plug
        for extendstr in extend_enter(readylist, leet=pyoptions.sedb_leet):
            results.append(extendstr)
        with open(storepath, "a") as f:
            for ur in unique(results):
                item = filterforfun(
                    "".join(ur),
                    head=pyoptions.head,
                    tail=pyoptions.tail,
                    lenght_is_filter=pyoptions.args_pick,
                    minlen=pyoptions.minlen,
                    maxlen=pyoptions.maxlen,
                    regex_is_filter=True,
                    regex=pyoptions.filter_regex,
                    encode_is_filter=True,
                    encode=pyoptions.encode,
                    occur_is_filter=True,
                    letter_occur=pyoptions.letter_occur,
                    digital_occur=pyoptions.digital_occur,
                    special_occur=pyoptions.special_occur,
                    types_is_filter=True,
                    letter_types=pyoptions.letter_types,
                    digital_types=pyoptions.digital_types,
                    special_types=pyoptions.special_types,
                )
                if item:
                    f.write(item + pyoptions.CRLF)

        finishprinter(finishcounter(storepath), storepath)
Exemplo n.º 6
0
    def do_run(self, args):
        storepath = finalsavepath(fun_name())

        pystrs.startime = time.time()
        results = []
        paths.results_file_name = None
        # SingleRule
        for single in SingleRule(pystrs.sedb_dict[pystrs.sedb_range[0]],
                                 pystrs.sedb_dict[pystrs.sedb_range[1]],
                                 pystrs.sedb_dict[pystrs.sedb_range[2]],
                                 pystrs.sedb_dict[pystrs.sedb_range[3]],
                                 pystrs.sedb_dict[pystrs.sedb_range[4]],
                                 pystrs.sedb_dict[pystrs.sedb_range[5]],
                                 pystrs.sedb_dict[pystrs.sedb_range[6]],
                                 pystrs.sedb_dict[pystrs.sedb_range[7]],
                                 pystrs.sedb_dict[pystrs.sedb_range[8]],
                                 pystrs.sedb_dict[pystrs.sedb_range[9]],
                                 pystrs.sedb_dict[pystrs.sedb_range[10]],
                                 pystrs.sedb_dict[pystrs.sedb_range[11]],
                                 pystrs.sedb_dict[pystrs.sedb_range[12]],
                                 pystrs.sedb_dict[pystrs.sedb_range[13]],
                                 pystrs.sedb_dict[pystrs.sedb_range[14]]):
            results.append(single)
        # SDrule
        for sd in SDrule(pystrs.sedb_dict[pystrs.sedb_range[0]],
                         pystrs.sedb_dict[pystrs.sedb_range[3]]):
            results.append(sd)
        for sd in SDrule(pystrs.sedb_dict[pystrs.sedb_range[0]],
                         pystrs.sedb_dict[pystrs.sedb_range[13]]):
            results.append(sd)
        # EB
        for eb in EB(pystrs.sedb_dict[pystrs.sedb_range[1]],
                     pystrs.sedb_dict[pystrs.sedb_range[3]]):
            results.append(eb)
        for eb in EB(pystrs.sedb_dict[pystrs.sedb_range[1]],
                     pystrs.sedb_dict[pystrs.sedb_range[13]]):
            results.append(eb)
        # Mailrule
        for mr in Mailrule(pystrs.sedb_dict[pystrs.sedb_range[8]],
                           pystrs.sedb_dict[pystrs.sedb_range[0]]):
            results.append(mr)
        for mr in Mailrule(pystrs.sedb_dict[pystrs.sedb_range[8]],
                           pystrs.sedb_dict[pystrs.sedb_range[1]]):
            results.append(mr)
        for mr in Mailrule(pystrs.sedb_dict[pystrs.sedb_range[8]],
                           pystrs.sedb_dict[pystrs.sedb_range[2]]):
            results.append(mr)
        for mr in Mailrule(pystrs.sedb_dict[pystrs.sedb_range[8]],
                           pystrs.sedb_dict[pystrs.sedb_range[4]]):
            results.append(mr)
        for mr in Mailrule(pystrs.sedb_dict[pystrs.sedb_range[8]],
                           pystrs.sedb_dict[pystrs.sedb_range[10]]):
            results.append(mr)
        for mr in Mailrule(pystrs.sedb_dict[pystrs.sedb_range[8]],
                           pystrs.sedb_dict[pystrs.sedb_range[14]]):
            results.append(mr)
        for mr in Mailrule(pystrs.sedb_dict[pystrs.sedb_range[8]],
                           pystrs.sedb_dict[pystrs.sedb_range[3]],
                           isstrs=False):
            results.append(mr)
        for mr in Mailrule(pystrs.sedb_dict[pystrs.sedb_range[8]],
                           pystrs.sedb_dict[pystrs.sedb_range[13]],
                           isstrs=False):
            results.append(mr)
        # NB
        for nn in NB(pystrs.sedb_dict[pystrs.sedb_range[10]],
                     pystrs.sedb_dict[pystrs.sedb_range[3]]):
            results.append(nn)
        for nn in NB(pystrs.sedb_dict[pystrs.sedb_range[10]],
                     pystrs.sedb_dict[pystrs.sedb_range[13]]):
            results.append(nn)

        # SB
        for sb in SB(pystrs.sedb_dict[pystrs.sedb_range[2]],
                     pystrs.sedb_dict[pystrs.sedb_range[3]]):
            results.append(sb)
        for sb in SB(pystrs.sedb_dict[pystrs.sedb_range[2]],
                     pystrs.sedb_dict[pystrs.sedb_range[13]]):
            results.append(sb)

        # NNrule
        for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[3]],
                         pystrs.sedb_dict[pystrs.sedb_range[5]]):
            results.append(nn)
        for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[3]],
                         pystrs.sedb_dict[pystrs.sedb_range[6]]):
            results.append(nn)
        for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[5]],
                         pystrs.sedb_dict[pystrs.sedb_range[13]]):
            results.append(nn)
        for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[6]],
                         pystrs.sedb_dict[pystrs.sedb_range[13]]):
            results.append(nn)
        for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[7]],
                         pystrs.sedb_dict[pystrs.sedb_range[13]]):
            results.append(nn)
        for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[9]],
                         pystrs.sedb_dict[pystrs.sedb_range[13]]):
            results.append(nn)
        for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[12]],
                         pystrs.sedb_dict[pystrs.sedb_range[13]]):
            results.append(nn)
        for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[3]],
                         pystrs.sedb_dict[pystrs.sedb_range[7]]):
            results.append(nn)
        for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[3]],
                         pystrs.sedb_dict[pystrs.sedb_range[9]]):
            results.append(nn)
        for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[3]],
                         pystrs.sedb_dict[pystrs.sedb_range[11]]):
            results.append(nn)
        for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[3]],
                         pystrs.sedb_dict[pystrs.sedb_range[12]]):
            results.append(nn)
        for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[3]],
                         pystrs.sedb_dict[pystrs.sedb_range[13]]):
            results.append(nn)

        # SNrule
        for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[4]],
                         pystrs.sedb_dict[pystrs.sedb_range[3]]):
            results.append(sn)
        for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[4]],
                         pystrs.sedb_dict[pystrs.sedb_range[5]]):
            results.append(sn)
        for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[4]],
                         pystrs.sedb_dict[pystrs.sedb_range[6]]):
            results.append(sn)
        for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[4]],
                         pystrs.sedb_dict[pystrs.sedb_range[7]]):
            results.append(sn)
        for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[4]],
                         pystrs.sedb_dict[pystrs.sedb_range[9]]):
            results.append(sn)
        for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[4]],
                         pystrs.sedb_dict[pystrs.sedb_range[11]]):
            results.append(sn)
        for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[4]],
                         pystrs.sedb_dict[pystrs.sedb_range[13]]):
            results.append(sn)

        for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[10]],
                         pystrs.sedb_dict[pystrs.sedb_range[3]]):
            results.append(sn)
        for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[10]],
                         pystrs.sedb_dict[pystrs.sedb_range[5]]):
            results.append(sn)
        for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[10]],
                         pystrs.sedb_dict[pystrs.sedb_range[6]]):
            results.append(sn)
        for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[10]],
                         pystrs.sedb_dict[pystrs.sedb_range[7]]):
            results.append(sn)
        for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[10]],
                         pystrs.sedb_dict[pystrs.sedb_range[9]]):
            results.append(sn)
        for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[10]],
                         pystrs.sedb_dict[pystrs.sedb_range[11]]):
            results.append(sn)
        for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[10]],
                         pystrs.sedb_dict[pystrs.sedb_range[13]]):
            results.append(sn)

        for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[14]],
                         pystrs.sedb_dict[pystrs.sedb_range[3]]):
            results.append(sn)
        for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[14]],
                         pystrs.sedb_dict[pystrs.sedb_range[5]]):
            results.append(sn)
        for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[14]],
                         pystrs.sedb_dict[pystrs.sedb_range[6]]):
            results.append(sn)
        for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[14]],
                         pystrs.sedb_dict[pystrs.sedb_range[7]]):
            results.append(sn)
        for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[14]],
                         pystrs.sedb_dict[pystrs.sedb_range[9]]):
            results.append(sn)
        for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[14]],
                         pystrs.sedb_dict[pystrs.sedb_range[11]]):
            results.append(sn)
        for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[14]],
                         pystrs.sedb_dict[pystrs.sedb_range[13]]):
            results.append(sn)

        # SSrule
        for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[0]],
                         pystrs.sedb_dict[pystrs.sedb_range[1]]):
            results.append(ss)
        for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[0]],
                         pystrs.sedb_dict[pystrs.sedb_range[4]]):
            results.append(ss)
        for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[0]],
                         pystrs.sedb_dict[pystrs.sedb_range[8]]):
            results.append(ss)
        for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[0]],
                         pystrs.sedb_dict[pystrs.sedb_range[10]]):
            results.append(ss)
        for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[0]],
                         pystrs.sedb_dict[pystrs.sedb_range[14]]):
            results.append(ss)
        for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[1]],
                         pystrs.sedb_dict[pystrs.sedb_range[4]]):
            results.append(ss)
        for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[1]],
                         pystrs.sedb_dict[pystrs.sedb_range[8]]):
            results.append(ss)
        for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[1]],
                         pystrs.sedb_dict[pystrs.sedb_range[10]]):
            results.append(ss)
        for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[1]],
                         pystrs.sedb_dict[pystrs.sedb_range[14]]):
            results.append(ss)
        for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[8]],
                         pystrs.sedb_dict[pystrs.sedb_range[10]]):
            results.append(ss)
        for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[8]],
                         pystrs.sedb_dict[pystrs.sedb_range[14]]):
            results.append(ss)
        for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[10]],
                         pystrs.sedb_dict[pystrs.sedb_range[14]]):
            results.append(ss)

        # WeakPass
        for weakpwd in walks_all_files(paths.sedblist_path):
            results.append(weakpwd)
        readylist = []
        readylist.extend(pystrs.sedb_dict[pystrs.sedb_range[0]])
        readylist.extend(pystrs.sedb_dict[pystrs.sedb_range[1]])
        readylist.extend(pystrs.sedb_dict[pystrs.sedb_range[2]])
        readylist.extend(pystrs.sedb_dict[pystrs.sedb_range[4]])
        readylist.extend(pystrs.sedb_dict[pystrs.sedb_range[10]])
        readylist.extend(pystrs.sedb_dict[pystrs.sedb_range[14]])
        # Using extend_enter plug
        for extendstr in extend_enter(readylist, leet=pyoptions.sedb_leet):
            results.append(extendstr)

        @magic
        def sedb():
            for ur in results:
                yield "".join(ur)