From d23d66d623a2bd198f839dcd6a8bf2f72d7e6a8d Mon Sep 17 00:00:00 2001 From: FoxRefire <155989196+FoxRefire@users.noreply.github.com> Date: Mon, 20 May 2024 12:12:24 +0900 Subject: [PATCH] Open Bitmovin's demo automatically --- README.md | 1 + keydive.py | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/README.md b/README.md index d9deee7..0ae0608 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,7 @@ Extract Widevine L3 keys from an Android device. options: -h, --help show this help message and exit + -a, --auto Open Bitmovin\'s demo automatically -d DEVICE, --device DEVICE Target Android device ID. -f FUNCTIONS, --functions FUNCTIONS diff --git a/keydive.py b/keydive.py index 92591de..fc8cac1 100644 --- a/keydive.py +++ b/keydive.py @@ -19,6 +19,7 @@ if __name__ == '__main__': # Parse command line arguments for device ID parser = argparse.ArgumentParser(description='Extract Widevine L3 keys from an Android device.') + parser.add_argument('-a', '--auto', required=False, action='store_true', help='Open Bitmovin\'s demo automatically.') parser.add_argument('-d', '--device', required=False, type=str, help='Target Android device ID.') parser.add_argument('-f', '--functions', required=False, type=Path, help='Path to Ghidra XML functions file.') parser.add_argument('--force', required=False, action='store_true', help='Force using the default vendor (skipping analysis).') @@ -47,6 +48,9 @@ if __name__ == '__main__': raise Exception('Failed to hook into the Widevine process') logger.info('Successfully hooked. To test, play a DRM-protected video: https://bitmovin.com/demos/drm') + if args.auto: + subprocess.run(['adb', 'shell', 'am', 'start', '-a', 'android.intent.action.VIEW', '-d', 'https://bitmovin.com/demos/drm']) + # Keep script running while extracting keys while cdm.running: time.sleep(1)