① swf文件反編譯後要怎麼回編譯回swf文件
skip 9 words
Tom says John says good morning.
skip 3 words
back 7 wordsMary says thank you.
如果逐個字讀的話,結果和原來一樣,然而反編譯器按句子來讀取,自然發生錯誤。第一,它知道Tom說了什麼,但語法不對,匯報出錯;第二,它沒有看到第二個「skip」命令,因為它處於句子中間;第三,當它被迫退回7個字後,感到迷惑,認為應該從「Tom said」開始執行整個句子;第四,這個錯誤使它在第二行和第三行之間陷入無限循環之中。總之,我們增加了「Tom said」這句垃圾代碼,並提供整個句子長度的錯誤數據大小信息。這個錯誤的長度覆蓋了「skip」命令。來看個真實的例子,請注意,這些技術需要操作位元組碼,純actionscript不能夠實現。例1 :向前跳轉的包含無效尺寸數據的死代碼。push True
branchifTrue label2
constants ''label2:push 'a',3setVariable
你仔細看的話,會發現"constants ''"這行是垃圾代碼,它不可能被執行到。然而,理論上,當第二行的結果為"not True"時,它將被執行。因此,反編譯器嘗試對它進行反編譯。讓我們來增大"0x88 - constants"後面的"sentence size",從而包括知道腳本結尾的所有位元組。你知道,反編譯器將把位元組碼砍成像這樣的3個句子:push True
branchifTrue label2
如果你試圖反編譯此SWF文件,根據我前面提到的4個錯誤,一些反編譯器將碰壁。仍舊有些反編譯器倖存,但只是顯示:"if(false){};"。ASV 3也不能顯示此腳本,但是ASV 4能夠顯示。為了破解這個SWF,我們移除死代碼"constant xxxx", (0x88和隨後兩個位元組),然後所有的東西都得到反編譯。這兒是zip格式的文件,將詳細解釋怎樣製作這樣的受保護文件。例2:先後跳轉的包含無效尺寸數據的死代碼。
② 關於匯編語言的翻譯,將下面的ASM碼反編譯為C語言,謝謝
r1=r0>>0x1f
r1=r0+(r1<<0x24)
r1=r1>>8
r1=r0-(r1<<8)
不對隨便寫寫
③ 反編譯大神求助不能生成apk怎麼回事
反編譯大神求助不能生成apk怎麼回事
ERROR: ld.so: object '/system/lib/libsuc.so' from LD_PRELOAD cannot be preloaded: ignored.
W: Could not find sources
ERROR: ld.so: object '/system/lib/libsuc.so' from LD_PRELOAD cannot be preloaded: ignored.
libpng error: Not a PNG file
ERROR: Failure processing PNG image /sdcard/zzzzzzzxzzz/framework-res_src/res/drawable-hdpi/oppo_springlistviewbackground.png
/sdcard/zzzzzzzxzzz/framework-res_src/res/values/public.xml:17222: error: Public entry identifier 0x10802ba entry index is larger than available symbols (index 698, total symbols 545).
/sdcard/zzzzzzzxzzz/framework-res_src/res/values/public.xml:17222: error: Public symbol drawable/APKTOOL_DUMMY_02ba declared here is not defined.
/sdcard/zzzzzzzxzzz/framework-res_src/res/values/public.xml:17223: error: Public entry identifier 0x108040a entry index is larger than available symbols (index 1034, total symbols 545).
/sdcard/zzzzzzzxzzz/framework-res_src/res/values/public.xml:17223: error: Public symbol drawable/APKTOOL_DUMMY_040a declared here is not defined.
/sdcard/zzzzzzzxzzz/framework-res_src/res/values/public.xml:17224: error: Public entry identifier 0x1080574 entry index is larger than available symbols (index 1396, total symbols 545).
/sdcard/zzzzzzzxzzz/framework-res_src/res/values/public.xml:17224: error: Public symbol drawable/APKTOOL_DUMMY_0574 declared here is not defined.
/sdcard/zzzzzzzxzzz/framework-res_src/res/values/public.xml:17225: error: Public entry identifier 0x1080602 entry index is larger than available symbols (index 1538, total symbols 545).
/sdcard/zzzzzzzxzzz/framework-res_src/res/values/public.xml:17225: error: Public symbol drawable/APKTOOL_DUMMY_0602 declared here is not defined.
/sdcard/zzzzzzzxzzz/framework-res_src/res/values/public.xml:17226: error: Public entry identifier 0x1080603 entry index is larger than available symbols (index 1539, total symbols 545).
/sdcard/zzzzzzzxzzz/framework-res_src/res/values/public.xml:17226: error: Public symbol drawable/APKTOOL_DUMMY_0603 declared here is not defined.
/sdcard/zzzzzzzxzzz/framework-res_src/res/values/public.xml:17227: error: Public entry identifier 0x1080604 entry index is larger than available symbols (index 1540, total symbols 545).
/sdcard/zzzzzzzxzzz/framework-res_src/res/values/public.xml:17227: error: Public symbol drawable/APKTOOL_DUMMY_0604 declared here is not defined.
/sdcard/zzzzzzzxzzz/framework-res_src/res/values/public.xml:17228: error: Public entry identifier 0x1080605 entry index is larger than available symbols (index 1541, total symbols 545).
/sdcard/zzzzzzzxzzz/framework-res_src/res/values/public.xml:17228: error: Public symbol drawable/APKTOOL_DUMMY_0605 declared here is not defined.
/sdcard/zzzzzzzxzzz/framework-res_src/res/values/public.xml:17229: error: Public entry identifier 0x1080606 entry index is larger than available symbols (index 1542, total symbols 545).
/sdcard/zzzzzzzxzzz/framework-res_src/res/values/public.xml:17229: error: Public symbol drawable/APKTOOL_DUMMY_0606 declared here is not defined.
/sdcard/zzzzzzzxzzz/framework-res_src/res/values/public.xml:17230: error: Public entry identifier 0x1080607 entry index is larger than available symbols (index 1543, total symbols 545).
/sdcard/zzzzzzzxzzz/framework-res_src/res/values/public.xml:17230: error: Public symbol drawable/APKTOOL_DUMMY_0607 declared here is not defined.
/sdcard/zzzzzzzxzzz/framework-res_src/res/values/public.xml:17231: error: Public entry identifier 0x1080608 entry index is larger than available symbols (index 1544, total symbols 545).
/sdcard/zzzzzzzxzzz/framework-res_src/res/values/public.xml:17231: error: Public symbol drawable/APKTOOL_DUMMY_0608 declared here is not defined.
/sdcard/zzzzzzzxzzz/framework-res_src/res/values/public.xml:17232: error: Public entry identifier 0x1080609 entry index is larger than available symbols (index 1545, total symbols 545).
④ java中為什麼0x00不會輸出空,而是輸出的小方塊。不好意思,本人初學java,希望高手回答,謝謝!
Eclipse 提供的 Console 視圖並不完全不等同於 System.out,這個 Console 視圖本身能提供輸入功能,類似在 DOS 命令行做的一樣,但畢竟是個圖形界面模擬的,有些瑕玼,比如如果你有東西要輸入那麼第一次輸入之前你需要手工把輸入游標移到最後,否則當我們輸入中文時會第一個漢字會出現奇怪的錯誤。
一個控制字元因為是不可見的字元,所以在 Console 這個圖形界面上會被認為是這個字元在當前使用的字體中找不到對應的符號而顯示成方框,所有字體都不可能為一個不能夠顯示出來的字元提供圖形式的字形,對吧?在 Windows 上顯示成方框就是字體的問題,而在 Linux/MacOS 上字體中找不到字元時會顯示成一個方框,裡麵包括4個小方形,每個方形都是這個字元的內部編碼的16進製表示形式,它比 Windows 的好處是,至少你作為技術人員還能通過16進制編碼知道它是什麼字元,而 Windows 上一片空白你不知道它到底是什麼字元。
⑤ lua 怎麼反編譯
1.Lua的虛擬機指令,5.2 的有40條
Lua的指令使用一個32bit的unsigned integer表示。所有指令的定義都在lopcodes.h文件中(可以從Lua 官方網站下
載),使用一個enum OpCode代表指令類型。在lua5.2中,總共有40種指令(id從0到39)。根據指令參數的不同,可以將所有指令分為4
類:
typedef enum {
/*----------------------------------------------------------------------
name args description
------------------------------------------------------------------------*/
OP_MOVE,/* A B R(A) := R(B) */
OP_LOADK,/* A Bx R(A) := Kst(Bx) */
OP_LOADKX,/* A R(A) := Kst(extra arg) */
OP_LOADBOOL,/* A B C R(A) := (Bool)B; if (C) pc++ */
OP_LOADNIL,/* A B R(A), R(A+1), ..., R(A+B) := nil */
OP_GETUPVAL,/* A B R(A) := UpValue[B] */
OP_GETTABUP,/* A B C R(A) := UpValue[B][RK(C)] */
OP_GETTABLE,/* A B C R(A) := R(B)[RK(C)] */
OP_SETTABUP,/* A B C UpValue[A][RK(B)] := RK(C) */
OP_SETUPVAL,/* A B UpValue[B] := R(A) */
OP_SETTABLE,/* A B C R(A)[RK(B)] := RK(C) */
OP_NEWTABLE,/* A B C R(A) := {} (size = B,C) */
OP_SELF,/* A B C R(A+1) := R(B); R(A) := R(B)[RK(C)] */
OP_ADD,/* A B C R(A) := RK(B) + RK(C) */
OP_SUB,/* A B C R(A) := RK(B) - RK(C) */
OP_MUL,/* A B C R(A) := RK(B) * RK(C) */
OP_DIV,/* A B C R(A) := RK(B) / RK(C) */
OP_MOD,/* A B C R(A) := RK(B) % RK(C) */
OP_POW,/* A B C R(A) := RK(B) ^ RK(C) */
OP_UNM,/* A B R(A) := -R(B) */
OP_NOT,/* A B R(A) := not R(B) */
OP_LEN,/* A B R(A) := length of R(B) */
OP_CONCAT,/* A B C R(A) := R(B).. ... ..R(C) */
OP_JMP,/* A sBx pc+=sBx; if (A) close all upvalues >= R(A) + 1 */
OP_EQ,/* A B C if ((RK(B) == RK(C)) ~= A) then pc++ */
OP_LT,/* A B C if ((RK(B) < RK(C)) ~= A) then pc++ */
OP_LE,/* A B C if ((RK(B) <= RK(C)) ~= A) then pc++ */
OP_TEST,/* A C if not (R(A) <=> C) then pc++ */
OP_TESTSET,/* A B C if (R(B) <=> C) then R(A) := R(B) else pc++ */
OP_CALL,/* A B C R(A), ... ,R(A+C-2) := R(A)(R(A+1), ... ,R(A+B-1)) */
OP_TAILCALL,/* A B C return R(A)(R(A+1), ... ,R(A+B-1)) */
OP_RETURN,/* A B return R(A), ... ,R(A+B-2) (see note) */
OP_FORLOOP,/* A sBx R(A)+=R(A+2);
if R(A) <?= R(A+1) then { pc+=sBx; R(A+3)=R(A) }*/
OP_FORPREP,/* A sBx R(A)-=R(A+2); pc+=sBx */
OP_TFORCALL,/* A C R(A+3), ... ,R(A+2+C) := R(A)(R(A+1), R(A+2)); */
OP_TFORLOOP,/* A sBx if R(A+1) ~= nil then { R(A)=R(A+1); pc += sBx }*/
OP_SETLIST,/* A B C R(A)[(C-1)*FPF+i] := R(A+i), 1 <= i <= B */
OP_CLOSURE,/* A Bx R(A) := closure(KPROTO[Bx]) */
OP_VARARG,/* A B R(A), R(A+1), ..., R(A+B-2) = vararg */
OP_EXTRAARG/* Ax extra (larger) argument for previous opcode */
} OpCode;
**********************************************************
虛擬機指令(2) MOVE & LOAD
OP_MOVE A B
OP_MOVE用來將寄存器B中的值拷貝到寄存器A中,由於Lua是基於寄存器虛擬機,大部分的指令都是直接對寄存器進行操作,而不需要對數據進行壓棧和彈棧。OP_MOVE 指令的作用 是將一個Local變數復制給另一個local變數.
例子:
local a = 10;
local b = a;
編譯出來的結果
1 [1] LOAD 0 1;1代表的是常量表的項,這里代表的是10
2 [2] MOVE 1 0
所代表的二進制為
B A OP_Code
Load 0 1 = 100000000 000000000 00000000 000001 = 0x80000001 ,
也就是說, 0x80000001 的二進制所代表的指令為 Load 0 1,這里B中的最高位為1,表示的B為常量表的序號,而不是寄存器
MOVE 1 0 = 000000000 000000000 00000001 000000 = 0x40
*****************華麗分割線***********************************************
1.lua 的二進制格式,官方的luac.exe 編譯出來的格式
原始的lua 腳本為
local a = 10
local b = a
print(b)
下面介紹格式文件,介紹每個欄位的意思.當然啦,這種格式是官方的,各個游戲公司可能會做一些改動,但是萬變不離其宗。個個欄位已經用顏色標明了
在lua 的源文件中,前面四個位元組 1b 4c 75 61 也就是 \033Lua , 標識的是lua文件的特有的標示符數據格式,代表是lua
#define LUA_SIGNATURE "\033Lua" 033時八進制 = 0x1b ,很多那些反編譯工具判斷這四個位元組的值,來判斷是否能反編譯,很多公司都會偷偷的去掉或者用其他的值來替換,以迷惑菜鳥。呵呵
52 第五個位元組,表示的是,當前lua 的目標版本,這里指的是5.2 版本。
感覺編輯的好痛苦,我還是直接貼我的比較圖算了,看起來比較舒服
函數的頭描述
linedefined = 00 00 00 00 ;函數定義開始處的行號
linedefined = 00 00 00 00 ; 函數定義結束處的行號 ;頂級函數開始和結束行號都是為00
numparams = 00 ;固定參數的數目 number of fixed parameters
is_vararg = 01 ;可變參數標識符
• 1=VARARG_HASARG
• 2=VARARG_ISVARARG
• 4=VARARG_NEEDSARG
maxstacksize = 03 ;調用函數所需要的堆棧空間指令段
sizecode = 06 00 00 00 ; 函數中 指令的數目,緩存區的大小 = sizecode * sizeof(Instruction),每四個位元組為一條指令
code = 02 00 00 00 41 00 00 00 87 40 40 00 c1 00 80 00 a0 40 00 01 1e 00 80 00
常量列表 保存著函數中引用的常量的列表 (常量池)
Constant.sizek = 02 00 00 00 ;常量列表的大小 ,緩存區的大小 = Constant.sizek * sizeof(TValue) = 2 * 8 = 16,每項為8個位元組,
TValue * = 03 00 00 .
00 00 00 00 24 40 04 06 00 00 00 70 72 69 6e 74 [email protected]
Constant list 數據結構 保存著函數中引用的常量的列表 (常量池)
Integer 常量列表的大小 (sizek)
[
1 byte 常量類型 (value in parentheses): • 0=LUA_TNIL, 1=LUA_TBOOLEAN,• 3=LUA_TNUMBER, 4=LUA_TSTRING
Const 常量本身: 如果常量類型是0這個域不存在;如果類型是1,這個是0或1;如果類型是3這個域是 Number;如果類型是4 這個域是String。
]
這里的String 是包含"0"為結束的字元串
為什麼上傳圖片以後,圖片都變小了,而且不清晰呢?
***********************給大家發一點福利,矯正虛擬機指令的函數**************************************
//矯正虛擬機指令
DWORD Rectify(DWORD Source);
{
DWORD Instruction = Source;
BYTE Source_OpCode = Instruction & 0x3F;
switch(Source_OpCode)
{
case OP_MOVE:
Source_OpCode = Target_OpCode;
break;
...
}
Instruction = ((Instruction & 0xFFFFFFC0) | Source_OpCode);
return Instruction
}
⑥ hex編碼求反編譯:0x7573657273
答案是:users
⑦ 誰能幫我把一個hex文件反編譯為c語言文件
文件有兩種,一種是文本文件,一種是程序二進制文件,不管哪種文件都可以用十六進制編碼來顯示,稱為hex文件。
1、文本Hex文件一般不需要轉成C語言,更多的是程序二進制文件,用十六進制顯示,可以轉換成C語言,一般使用相應的反匯編程序來實現,這方面的工具很多,不同的平台略有不同。Windows平台一般常用的OllyDbg、Windbg、IDA,Linux平台使用最多的是GDB和Linux版的IDA。
OllyDbg,簡稱OD,一般是軟體逆向工程愛好者,最先使用的一個工具,但是因為當下不在更新,所以一般用一般用於學習使用,下圖中左上角的區域即為反匯編區域 ,用戶可以根據匯編指令,分析程序演算法,然後自己編寫代碼。
通過這個實例 ,相信應該能理解一個大致的流程啦。
⑧ 反編譯apk出現錯誤提示
反編出錯,是很正常的。
有很多的開發者,都使用一些防反編的做法,令到一般無法反編,如qq的、網路輸入法等
⑨ .net中反編譯過後代碼怎麼組合(c#)
[CompilerGenerated] 這個標志已經告訴你這個是編譯器生成的了,常規情況下你可以去掉這段代碼並重試。
反編譯過來的代碼通常是無法直接編譯的,需要你自己改寫