letaken-olam's picture
Update app.py
4dacef6 verified
Raw
History Blame
1.2 kB
import gradio as gr
from androguard.misc import AnalyzeAPK
def check_apk_for_webview(apk_file):
try:
a, d, dx = AnalyzeAPK(apk_file.name)
# בדיקה לפי קוד Java (דקס)
for method in dx.get_methods():
code = method.get_method()
if code and code.get_source():
if "android/webkit/WebView" in code.get_source():
return "⚠️ האפליקציה כוללת שימוש ב־WebView (בקוד)"
# בדיקה לפי manifest
if "android.permission.INTERNET" in a.get_permissions():
return "⚠️ האפליקציה דורשת גישת אינטרנט – ייתכן שיש WebView"
return "✅ לא נמצא שימוש ב־WebView"
except Exception as e:
return f"שגיאה בניתוח הקובץ: {str(e)}"
iface = gr.Interface(
fn=check_apk_for_webview,
inputs=gr.File(label="בחר קובץ APK", file_types=[".apk"]),
outputs="text",
title="בודק שימוש ב־WebView באפליקציית APK",
description="המערכת בודקת אם האפליקציה כוללת שימוש פנימי ברכיב WebView.",
)
iface.launch()