Skip to content

Commit 088a641

Browse files
committed
Fixed bugs and new features
1 parent 4d57320 commit 088a641

File tree

2 files changed

+1
-26
lines changed

2 files changed

+1
-26
lines changed

hawk_scanner/internals/system.py

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from androguard.misc import AnalyzeAPK
21
from rich.console import Console
32
from rich.table import Table
43
import json, requests, argparse, yaml, re, datetime, os, subprocess, platform, hashlib
@@ -267,9 +266,6 @@ def read_match_strings(file_path, source):
267266
# Check if the file is an archive (zip, rar, tar, tar.gz)
268267
elif file_path.lower().endswith(('.zip', '.rar', '.tar', '.tar.gz')):
269268
content = read_archive(file_path)
270-
# Check if the file is an APK (Android application package)
271-
elif file_path.lower().endswith('.apk'):
272-
content = read_apk(file_path)
273269
else:
274270
# For other file types, read content normally
275271
with open(file_path, 'rb') as file:
@@ -282,27 +278,6 @@ def read_match_strings(file_path, source):
282278
matched_strings = match_strings(content)
283279
return matched_strings
284280

285-
def read_apk(file_path):
286-
try:
287-
# Analyze the APK file using androguard
288-
a, d, dx = AnalyzeAPK(file_path)
289-
290-
# Extract strings from the APK
291-
strings = []
292-
for method in dx.get_methods():
293-
for _, _, _, string in method.get_strings():
294-
strings.append(string)
295-
296-
# Combine all extracted strings into a single content string
297-
content = ' '.join(strings)
298-
299-
except Exception as e:
300-
print_debug(f"Error in read_apk: {e}")
301-
content = ''
302-
303-
return content
304-
305-
306281
def read_pdf(file_path):
307282
content = ''
308283
try:

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION = "0.3.3"
1+
VERSION = "0.3.4"
22

33
from setuptools import setup, find_packages
44

0 commit comments

Comments
 (0)