Exemplo n.º 1
0
def getMappedSymbolsXML(proc, bv, addr_info):
    with write_query_response(proc.stdin) as f:
        write_string(
            f, b'''
            <result>
                <parent>
                    <val/>
                </parent>
                <mapsym>
                    <function name="sub_4014a9" size="1">
                        <addr space="ram" offset="0x4014a9"/>
                        <localdb lock="false" main="stack">
                            <scope name="sub_4014a9">
                                <parent>
                                    <val/>
                                </parent>
                                <rangelist/>
                                <symbollist></symbollist>
                            </scope>
                        </localdb>
                        <prototype extrapop="8" model="unknown">
                            <returnsym>
                                <addr space="register" offset="0x0" size="1"/>
                                <typeref name="undefined"/>
                            </returnsym>
                        </prototype>
                    </function>
                    <addr space="ram" offset="0x4014a9"/>
                    <rangelist/>
                </mapsym>
            </result>
        ''')
Exemplo n.º 2
0
def getRegister(proc, bv, reg_name):
    # TODO: set offset
    res = GhidraRegister(bv, reg_name, offset=0)

    print(res)
    with write_query_response(proc.stdin) as f:
        write_string(f, str(res).encode())
Exemplo n.º 3
0
def getUserOpName(proc, _bv, _):
    with write_query_response(proc.stdin) as f:
        write_string(f, b'')
Exemplo n.º 4
0
def getComments(proc, bv, _addr_info, _flags):
    with write_query_response(proc.stdin) as f:
        write_string(f, '<commentdb></commentdb>')
Exemplo n.º 5
0
def getTrackedRegisters(proc, bv, addr_info):
    with write_query_response(proc.stdin) as f:
        write_string(
            f,
            '<tracked_pointset space="ram" offset="0x4014a9"></tracked_pointset>'
        )
Exemplo n.º 6
0
def getPacked(proc, bv, addr_info):
    with write_query_response(proc.stdin) as f:
        write_bytes(
            f, b"!!`\"4R30`\"\"%#(*`($\"%#@`(`\"3%#@`(%#@`(% (`(`\"*#%#(*`(``")