Exemple #1
0
def get_parser():
    p = utils.ArgumentParserNoExit('find-bytes',
                                   description='expands the search results '
                                   'by the given bytes set')
    p.add_argument('--or', action='store_true')
    p.add_argument('hex_str')
    return p
Exemple #2
0
def get_parser():
    p = utils.ArgumentParserNoExit('set-struct-member',
                                   description='add a struct member')
    p.add_argument('struct_name')
    p.add_argument('member_name')
    p.add_argument('member_type')
    return p
Exemple #3
0
def get_parser():
    p = utils.ArgumentParserNoExit('python-if',
                                   description=DESCRIPTION,
                                   formatter_class=RawTextHelpFormatter)
    p.add_argument('cond', help='condition to evaluate (being eval\'ed)')
    p.add_argument('label', help='label to jump to if condition is true')
    return p
Exemple #4
0
def get_parser():
    p = utils.ArgumentParserNoExit('if',
                                   description=DESCRIPTION,
                                   formatter_class=RawTextHelpFormatter)
    p.add_argument('cond', help='condition as an FA command')
    p.add_argument('label', help='label to jump to if condition is true')
    return p
Exemple #5
0
def get_parser():
    p = utils.ArgumentParserNoExit('aligned',
                                   description='reduces the list to only '
                                   'those aligned to a specific '
                                   'value')
    p.add_argument('value', type=int)
    return p
Exemple #6
0
def get_parser():
    p = utils.ArgumentParserNoExit()
    p.add_argument('name', help='segment name')

    p.prog = 'verify-segment'
    p.description = DESCRIPTION
    p.formatter_class = RawTextHelpFormatter
    return p
Exemple #7
0
def get_parser():
    p = utils.ArgumentParserNoExit('find-bytes-ida',
                                   description='expands the search results '
                                   'by an ida-bytes expression '
                                   '(Alt+B)')
    p.add_argument('--or', action='store_true')
    p.add_argument('expression')
    return p
Exemple #8
0
def get_parser():
    p = utils.ArgumentParserNoExit()
    p.add_argument('comment', help='comment string')

    p.prog = 'make-comment'
    p.description = DESCRIPTION
    p.formatter_class = RawTextHelpFormatter
    return p
Exemple #9
0
def get_parser():
    p = utils.ArgumentParserNoExit('add-offset-range',
                                   description=DESCRIPTION,
                                   formatter_class=RawTextHelpFormatter)
    p.add_argument('start')
    p.add_argument('end')
    p.add_argument('step')
    return p
Exemple #10
0
def get_parser():
    p = utils.ArgumentParserNoExit('goto-ref',
                                   description='goto reference')
    p.add_argument('--code', action='store_true',
                   default=False, help='include code references')
    p.add_argument('--data', action='store_true',
                   default=False, help='include data references')
    return p
Exemple #11
0
def get_parser():
    p = utils.ArgumentParserNoExit('back-to-checkpoint',
                                   description=DESCRIPTION,
                                   formatter_class=RawTextHelpFormatter)
    p.add_argument('name',
                   help='name of checkpoint in history to go back '
                   'to')
    return p
Exemple #12
0
def get_parser():
    p = utils.ArgumentParserNoExit('function-lines',
                                   description=DESCRIPTION,
                                   formatter_class=RawTextHelpFormatter)
    p.add_argument('--after', action='store_true',
                   help='include only function lines which occur after current'
                        'resultset')
    return p
Exemple #13
0
def get_parser():
    p = utils.ArgumentParserNoExit('back',
                                   description=DESCRIPTION,
                                   formatter_class=RawTextHelpFormatter)
    p.add_argument('amount',
                   type=int,
                   help='amount of command results to go back by')
    return p
Exemple #14
0
def get_parser():
    p = utils.ArgumentParserNoExit('verify-operand',
                                   description='verifies the given '
                                   'opcode\'s operands')
    p.add_argument('name')
    p.add_argument('--op0')
    p.add_argument('--op1')
    p.add_argument('--op2')
    return p
Exemple #15
0
def get_parser():
    p = utils.ArgumentParserNoExit('back-to-checkpoint',
                                   description='goes back in history to '
                                   'the result-set saved by a '
                                   'previous checkpoint')
    p.add_argument('name',
                   help='name of checkpoint in history to go back '
                   'to')
    return p
Exemple #16
0
def get_parser():
    p = utils.ArgumentParserNoExit('add-offset-range',
                                   description='adds a python-range of '
                                   'offsets, to the current '
                                   'search results')
    p.add_argument('start', type=int)
    p.add_argument('end', type=int)
    p.add_argument('step', type=int)
    return p
Exemple #17
0
def get_parser():
    p = utils.ArgumentParserNoExit('verify-bytes',
                                   description=DESCRIPTION,
                                   formatter_class=RawTextHelpFormatter)
    p.add_argument('--until',
                   type=int,
                   help='keep advancing by a given size until a match')
    p.add_argument('hex_str')
    return p
Exemple #18
0
def get_parser():
    p = utils.ArgumentParserNoExit('verify-operand',
                                   description=DESCRIPTION,
                                   formatter_class=RawTextHelpFormatter)
    p.add_argument('name')
    p.add_argument('--op0')
    p.add_argument('--op1')
    p.add_argument('--op2')
    return p
