From 088a6414047cd24d46cc66c0a40b51d1d7255d91 Mon Sep 17 00:00:00 2001 From: Rohit Kumar Date: Tue, 5 Dec 2023 22:09:07 +0530 Subject: [PATCH] Fixed bugs and new features --- hawk_scanner/internals/system.py | 25 ------------------------- setup.py | 2 +- 2 files changed, 1 insertion(+), 26 deletions(-) diff --git a/hawk_scanner/internals/system.py b/hawk_scanner/internals/system.py index 2c18718..df9cbd0 100644 --- a/hawk_scanner/internals/system.py +++ b/hawk_scanner/internals/system.py @@ -1,4 +1,3 @@ -from androguard.misc import AnalyzeAPK from rich.console import Console from rich.table import Table import json, requests, argparse, yaml, re, datetime, os, subprocess, platform, hashlib @@ -267,9 +266,6 @@ def read_match_strings(file_path, source): # Check if the file is an archive (zip, rar, tar, tar.gz) elif file_path.lower().endswith(('.zip', '.rar', '.tar', '.tar.gz')): content = read_archive(file_path) - # Check if the file is an APK (Android application package) - elif file_path.lower().endswith('.apk'): - content = read_apk(file_path) else: # For other file types, read content normally with open(file_path, 'rb') as file: @@ -282,27 +278,6 @@ def read_match_strings(file_path, source): matched_strings = match_strings(content) return matched_strings -def read_apk(file_path): - try: - # Analyze the APK file using androguard - a, d, dx = AnalyzeAPK(file_path) - - # Extract strings from the APK - strings = [] - for method in dx.get_methods(): - for _, _, _, string in method.get_strings(): - strings.append(string) - - # Combine all extracted strings into a single content string - content = ' '.join(strings) - - except Exception as e: - print_debug(f"Error in read_apk: {e}") - content = '' - - return content - - def read_pdf(file_path): content = '' try: diff --git a/setup.py b/setup.py index bcc2955..085c412 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,4 @@ -VERSION = "0.3.3" +VERSION = "0.3.4" from setuptools import setup, find_packages