一、介紹
chunkspy 就是乙個lua檔案,通過它可以把二進位制的lua檔案轉換為opcode,這是乙個學習lua原始碼的很好的工具。
二、使用
chunkspy需要在lua命令列中使用。
基本格式
usage: lua chunkspy.lua [options] [filenames]
具體引數
1、幫助
命令:>lua chunkspy.lua -h
輸出:options:
-h, --help prints usage information
--stats prints some statistical information
--brief generate assembly-style brief listing
--auto auto detects binary chunk profile
-o specify file name to write output listing
--source generate listing from a lua source file
- -rewrite "plat" generate binary chunk using given profile;
use "local" for local binary chunk format
--run convert to local format, load and execute
--test perform internal tests only
--sample generate sample listing only
--interact *interactive mode*, output brief listings
-- stop handling arguments
2、反彙編二進位制檔案
命令:>lua chunkspy.lua luac.out
其中luac.out是由luac編譯得到的二進位制檔案
3、輸出lua檔案的opcode
命令:>lua chunkspy.lua --source myscript.lua
myscript.lua是lua檔案路徑
4、把二進位制檔案進行反彙編,並把結果輸出到目標檔案裡
命令:>lua chunkspy.lua luac.out -o myscript.lst
luac.out 是二進位制檔案
myscript.lst 是目標檔案
5、留下主要opcode相關資訊
命令:>lua chunkspy.lua --source myscript.lua --brief
在命令列中加入引數--brief
6、生成二進位制檔案
命令:>luac myscript.lua
生成的二進位制會存在luac.out中
7、進入交換模式
命令:>lua chunkspy.lua --interact
反彙編工具使用
核心開發,kernel panic是再常見不過的了,根據異常棧通常即可定位出 出錯的大概位置,但是有些時候我們還是會需要使用反彙編工具來幫助我們定位一些異常,objdump.該反彙編工具存在於prebuilts gcc linux x86 arm gcc linaro aarch64 linux g...
ida反彙編工具
ida pro 是乙個世界頂級的互動式反彙編工具,它的使用者囊括了軟體安全專家,軍事工業,資訊部門,逆向工程學者,黑客。從功能上它大大勝過了w32dasm。近來它的盜版已經在網上傳播開了,你可以很輕鬆得到它。ida pro 簡稱ida 英文 interactive disassembler的縮寫。它...
反彙編 迴圈
includeint main 00401010 55 push ebp 00401011 8bec mov ebp,esp 00401013 83ec 44 sub esp,44 00401016 53 push ebx 00401017 56 push esi 00401018 57 push ...