Executing assembler code with python

后端 未结 7 1610
长情又很酷
长情又很酷 2021-02-01 18:00

I want to execute assembly code inside a python script. Is that possible?

In C programming would be like this

static inline getesp(){
        __asm__(\"m         


        
7条回答
  •  感情败类
    2021-02-01 18:29

    It is highly possible I made a small assembler in python, some of the libraries I used may have supported Ctypes, but I used pure Python, Most languages do actually interface at a low level, We are just using the HLL Langage features and not paying appropriate attention to how the code is being processed, I have also written a small POC image editing app in visual basic that used ASM x86 Code I am not actually sure on how to edit this into what I was trying to say. except maybe functions that would read the asm code and work from within the script itself. I do believe my thoughts were pointed out to be wrong. ASM code can be executed through the use of scripted functions that read that area of the code and compile them. almost as if it were a built in on the fly assembler. I try to help not so great a speaker though (or writter in this case as it may be) this page here maybe able to explain better on what I am trying to say http://code.activestate.com/recipes/579037-how-to-execute-x86-64-bit-assembly-code-directly-f/

提交回复
热议问题