File size: 517 Bytes
4f0f2d1
 
19b841e
4f0f2d1
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import subprocess
import streamlit as st
import os  
def debug_apk(input_path, output_dir): 
    command = f"apk-mitm {input_path} -o {output_dir}"
    result = subprocess.run(command, shell=True, capture_output=True, text=True)

    if result.returncode == 0:
        output_file_name = result.stdout.split("Patched file: ")[-1].strip()
        output_path = os.path.join(output_dir, output_file_name)
        return output_path
    else:
        st.error(f"Error debugging APK: {result.stderr}")
        return None