Exemple #19
0
def get_parser():
    p = utils.ArgumentParserNoExit('verify-bytes',
                                   description='reduces the search list '
                                   'to those matching the given'
                                   ' bytes')
    p.add_argument('--until',
                   type=int,
                   help='keep advancing by a given size until a match')
    p.add_argument('hex_str')
    return p
Exemple #20
0
def get_parser():
    p = utils.ArgumentParserNoExit('back',
                                   description='goes back in history '
                                   'of search results to '
                                   'those returned from a '
                                   'previous command')
    p.add_argument('amount',
                   type=int,
                   help='amount of command results to go back by')
    return p
Exemple #21
0
def get_parser():
    p = utils.ArgumentParserNoExit(prog='xrefs-to',
                                   description='search for xrefs pointing '
                                               'at given parameter')
    p.add_argument('--function-start', action='store_true',
                   help='goto function prolog for each xref')
    p.add_argument('--or', action='store_true',
                   help='expand the current result set')
    p.add_argument('--and', action='store_true',
                   help='reduce the current result set')
    p.add_argument('--name', help='parameter as label name')
    p.add_argument('--bytes', help='parameter as bytes')
    return p
Exemple #22
0
def get_parser():
    p = utils.ArgumentParserNoExit('goto-ref',
                                   description=DESCRIPTION,
                                   formatter_class=RawTextHelpFormatter)
    p.add_argument('--code',
                   action='store_true',
                   default=False,
                   help='include code references')
    p.add_argument('--data',
                   action='store_true',
                   default=False,
                   help='include data references')
    return p
Exemple #23
0
def get_parser():
    p = utils.ArgumentParserNoExit('verify-ref',
                                   description='verifies a given reference '
                                   'exists to current result set')
    p.add_argument('--code',
                   action='store_true',
                   default=False,
                   help='include code references')
    p.add_argument('--data',
                   action='store_true',
                   default=False,
                   help='include data references')
    p.add_argument('--name', default=None, help='symbol name')
    return p
Exemple #24
0
def get_parser():
    p = utils.ArgumentParserNoExit('keystone-find-opcodes',
                                   description='use keystone to search for the supplied'
                                               ' opcodes')
    p.add_argument('--bele', action='store_true',
                   help='figure out the endianity from IDA instead of explicit mode')
    p.add_argument('--or', action='store_true',
                   help='mandatory. expands search results')
    p.add_argument('arch',
                   help='keystone architecture const (evaled)')
    p.add_argument('mode',
                   help='keystone mode const (evald)')
    p.add_argument('code',
                   help='keystone architecture const (opcodes to compile)')
    return p
def get_parser():
    p = utils.ArgumentParserNoExit('keystone-verify-opcodes',
                                   description=DESCRIPTION,
                                   formatter_class=RawTextHelpFormatter)
    p.add_argument('--bele', action='store_true',
                   help='figure out the endianity from IDA instead of '
                        'explicit mode')
    p.add_argument('--until', type=int,
                   help='keep going onwards opcode-opcode until verified')
    p.add_argument('arch',
                   help='keystone architecture const (evaled)')
    p.add_argument('mode',
                   help='keystone mode const (evald)')
    p.add_argument('code',
                   help='keystone architecture const (opcodes to compile)')
    return p
Exemple #26
0
def get_parser():
    p = utils.ArgumentParserNoExit('keystone-find-opcodes',
                                   description=DESCRIPTION,
                                   formatter_class=RawTextHelpFormatter)
    p.add_argument('--bele',
                   action='store_true',
                   help='figure out the endianity from IDA instead of '
                   'explicit mode')
    p.add_argument('--or',
                   action='store_true',
                   help='mandatory. expands search results')
    p.add_argument('arch', help='keystone architecture const (evaled)')
    p.add_argument('mode', help='keystone mode const (evald)')
    p.add_argument('code',
                   help='keystone architecture const (opcodes to compile)')
    return p
Exemple #27
0
def get_parser():
    p = utils.ArgumentParserNoExit(
        'keystone-verify-opcodes',
        description='use keystone-engine to verify the given '
        'results match the supplied code')
    p.add_argument(
        '--bele',
        action='store_true',
        help='figure out the endianity from IDA instead of explicit mode')
    p.add_argument('--until',
                   type=int,
                   help='keep going onwards opcode-opcode until verified')
    p.add_argument('arch', help='keystone architecture const (evaled)')
    p.add_argument('mode', help='keystone mode const (evald)')
    p.add_argument('code',
                   help='keystone architecture const (opcodes to compile)')
    return p
Exemple #28
0
def get_parser():
    p = utils.ArgumentParserNoExit('make-code',
                                   description='convert into a code block')
    return p
Exemple #29
0
def get_parser():
    p = utils.ArgumentParserNoExit('find-immediate',
                                   description=DESCRIPTION,
                                   formatter_class=RawTextHelpFormatter)
    p.add_argument('expression')
    return p
Exemple #30
0
def get_parser():
    p = utils.ArgumentParserNoExit('locate', description='goto label by name')
    p.add_argument('name')
    return p