コード例 #1
0
 def do_show(self, key, setflag=False):
     if not setflag:
         if pyoptions.args_pick:
             print(
                 cool.orange("{pick:11}: minlen: {0} maxlen: {1}".format(
                     pyoptions.minlen, pyoptions.maxlen, pick="pick")))
         print(
             cool.orange("{level:11}: {0}".format(pyoptions.level,
                                                  level="level")))
         if pyoptions.sedb_leet:
             print(
                 cool.orange("{leet:11}: {0}".format(" ".join(
                     map(str, pyoptions.leetmode_code)),
                                                     leet="leet")))
     if key in pystrs.sedb_dict.keys():
         print(
             cool.blue("%-10s :%s" %
                       (key, ' '.join([x for x in pystrs.sedb_dict[key]]))))
     else:
         for key in pystrs.sedb_dict.keys():
             print(
                 cool.blue(
                     "%-10s :%s" %
                     (key, ' '.join([x for x in pystrs.sedb_dict[key]]))))
コード例 #2
0
 def do_types(self, key):
     chunk = key.split(' ')
     if len(chunk) != 3:
         print(
             cool.fuchsia("[!] usage: types letter digital special" +
                          pyoptions.CRLF) +
             cool.blue("[?] exp: types <=6 >4 >=0") + pyoptions.CRLF)
     else:
         letter = chunk[0].strip('"').strip("'")
         digital = chunk[1].strip('"').strip("'")
         special = chunk[2].strip('"').strip("'")
         pyoptions.letter_types = letter if letter != "" else pyoptions.letter_types
         pyoptions.digital_types = digital if digital != "" else pyoptions.digital_types
         pyoptions.special_types = special if special != "" else pyoptions.special_types
         print("[+] letter types: {0} digital types: {1} special types: {2}"
               .format(cool.green(pyoptions.letter_types),
                       cool.green(pyoptions.digital_types),
                       cool.green(pyoptions.special_types)) +
               pyoptions.CRLF)
コード例 #3
0
 def do_occur(self, key):
     chunk = key.split(' ')
     if len(chunk) != 3:
         print(
             cool.fuchsia("[!] usage: occur letter digital special" +
                          pyoptions.CRLF) +
             cool.blue("[?] exp: occur <=6 >4 >=0") + pyoptions.CRLF)
     else:
         letter = chunk[0].strip('"').strip("'")
         digital = chunk[1].strip('"').strip("'")
         special = chunk[2].strip('"').strip("'")
         pyoptions.letter_occur = letter if letter != "" else pyoptions.letter_occur
         pyoptions.digital_occur = digital if digital != "" else pyoptions.digital_occur
         pyoptions.special_occur = special if special != "" else pyoptions.special_occur
         print("[+] letter occur: {0} digital occur: {1} special occur: {2}"
               .format(cool.green(pyoptions.letter_occur),
                       cool.green(pyoptions.digital_occur),
                       cool.green(pyoptions.special_occur)) +
               pyoptions.CRLF)
コード例 #4
0
 def do_repeat(self, key):
     chunk = key.split(' ')
     if len(chunk) != 3:
         print(
             cool.fuchsia("[!] usage: repeat letter digital special" +
                          pyoptions.CRLF) +
             cool.blue("[?] exp: repeat <=6 >4 >=0") + pyoptions.CRLF)
     else:
         pyoptions.repeat_is_filter = True
         letter = chunk[0].strip('"').strip("'")
         digital = chunk[1].strip('"').strip("'")
         special = chunk[2].strip('"').strip("'")
         pyoptions.letter_repeat = letter if letter != "" else pyoptions.letter_repeat
         pyoptions.digital_repeat = digital if digital != "" else pyoptions.digital_repeat
         pyoptions.special_repeat = special if special != "" else pyoptions.special_repeat
         print(
             "[+] letter repeat: {0} digital types: {1} special types: {2}".
             format(cool.green(pyoptions.letter_repeat),
                    cool.green(pyoptions.digital_repeat),
                    cool.green(pyoptions.special_repeat)) + pyoptions.CRLF)
コード例 #5
0
    def do_show(self, key, setflag=False):
        if not setflag:
            if pyoptions.args_pick:
                print(
                    cool.orange(
                        "{description:11}: minlen: [{0}] maxlen: [{1}]".format(
                            pyoptions.minlen,
                            pyoptions.maxlen,
                            description="lenght")))
            else:
                print(
                    cool.orange(
                        "{description:11}: minlen: [{0}] maxlen: [{0}]".format(
                            "no-limited", description="len")))
            if pyoptions.head:
                print(
                    cool.orange("{description:11}: [{0}]".format(
                        pyoptions.head, description="head")))
            else:
                print(
                    cool.orange("{description:11}: [{0}]".format(
                        "none", description="head")))

            if pyoptions.tail:
                print(
                    cool.orange("{description:11}: [{0}]".format(
                        pyoptions.tail, description="tail")))
            else:
                print(
                    cool.orange("{description:11}: [{0}]".format(
                        "none", description="tail")))

            print(
                cool.orange("{description:11}: [{0}]".format(
                    pyoptions.encode, description="encode")))

            print(
                cool.orange(
                    "{description:11}: letter: [ {0:5}] digital: [ {1:5}] special: [ {2:5} ]"
                    .format(pyoptions.letter_occur,
                            pyoptions.digital_occur,
                            pyoptions.special_occur,
                            description="occur")))

            print(
                cool.orange(
                    "{description:11}: letter: [ {0:5}] digital: [ {1:5}] special: [ {2:5} ]"
                    .format(pyoptions.letter_types,
                            pyoptions.digital_types,
                            pyoptions.special_types,
                            description="types")))

            print(
                cool.orange("{description:11}: [{0}]".format(
                    pyoptions.level, description="level")))

            if pyoptions.sedb_leet:
                print(
                    cool.orange("{description:11}: [{0}]".format(
                        " ".join(map(str, pyoptions.leetmode_code)),
                        description="leet")))
            else:
                print(
                    cool.orange("{description:11}: [{0}]".format(
                        "none", description="leet")))

            print(
                cool.orange("{description:11}: [{0}]".format(
                    pyoptions.filter_regex, description="regex")))

        if key in pystrs.sedb_dict.keys():
            print(
                cool.blue("%-10s :%s" %
                          (key, ' '.join([x for x in pystrs.sedb_dict[key]]))))
        else:
            for key in pystrs.sedb_dict.keys():
                print(
                    cool.blue(
                        "%-10s :%s" %
                        (key, ' '.join([x for x in pystrs.sedb_dict[key]]))))