android java花指令_[求助] 一段java花指令,求大佬指点 QAQ

最近在看Android混淆,发现这么一段java代码,添加进函数后用dex2jar反编译,整个函数范围都会反编译失败并显示byte code。

这里是代码:

BufferedReader br = null;

try {

br = new BufferedReader(new FileReader("fakeFile"));

String line;

while ((line = br.readLine()) != null) {

String[] splitted = line.split(" +");

if (splitted.length >= 0) {

break;

}

}

} catch (Exception e) {

e.printStackTrace();

} finally {

try {

br.close();

} catch (IOException e) {

e.printStackTrace();

}

}

代码加入main函数后反编译:

519a4e4c73a32ea5bbb527ae10d7976e.png

dex2jar版本2.1,并没有显示报错...用-v参数也没看出什么有价值的信息= =

求各位大佬给个分析思路...

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
SEH异常的应用 SEH异常就是结构化异常处理,程序遇到SEH异常时,异常交给系统处理(这讲是一个非常负责的过程,很容易跟飞),所以利用SEH异常时可以一定程度的防止程度调试(SEH异常在壳里是很常见的)。 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ push ******** //地址压入堆栈 mov eax,dword ptr fs:[0] push eax //fs[0]压入堆栈,执行完成后fs[0]指向堆栈 mov dword ptr fs:[0],esp //构造一个ERR结构 mov esi,0 //简单的赋值语句 mov eax,dword ptr ds:[esi] //产生异常 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ push ******** mov eax,dword ptr fs:[0] push eax mov dword ptr fs:[0],esp mov ebx,0 div ebx ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ nop push ******** mov eax,dword ptr fs:[0] push eax mov dword ptr fs:[0],esp int 3 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ push ******** mov eax,dword ptr fs:[0] push eax mov dword ptr fs:[0],esp nop int 68 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ push ******** mov eax,dword ptr fs:[0] push eax mov dword ptr fs:[0],esp nop vxdcall 134543 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ push ******** mov eax,dword ptr fs:[0] push eax mov dword ptr fs:[0],esp ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ push xxx push dword ptr fs:[0] mov fs:[0], esp stc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ push xxx push dword ptr fs:[0] mov fs:[0], esp JMP 0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ push xxx push dword ptr fs:[0] mov fs:[0], esp ret ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ push xxx push dword ptr fs:[0] mov fs:[0], esp pop ss
### 回答1: 以下是Java写的水仙数代码示例: ```java public class NarcissisticNumber { public static void main(String[] args) { int start = 100; int end = 999; for (int i = start; i <= end; i++) { int a = i / 100; // 百位数 int b = i / 10 % 10; // 十位数 int c = i % 10; // 个位数 if (i == a * a * a + b * b * b + c * c * c) { System.out.println(i); } } } } ``` 该代码可以输出从100到999之间的所有水仙数。水仙数指一个三位数,其各位数字立方和等于该数本身。 ### 回答2: 水仙数是指一个 n 位数(n≥3),它的每个位上的数字的 n 次幂之和等于它本身。例如,153 是一个水仙数,因为 1^3 + 5^3 + 3^3 = 153。 要生成一段 Java 代码来找出所有的水仙数,可以使用嵌套循环来遍历所有可能的 n 位数,并对每个数字进行计算和判断。 以下是一段生成水仙数的 Java 代码: ```java public class NarcissisticNumber { public static void main(String[] args) { int n = 3; // 定义位数 for (int i = (int) Math.pow(10, n-1); i < Math.pow(10, n); i++) { int current = i; int sum = 0; while (current > 0) { int digit = current % 10; sum += Math.pow(digit, n); current /= 10; } if (sum == i) { System.out.println(i); // 输出水仙数 } } } } ``` 在以上代码中,我们通过 for 循环从 10^(n-1) 开始遍历到 10^n,对每个遍历到的数字,我们使用一个 while 循环来计算该数字的每位数字的 n 次幂之和,然后与原数字进行比较。如果相等,就将该数字输出为水仙数。 通过运行以上代码,我们可以得到所有的 n 位数水仙数。请注意,代码中的 n 可以根据实际需进行修改。 ### 回答3: 水仙数,又称为自恋数或阿姆斯特朗数,是一个三位数,其各位数字的立方和等于该数本身。例如,153是一个水仙数,因为1^3 + 5^3 + 3^3 = 153。现在,我将用Java语言生成一段程序来找出所有的水仙数。 首先,我们需要用三个嵌套的循环来遍历所有的三位数。外层循环控制百位数字的变化,中层循环控制十位数字的变化,内层循环控制个位数字的变化。 具体代码如下: ```java public class NarcissisticNumber { public static void main(String[] args) { for (int i = 1; i <= 9; i++) { for (int j = 0; j <= 9; j++) { for (int k = 0; k <= 9; k++) { int number = i * 100 + j * 10 + k; int sum = i * i * i + j * j * j + k * k * k; if (number == sum) { System.out.println(number); } } } } } } ``` 以上代码中,`i`代表百位数字,`j`代表十位数字,`k`代表个位数字。我们通过`number`保存当前的三位数,通过`sum`计算该三位数的各数字立方和。 在内层循环中,我们将`number`与`sum`进行比较,如果相等,则打印出该水仙数。 以上就是用Java语言生成一段找出所有水仙数的程序。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值