Skip to content

检测时报错TypeError: can only concatenate str (not "bytes") to str #10

Description

@shen771

└─# python AndroidCodeCheck.py --taskpath /home/kali/xx.apk --output json

[init] - Decode the AndroidManifest.xml file Successfully!
outputpath=>/tmp/hades/result/xxx-573524
[init] - Decompile the dex file Successfully.
Traceback (most recent call last):
File "/home/kali/ApkVulCheck/AndroidCodeCheck.py", line 294, in
startprocess()
File "/usr/lib/python3/dist-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kali/ApkVulCheck/AndroidCodeCheck.py", line 285, in startprocess
apkAnalysis().fastScanEngine({
File "/home/kali/ApkVulCheck/AndroidCodeCheck.py", line 27, in wrapper
ret=func(*args,**kwargs)
^^^^^^^^^^^^^^^^^^^^
File "/home/kali/ApkVulCheck/AndroidCodeCheck.py", line 152, in fastScanEngine
cptcheck.run()
File "/home/kali/ApkVulCheck/plugin/manifestAnalysis.py", line 138, in run
self.android_manifest_check()
File "/home/kali/ApkVulCheck/plugin/manifestAnalysis.py", line 122, in android_manifest_check
self.getUsesPermission(node) # usespermission
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kali/ApkVulCheck/plugin/manifestAnalysis.py", line 37, in getUsesPermission
logging.info("- [VulScanEngine] " + "申请的权限名为:" + node.getAttribute('android:name').encode("utf-8"))
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TypeError: can only concatenate str (not "bytes") to str

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions