|
15 | 15 |
|
16 | 16 | from mpt import functions
|
17 | 17 |
|
18 |
| -__version__ = '0.7.35' |
| 18 | +__version__ = '0.7.36' |
19 | 19 |
|
20 | 20 | from mpt import settings, logger
|
21 | 21 | from mpt.config import Config
|
@@ -508,19 +508,24 @@ def run_tool_objection():
|
508 | 508 | conf = Config()
|
509 | 509 | package = conf.load_config('package-name')
|
510 | 510 | application_label = conf.load_config('application-label')
|
| 511 | + command = settings.ANDROID_TOOLS['objection']['bin'] |
511 | 512 |
|
512 |
| - app = f"\"{application_label}\" ({package})" |
513 |
| - options = [f"run objection for app {app}", "run objection"] |
514 |
| - terminal_menu = TerminalMenu(options, title="Please select an option:") |
515 |
| - menu_entry_index = terminal_menu.show() |
| 513 | + if len(application_label) > 0: |
516 | 514 |
|
517 |
| - command = settings.ANDROID_TOOLS['objection']['bin'] |
518 |
| - if menu_entry_index == 0: |
519 |
| - objection_command = f"objection --gadget \\\"{application_label}\\\" explore" |
520 |
| - command = command.rsplit(";", 1)[0] + f"; {objection_command}; exec $SHELL" |
521 |
| - log_info = f"Running command in {Style.BRIGHT + Fore.CYAN}kitty terminal{Style.RESET_ALL} {objection_command}" |
522 |
| - if menu_entry_index == 1: |
523 |
| - # replace last objection mit exec $SHELL |
| 515 | + app = f"\"{application_label}\" ({package})" |
| 516 | + options = [f"run objection for app {app}", "run objection"] |
| 517 | + terminal_menu = TerminalMenu(options, title="Please select an option:") |
| 518 | + menu_entry_index = terminal_menu.show() |
| 519 | + |
| 520 | + if menu_entry_index == 0: |
| 521 | + objection_command = f"objection --gadget \\\"{application_label}\\\" explore" |
| 522 | + command = command.rsplit(";", 1)[0] + f"; {objection_command}; exec $SHELL" |
| 523 | + log_info = f"Running command in {Style.BRIGHT + Fore.CYAN}kitty terminal{Style.RESET_ALL} {objection_command}" |
| 524 | + if menu_entry_index == 1: |
| 525 | + # replace last objection mit exec $SHELL |
| 526 | + command = command.rsplit(";", 1)[0] + "; objection --help; exec $SHELL" |
| 527 | + log_info = f"Running command in {Style.BRIGHT + Fore.CYAN}kitty terminal{Style.RESET_ALL} ..." |
| 528 | + else: |
524 | 529 | command = command.rsplit(";", 1)[0] + "; objection --help; exec $SHELL"
|
525 | 530 | log_info = f"Running command in {Style.BRIGHT + Fore.CYAN}kitty terminal{Style.RESET_ALL} ..."
|
526 | 531 |
|
|
0 commit comments