Example #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
Example #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
Example #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
Example #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
Example #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
Example #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
Example #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
Example #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
Example #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
Example #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
Example #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
Example #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
Example #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
Example #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
Example #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
Example #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
Example #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
Example #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
Example #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
Example #20
0
File: back.py Project: jack51706/fa
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
Example #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
Example #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
Example #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
Example #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
Example #25
0
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
Example #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
Example #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
Example #28
0
def get_parser():
    p = utils.ArgumentParserNoExit('make-code',
                                   description='convert into a code block')
    return p
Example #29
0
def get_parser():
    p = utils.ArgumentParserNoExit('find-immediate',
                                   description=DESCRIPTION,
                                   formatter_class=RawTextHelpFormatter)
    p.add_argument('expression')
    return p
Example #30
0
def get_parser():
    p = utils.ArgumentParserNoExit('locate', description='goto label by name')
    p.add_argument('name')
    return p