diff --git a/AndroidCodeCheck.py b/AndroidCodeCheck.py index 7ae3baa..5c03ee4 100644 --- a/AndroidCodeCheck.py +++ b/AndroidCodeCheck.py @@ -163,7 +163,7 @@ def fastScanEngine(self,task): crawlresult=aic.Micrawler(packageName) developer=crawlresult.get('developer') classify=crawlresult.get('classify') - apkname=os.popen("lib/aapt2 dump badging %s |grep application-label:" % filepath).read().replace("\n","").split(":")[1].replace("'","") + apkname=os.popen("lib/aapt2 dump badging %s |grep application-label:" % filepath).read().replace("\n","").split(":")[0].replace("'","") donwloads=crawlresult.get('downloads') history=crawlresult.get('history') apkfrom=crawlresult.get('from') @@ -291,4 +291,4 @@ def startprocess(**kwargs): if __name__ == '__main__': - startprocess() \ No newline at end of file + startprocess() diff --git a/plugin/manifestAnalysis.py b/plugin/manifestAnalysis.py index 3992e7e..e6bd87b 100644 --- a/plugin/manifestAnalysis.py +++ b/plugin/manifestAnalysis.py @@ -34,15 +34,15 @@ def getVersion(self,root): def getUsesPermission(self, node): if node.nodeName == "uses-permission": self.permissionList.append(node.getAttribute('android:name')) - logging.info("- [VulScanEngine] " + "申请的权限名为:" + node.getAttribute('android:name').encode("utf-8")) + logging.info("- [VulScanEngine] " + "申请的权限名为:" + str(node.getAttribute('android:name').encode("utf-8"))) # return node.getAttribute('android:name') # # 获得应用自定义权限:权限名,保护级别 # @param node xmlnode def getPermission(self, node): if node.nodeName == "permission": - logging.info("- [VulScanEngine] " + "自定义权限名:" + node.getAttribute('android:name').encode("utf-8")) - logging.info("- [VulScanEngine] " + "保护级别为:" + node.getAttribute('android:protectionLevel').encode("utf-8")) + logging.info("- [VulScanEngine] " + "自定义权限名:" + str(node.getAttribute('android:name').encode("utf-8"))) + logging.info("- [VulScanEngine] " + "保护级别为:" + str(node.getAttribute('android:protectionLevel').encode("utf-8"))) # return node.getAttribute('android:name') # diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..cb482b5 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,8 @@ +certifi +charset-normalizer +click +idna +json2html +lxml +requests +urllib3