From c4f6e62f54db24afb5351d180d7f9f7f02744e8a Mon Sep 17 00:00:00 2001 From: CyanSleep Date: Thu, 11 Apr 2024 11:52:08 +0800 Subject: [PATCH 1/3] Update AndroidCodeCheck.py --- AndroidCodeCheck.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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() From 2f22d6f5ce0ea4a1e95261ebf0224446d77e1b35 Mon Sep 17 00:00:00 2001 From: CyanSleep Date: Thu, 11 Apr 2024 11:52:36 +0800 Subject: [PATCH 2/3] Update manifestAnalysis.py --- plugin/manifestAnalysis.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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') # From c088434552edb098d806a3ff6b7a57d33e9a03f3 Mon Sep 17 00:00:00 2001 From: CyanSleep Date: Thu, 11 Apr 2024 11:53:38 +0800 Subject: [PATCH 3/3] Create requirements.txt --- requirements.txt | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 requirements.txt 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