file_buffer = requests.get(file_url)

buf_size = len(file_buffer)

pe_file = pefile.PE(data=file_buffer)

print("This is really a pe imphash %s." % pe_file.get_imphash())

addr = hex(id(file_buffer))

print("PE start memory at %s length %d." % (addr, len(file_buffer)))

new_loader = ida_idaapi.loader_input_t()

mem_inp = ida_diskio.create_memory_linput(addr, buf_size)

  • Your code is broken. What is addr? – Rolf Rolles Jan 3 at 5:24
  • ea_t - I cant' this parameter right in python @RolfRolles – Roman Rusetsky Jan 3 at 9:22
  • 1
    Right. Well, your code snippet shows no definition for that variable, so we don't know what you did wrong. Nobody can help you until you show us how you defined the addr variable. – Rolf Rolles Jan 3 at 16:57
  • buffer = b'\xB8\x01\x00\x00\x00' id(addr) - will be the start address of the buffer thank you for your help – Roman Rusetsky Jan 4 at 17:36
  • 1
    Man, if you want help, paste the real code into your question, not pseudocode, not snippets that you think are relevant, the whole thing. – Rolf Rolles Jan 4 at 22:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.