Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

系统增加自定义jdk的配置项或参数 #20

Open
kenyon-wong opened this issue Sep 5, 2022 · 3 comments
Open

系统增加自定义jdk的配置项或参数 #20

kenyon-wong opened this issue Sep 5, 2022 · 3 comments

Comments

@kenyon-wong
Copy link

尝试使用 AppInfoScanner 时报错:

env:

python:Python 3.10.6
jdk:openjdk version "11.0.16.1" 2022-08-12
os: macOS 12.5.1
AppInfoScanner:V1.0.8_Releases(9月5日直接clone仓库)

└─$ python3 app.py android -i './main_sit_v1.0.0.37_debug.apk'
[*] Create directory /Users/hacker/Desktop/AppInfoScanner/out
[*] AI is analyzing filtering rules......
[*] The filtering rules obtained by AI are as follows: {'.*umeng.com', '.*w3.org', '.*apache.org', '.*localhost', '.*127.0.0.1', '.*android.com', '.*jpush.cn', '.*w3school.com.cn', '.*0.0.0.0', '.*apple.com', '.*.amap.com', '.*github.com', '.*umengcloud.com'}
openjdk version "11.0.16.1" 2022-08-12
OpenJDK Runtime Environment Homebrew (build 11.0.16.1+0)
OpenJDK 64-Bit Server VM Homebrew (build 11.0.16.1+0, mixed mode)
Input file (./main_sit_v1.0.0.37_debug.apk) was not found or was not readable.
[-] Decompilation failed, please submit error information at https://github.com/kelvinBen/AppInfoScanner/issues
Traceback (most recent call last):
  File "/Users/hacker/Desktop/AppInfoScanner/app.py", line 72, in <module>
    main()
  File "/Users/hacker/Desktop/AppInfoScanner/app.py", line 69, in main
    cli()
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/Users/hacker/Desktop/AppInfoScanner/app.py", line 32, in android
    raise e
  File "/Users/hacker/Desktop/AppInfoScanner/app.py", line 30, in android
    BaseTask("Android", inputs, rules, sniffer, threads, package).start()
  File "/Users/hacker/Desktop/AppInfoScanner/libs/task/base_task.py", line 46, in start
    task_info = self.__tast_control__()
  File "/Users/hacker/Desktop/AppInfoScanner/libs/task/base_task.py", line 86, in __tast_control__
    task_info = AndroidTask(cacar_path,self.package).start()
  File "/Users/hacker/Desktop/AppInfoScanner/libs/task/android_task.py", line 35, in start
    if self.__decode_file__(input_file_path) == "error":
  File "/Users/hacker/Desktop/AppInfoScanner/libs/task/android_task.py", line 50, in __decode_file__
    self.__decode_apk__(file_path,apktool_path,output_path)
  File "/Users/hacker/Desktop/AppInfoScanner/libs/task/android_task.py", line 86, in __decode_apk__
    raise Exception(file_path + ", Decompilation failed.")
Exception: ./main_sit_v1.0.0.37_debug.apk, Decompilation failed.

因个人习惯,系统增加自定义jdk的配置项或参数

@kelvinBen
Copy link
Owner

kelvinBen commented Sep 7, 2022

@kenyon-wong 师傅,您好~目前看到的报错信息是输入的文件路径不存在,是因为相对路径的原因导致。AppInfoScanner目前不支持相对路径的方式作为输入参数,需要将输入的路径参数改为绝对路径。

@kenyon-wong
Copy link
Author

嗯嗯,确实使用绝对路径即可执行。

但还是希望增加如下两个功能点:

  1. 支持自定义 jdk 路径;
  2. 支持使用相对路径调用需要测试的apk文件

@kelvinBen
Copy link
Owner

@kenyon-wong

功能1:是根据系统中的JAVA环境变量进行调解的,如有需要后续可以添加
功能2:后续功能中可以考虑

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants