


版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、java class 利用 jad 反編譯之后,偶爾回碰到一些不正常的代碼,例如: label0 :_L1 MISSING_BLOCK_LABEL_30 、JVM INSTR ret 7 、JVM INSTR tableswitch 1 3: default 269、 JVMINSTR monitorexit 、 JVM INSTR monitorenter ,這些一般是由特殊的 for 循環(huán)、 try catch finally 語句塊、 synchronized 語句反編譯后產(chǎn)生的。下面,就簡(jiǎn)單介紹一下,一些反編譯后的特殊代碼的還原規(guī)則。本文 在 下測(cè)試。第一部分、 for、 while
2、循環(huán)1、普通的循環(huán),原始view plaincopy to clipboardprint?Java 代碼1.publicvoid f1() 2.boolean flag = false ;3.if (Boolean.getBoolean("sys" ) 4.System.out.println("sys" );5.else 6.for ( int i = 0; i <10; i+) 7.flag = Boolean.getBoolean("sys" );8.if (flag) 9.System.exit(0);10.11.12.
3、13.Java 代碼1.publicvoid f1() 2.boolean flag = false ;3.if (Boolean.getBoolean("sys" ) 4.System.out.println("sys" );5.else 6.for ( int i = 0; i <10; i+) 7.flag = Boolean.getBoolean("sys" );8.if (flag) 9.System.exit(0);3.反編譯后的代碼 view plaincopy to clipboardprin
4、t?Java 代碼1.publicvoid f1()2.3.boolean flag = false ;4.if (Boolean.getBoolean("sys" )5.6.System.out.println("sys" );7.else8.9.for (int i = 0; i <10; i+)10.11.flag = Boolean.getBoolean("sys" );12.if (flag)13.System.exit(0);7.Java 代碼1.publicvoid f1()2.3.boolea
5、n flag = false ;4.if (Boolean.getBoolean("sys" )5.6.System.out.println("sys" );7.else8.9.for (int i = 0; i <10; i+)10.11.flag = Boolean.getBoolean("sys" );12.if (flag)13.System.exit(0);7.2 、反編譯后代碼變的很古怪,這是java 原代碼 view plaincopy to clipboardprint?Java 代碼1.pu
6、blic void f2() 2.int list =new int 1,2, 3, 4 ;3.if (Boolean.getBoolean("sys") 4.System.out.println("sys");5.else6.check:while ( true ) 7.for ( int i = 0; i< list.length; i+) 8.if (listi =2) 9.continuecheck;10.else 11.break ;5.16.Java 代碼1.publicvoidf2() 2.int list =ne
7、w int 1, 2, 3, 4 ;3.if(Boolean.getBoolean( "sys" ) 4.System.out.println( "sys" );5.else 6.check:while ( true ) 7.for ( int i = 0; i< list.length; i+) 8.if (listi =2) 9.continuecheck;10.else 11.break ;5.16.Java 反編譯后的代碼,部分邏輯丟失。 view plaincopy to clipboardprint?Java 代碼1
8、.publicvoid f2()2.3.int list = 4.1, 2, 3, 45.;6.if (Boolean.getBoolean("sys" )7.System.out.println("sys" );8. i = 0;12.if (i >= list.length | listi !=2);13.while (true );14.Java 代碼1.publicvoidf2()2.3.intlist = 4.1, 2, 3, 45.;6.if(Boolean.getBoolean("sys&q
9、uot; )7.System.out.println("sys" );8. i = 0;12.if (i >= list.length | listi !=2);13.while (true );14.3、就是比 f2 ()多了一行 ,反編譯后也挺怪的。源碼如下: view plaincopy to clipboardprint?Java 代碼1.publicvoid f3() 2.int list =new int 1, 2, 3, 4 ;3.if (Boolean.getBoolean( "sys" ) 4.S
10、ystem.out.println(sys" );5.else 6.check: while ( true ) 7.for( int i = 0; i< list.length; i+) 8.System.out.println("listi" );9.if (listi =2) 10.continuecheck;11.else 12.break ;6.17.Java 代碼1.publicvoid f3() 2.int list =new int 1, 2, 3, 4 ;3.if (Boolean.getBoolean( "sy
11、s" ) 4.System.out.println(sys" );5.else 6.check: while ( true ) 7.for( int i = 0; i< list.length; i+) 8.System.out.println("listi" );9.if (listi =2) 10.continuecheck;11.else 12.break ;6.17.反編譯后的代碼: view plaincopy to clipboardprint?Java 代碼1.publicvoid f3()2.3.int list
12、 = 4.1, 2, 3, 45.;6.if (Boolean.getBoolean("sys")7.System.out.println("sys");8. i;12.do13.i =0;14.while (i >= list.length);15.System.out.println("listi" );16.if (listi !=2);17. while (true );18.Java 代碼1. public void f3()2. 3.int list = 4.1, 2, 3, 45.
13、;6.if (Boolean.getBoolean("sys" )7.System.out.println("sys" );8. i;12.do13.i =0;14.while (i >= list.length);15.System.out.println("listi"16.if (listi !=2);17.while (true );18.4、 f2()中的 break 語言,移動(dòng)了位置。源碼如下:view plaincopy to clipboardprint?Java 代碼1.pub
14、licvoid f4() 2.int list =new int 1, 2, 3, 4 ;3.if (Boolean.getBoolean( "sys" ) 4.System.out.println( "sys" );5.else 6.check:while ( true ) 7.for ( int i = 0; i < list.length; i+) 8.if (listi =2) 9.continue check;10.11.12.break ;13.14.15.Java 代碼1.publicvoid f4() 2.int list =new
15、 int 1, 2, 3, 4 ;3.if (Boolean.getBoolean( "sys" ) 4.System.out.println( "sys" );5.else 6.check: while ( true ) 7.for ( int i = 0; i < list.length; i+) 8.if (listi =2) 9.continuecheck;10.11.12.break ;13.14.15.反編譯后代碼: view plaincopy to clipboardprint?Java 代碼1.publicvoid f4()2.3
16、.intlist = 4.1, 2, 3, 45.;6.inti;7.if(Boolean.getBoolean( "sys" )8.System.out.println( "sys" );9.else10.label0:11.do12.13.for (i = 0; i < list.length; i+)14.if (listi = 2)15.continue label0;16.17.break ;18.while (true );19.20.Java 代碼1.publicvoid f4()2.3.int list = 4.1, 2, 3, 4
17、5.;6.int i;7.if (Boolean.getBoolean("sys" )8.System.out.println("sys" );9.else10.label0:11.do12.13.for (i = 0; i < list.length; i+)14.if (listi = 2)15.continue label0;16.17.break ;18.while (true );19.5、就是比 f4 ()多了一行 ,反編譯后相當(dāng)怪的。源碼如下: view plaincopy to clipboardprint?Java 代碼1.pub
18、licvoid f5() 2.int list =new int 1, 2, 3, 4 ;3.if (Boolean.getBoolean( "sys" ) 4.System.out.println( "sys" );5.else 6.check:while ( true ) 7.for ( int i = 0; i< list.length; i+) 8.System.out.println("listi" );9.if (listi =2) 10.continuecheck;11.12.13.break ;14.15.16.
19、Java 代碼1.2.publicvoid f5() int list = new int 1, 2, 3, 4 ;3.if (Boolean.getBoolean( "sys" ) 4.System.out.println( "sys" );5.else 6.check: while ( true ) 7.for ( int i = 0; i< list.length; i+) 8.System.out.println("listi" );9.if (listi =2) 10.continuecheck;11.12.13.br
20、eak ;14.15. 16. 反編譯后比較暈的代碼: view plaincopy to clipboardprint?Java 代碼1.public void f5()2.3.int list = 4.1, 2, 3, 45.;6.if (!Boolean.getBoolean( "sys" )goto_L2;else goto _L17._L1:8.System.out.println( "sys" );9.goto _L310._L2:11.int i = 0;12.goto _L413._L6:14.System.out.println( &q
21、uot;listi" );15.if (listi != 2) goto _L5; elsegoto_L216._L5:17.i+;18._L4:19.if (i < list.length) goto _L6;else goto_L320._L3:21.Java 代碼1. public void f5()2. 3. int list = 4. 1, 2, 3, 45. ;6. if (!Boolean.getBoolean( "sys" ) goto _L2; else goto _L17. _L1:8.System.out.println("s
22、ys" );9.goto _L310._L2:11.int i = 0;12.goto _L413._L6:14.System.out.println("listi" );15.if (listi !=2) goto _L5; else goto _L216._L5:17.i+;18. _L4:goto _L6; else goto _L319. if (i < list.length)20. _L3:21. 6 、就是比 f5() 多了一行 System.exit(0); 代碼,但是差異確很大。 源碼如下: view plaincopy to clipbo
23、ardprint? Java 代碼1.publicvoid f6() 2.int list =new int 1, 2,3, 4 ;3.if (Boolean.getBoolean( "sys" ) 4.System.out.println( "sys" );5.else 6.check: while ( true ) 7.for ( int i = 0; i < list.length; i+) 8.System.out.println("listi" );9.if (listi =2) 10.continue check;1
24、1.12.13.System.exit( 0);14.break ;15.16.17.Java 代碼2.int list = new int 1,2,3.if (Boolean.getBoolean( "sys") 4.System.out.println("sys");5. else 6.check: while( true ) 7.for ( inti = 0; i < list.leng8.System.out.println(9.if (listi =2) 10.continue check;11.12.13.System.exit(0);
25、14.break ;15.16.1.publicvoid f6() "listi"3, 4 ; i+) );17. 編譯后代碼,比 f5() 差異太大了。 view plaincopy to clipboardprint?Java 代碼1.publicvoid f6()2.3.int list;4.list= (new int 5.1, 2, 3, 46.);7.if (Boolean.getBoolean( "sys" )8.9.System.out.println("sys" );10.break MISSING_BLOCK_LA
26、BEL_75;11.12._L2:13.int i = 0;14.goto _L115._L5:16.System.out.println("listi" );17.if (listi !=2)goto _L3; else goto _L218._L3:19.i+;20._L1:21.if (i < list.length)goto _L5; else goto _L422._L4:23.System.exit( 0);24.Java 代碼1.publicvoidf6()2.3.intlist;4.list = (new int 5.1, 2, 3, 46.);7.i
27、f(Boolean.getBoolean("sys" )8.9.System.out.println("sys" );10.break MISSING_BLOCK_LABEL_75;11.12._L2:13.inti = 0;14.goto _L115._L5:16.System.out.println("listi");17.if (listi !=2)goto _L3;else goto _L218._L3:19.i+;20._L1:21.if (i < list.length)goto _L5; else goto _L4
28、22._L4:23.System.exit( 0);24.7、差異就是 f6() 中的 System.exit(0); 移動(dòng)了位置,但是差異確很大。源碼如下:view plaincopy toclipboardprint?Java 代碼1.publicvoid f7() 2.int list =new int 1, 2, 3, 4 ;3.if (Boolean.getBoolean( "sys" ) 4.System.out.println( "sys" );5.else 6.check: while ( true ) 7.for ( int i = 0
29、; i< list.length; i+) 8.System.out.println("listi" );9.if (listi =2) 10.continuecheck;11.12.13.break ;14.15.System.exit( 0);16.17.Java 代碼1.publicvoid f7() 2.int list =new int 1, 2, 3, 4 ;3.if (Boolean.getBoolean( "sys" ) 4.System.out.println( "sys" );5.else 6.check:
30、while ( true ) 7.for ( int i = 0; i< list.length; i+) 8.System.out.println("listi" );9.if (listi =2) 10.continuecheck;11.12.13.break ;14.15.System.exit(0);16.17.編譯后代碼,比 f6() 差異太大了。 view plaincopy to clipboardprint?Java 代碼1.publicvoid f7()2.3.int list;4.list= (new int 5.1, 2, 3, 46.);7.i
31、f (Boolean.getBoolean( "sys" )8.9.System.out.println("sys" );10.break MISSING_BLOCK_LABEL_75;11.12._L2:13.int i = 0;14.goto _L115._L5:16.System.out.println("listi" );17.if (listi !=2)goto _L3; else goto _L218._L3:19.i+;20._L1:21.if (i < list.length)goto _L5; else got
32、o _L422._L4:23.System.exit( 0);24.Java 代碼1.public void f7()2.3.int list;4.list = ( new int 5.1, 2, 3, 46.);7.if (Boolean.getBoolean("sys" )8.9.System.out.println("sys" );10.break MISSING_BLOCK_LABEL_75;11.12._L2:13.int i = 0;14.goto _L115._L5:16.System.out.println("listi&quo
33、t; );17.if (listi !=2)goto _L3; else goto _L218._L3:19.i+;20._L1:21.if (i < list.length)goto _L5; else goto _L422._L4:23.System.exit( 0);24.8 、邏輯和 f7 比沒有變,只是多了一些 代碼。 view plaincopy to clipboardprint? Java 代碼1.2.publicvoid f8() int list =new int 1, 2, 3, 4 ;3.if (Boolean.getBoolean("sys"
34、 ) 4.System.out.println("sys" );5.else 6.System.out.println(":check while" );7.check: while ( true ) 8.System.out.println("for" );9.for ( int i = 0;i < list.length; i+) 10.System.out.println("listi" );11.if (listi =2) 12.continuecheck;13.14.15.System.out.pr
35、intln("break" );16.break ;17.18.System.out.println("exit(0)" );19.System.exit( 0);20.21.Java 代碼1.publicvoid f8() 2.int list =new int 1, 2, 3, 4 ;3.if (Boolean.getBoolean("sys" ) 4.System.out.println( "sys" );5. else 6.System.out.println(":check while"
36、;);7.check: while ( true ) 8.System.out.println( "for" );9.for ( int i = 0; i < list.length; i+) 10.System.out.println( "listi" );11.if (listi =2) 12.continue check;13.14.15.System.out.println( "break" );16.break ;17.18.System.out.println( "exit(0)" );19.Sy
37、stem.exit( 0);20.21.反編譯后的代碼:和 f7() 比較一下,基本就可以確定反編譯后的代碼對(duì)應(yīng)關(guān)系了。view plaincopy toclipboardprint?Java 代碼1.public void f8()2.3.int list;4.list = (new int 5.1, 2, 3, 46.);7.if (Boolean.getBoolean( "sys" )8.9.System.out.println( "sys" );10.break MISSING_BLOCK_LABEL_107;11.12.System.out.p
38、rintln( ":check while" );13._L2:14.int i;15.System.out.println( "for" );16.i =0;17.goto _L118._L5:19.System.out.println( "listi" );20.if (listi != 2) goto _L3; else goto _L221._L3:22.i+;23._L1:24.if (i < list.length)goto _L5; else goto _L425._L4:26.System.out.println
39、("break" );27.System.out.println("exit(0)" );28.System.exit( 0);29.Java 代碼1.public void f8()2.3.int list;4.list = ( new int 5.1, 2, 3, 46.);7.if (Boolean.getBoolean( "sys" )8.9.System.out.println("sys" );10.break MISSING_BLOCK_LABEL_107;11.12.System.out.printl
40、n(":check while");13._L2:14.int i;15.System.out.println("for" );16.i =0;17.goto _L118._L5:19.System.out.println("listi" );20.if (listi != 2)goto _L3; else goto _L221._L3:22.i+;23._L1:24.if (i < list.length)goto _L5;else goto _L425._L4:26.System.out.println("brea
41、k" );27.System.out.println("exit(0)" );28.System.exit( 0);29.9、邏輯和 f8 比沒有變, 只是多了一行 代碼,導(dǎo)致了反編譯后的 /* Loop/switch isn't completed */ 。 view plaincopy to clipboardprint?Java 代碼1. public void f9() 2. int list = new int 1, 2, 3, 4 ;3.if (Boolean.getBoolean("sys" ) 4.System
42、.out.println("sys" );5. else 6.System.out.println(":check while" );7.check: while( true) 8.System.out.println("for" );9.for ( inti =0; i < list.length; i+) 10.System.out.println("listi" );11.if (listi =2) 12.System.out.println("continue check" );1
43、3.continue check;14.15.16.System.out.println("break" );17.break ;18.19.System.out.println("exit(0)" );20.System.exit(0);21.22.23.Java 代碼1.publicvoid f9() 2.int list =newint 1, 2, 3, 4 ;3.if (Boolean.getBoolean("sys" ) 4.System.out.println("sys" );5.else 6.System.out.println(":check while" );7.check: while( true ) 8.System.out.println("for" );9.for ( inti = 0;i < list.length; i+) 10.System.out.println("listi" );11.if (list
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- Unit 5 Topic 2 Section C 教學(xué)設(shè)計(jì)-2024-2025學(xué)年仁愛科普版八年級(jí)英語下冊(cè)
- 二年級(jí)下冊(cè)數(shù)學(xué)教案-6.1菜園衛(wèi)士-連續(xù)進(jìn)位、退位的三位數(shù)加減三位數(shù) 青島版
- 六年級(jí)下冊(cè)數(shù)學(xué)教案-四 比例 面積的變化|蘇教版
- 一年級(jí)上冊(cè)數(shù)學(xué)教案- 老鷹捉小雞 青島版
- 中建三局房屋建筑實(shí)測(cè)實(shí)量培訓(xùn)
- (??家族e(cuò)題)2022-2023學(xué)年三年級(jí)上冊(cè)期末高頻考點(diǎn)數(shù)學(xué)試卷(蘇教版)
- 2024年科創(chuàng)大數(shù)據(jù)項(xiàng)目投資申請(qǐng)報(bào)告代可行性研究報(bào)告
- 2025年甘孜職業(yè)學(xué)院?jiǎn)握新殬I(yè)技能測(cè)試題庫及答案一套
- 2025年黑龍江冰雪體育職業(yè)學(xué)院?jiǎn)握新殬I(yè)技能測(cè)試題庫必考題
- 2024年人工種植牙項(xiàng)目資金需求報(bào)告代可行性研究報(bào)告
- 急性腎小球腎炎講稿
- 05G359-3 懸掛運(yùn)輸設(shè)備軌道(適用于一般混凝土梁)
- (完整版)《城市軌道交通應(yīng)急處理》課程標(biāo)準(zhǔn)
- 股骨頸骨折ppt精品
- 2023年江蘇農(nóng)牧科技職業(yè)學(xué)院?jiǎn)握新殬I(yè)適應(yīng)性測(cè)試題庫及答案解析
- 毛澤東詩詞鑒賞分析
- 量具檢具清單
- 江蘇市政工程計(jì)價(jià)表定額計(jì)算規(guī)則
- YY/T 1833.2-2022人工智能醫(yī)療器械質(zhì)量要求和評(píng)價(jià)第2部分:數(shù)據(jù)集通用要求
- 自然辯證法概論之馬克思主義自然觀
評(píng)論
0/150
提交評(píng)論