第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會有你想問的

Python Linux讀取進(jìn)程內(nèi)存-int太大,無法轉(zhuǎn)換為C long

Python Linux讀取進(jìn)程內(nèi)存-int太大,無法轉(zhuǎn)換為C long

楊__羊羊 2021-03-19 14:12:19
我有這個(gè)片段,它可以在Linux中讀取進(jìn)程內(nèi)存并搜索字符串,在某些發(fā)行版上可以正常運(yùn)行,但在其他發(fā)行版上卻遇到了此錯誤:  maps_file = open("/proc/%s/maps"%pid, 'r')  mem_file = open("/proc/%s/mem"%pid, 'r')  for line in maps_file.readlines():  # for each mapped region      m = re.match(r'([0-9A-Fa-f]+)', line)      if m.group(3) == 'r':  # if this is a readable region          start = int(m.group(1), 16)          end = int(m.group(2), 16)          mem_file.seek(start)  # seek to region start          chunk = mem_file.read(end - start)  # read region contents          #print chunk,  # dump contents to standard output          mem_dump = open(working_dir+"/%s.bin"%pid, "ab")          mem_dump.write(chunk,)          mem_dump.close()  maps_file.close()  mem_file.close()錯誤:scan process: 491Traceback (most recent call last):  File "./dump.py", line 106, in <module>    MainDump(pid)  File "./dump.py", line 79, in MainDump    mem_file.seek(start)  # seek to region startOverflowError: Python int too large to convert to C long問題行是:start = int(m.group(1), 16)和mem_file.seek(start)我應(yīng)該聲明為float嗎?任何的想法?也嘗試long()過相同的結(jié)果和錯誤。編輯:我忘了說的是我在“ x64”系統(tǒng)上得到的錯誤。
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 278 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號