如何通过python结构模块以小末日格式转换一个内存地址
我需要将存储地址转换为以下符号:uint32 Little Endian(DCBA) 我在网上找到了结构模块,但是我无法弄清楚要使用哪种参数来获取所需的内容。 例如,我需要转换以下:0x8048424并输出以下:\ x24 \ x84 \ x04 \ x08 我已经尝试过,但是输出省略了序列\ x24:
import struct
x= struct.pack('<L',0x8048424 )
print(x)
但是它删除x24,用于打包的正确值是什么?
I need to convert a memory address to the following notation: uint32 little endian (DCBA)
I found the struct module online, but I can't figure out which parameter to use to get what I need.
For example I need to convert this:0x8048424 and get in output this: \x24\x84\x04\x08
I tried this already, but the output omits the sequence \x24:
import struct
x= struct.pack('<L',0x8048424 )
print(x)
But it delete x24, what is the correct value to pass to pack for my purpose?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论