顧客がjarファイルに古くからサポートされていないサードパーティのベンダーコードを与えられていますが、リバースエンジニアリングを試みています。サーバーに送信します。デコンパイルされたコード内に問題が発生するGotoステートメント
私はそれを逆コンパイルしました。クラスの1つにラベルとgoto文があるようです。私が理解しているように、gotoはJavaではサポートされていないため、私のコンパイラはこれにヒースフィットを投げています。
私が原因IPの問題のために、すべてのコードを投稿することはできませんが、ここでの要点は、(私がコメントでコンパイルエラーを入れている)である:
private void methodName(InputType input)
throws ConfigurationException
{
// initialization code here
_L2:
String x; // The compiler is complaining that "String cannot be resolved to a variable" here
String y; // This line is fine though...
// Some Code here
x = <SOME VALUE> // Compiler complains about "x cannot be resolved to a variable"
y = <ANOTHER VALUE> // Compiler is fine with this.
// Some more code
if(true) goto _L2; else goto _L1 // Multiple issues here see following lines.
// Syntax error on token "goto", throw expected
// _L2 cannot be resolved to a variable
// Syntax error on token "goto", { expected
// Syntax error on token "goto", { expected
_L1: // Syntax error on token "goto", { expected
local; // local cannot be resolved to a variable
// Some more code
JVM INSTR ret 12; // Multiple issues here see following lines.
// JVM INSTR ret 12;
// Syntax error on token "ret", = expected
return;
}
私は行が続くことを理解結腸ではラベルですが、ここで何がうまくいかないのか分かりません。
local;
またはこの:
後藤とのラインがそう、彼らはここには無関係であると私はラベルを削除することもできますが、私は、この行が何を意味するか理解していない 真のためにテストしている
JVM INSTR ret 12;
これを解釈する助けがあれば幸いです。
デコンパイラがJVMバイトコードをJavaに変換すると主張しているが、出力しているコードが有効なJavaではない場合、デコンパイラのバグではありませんか? – Raedwald
厄介なメモ:リバースエンジニアリングの第三者ベンダーコードに注意してください。ベンダーが許可していない可能性があります:/ – Christian
私は可能な限りコードを難読化していると思います... –