Open Bitmovin's demo automatically

This commit is contained in:
FoxRefire 2024-05-20 12:12:24 +09:00
parent 628add77d9
commit 2e79463ee8
2 changed files with 6 additions and 1 deletions

View File

@ -57,12 +57,13 @@ For a detailed step-by-step guide on setting up and executing KeyDive without in
### Command-Line Options
```shell
usage: keydive.py [-h] [-d DEVICE] [-f FUNCTIONS] [--force]
usage: keydive.py [-h] [-a] [-d DEVICE] [-f FUNCTIONS] [--force]
Extract Widevine L3 keys from an Android device.
options:
-h, --help show this help message and exit
-a, --auto Open Bitmovins demo automatically
-d DEVICE, --device DEVICE
Target Android device ID.
-f FUNCTIONS, --functions FUNCTIONS

View File

@ -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)