Created
June 28, 2022 23:03
-
-
Save rodnt/4ae040d1787b86a8f4be5d50f78aa779 to your computer and use it in GitHub Desktop.
python3 script to brute force activities android, open one by one.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from sys import exit | |
import os | |
import time | |
""" | |
Using objection and dumping all activities with | |
android hooking list activities | |
OBS: change com.foo.app with your package name | |
""" | |
class color: | |
PURPLE = '\033[1;35;48m' | |
CYAN = '\033[1;36;48m' | |
BOLD = '\033[1;37;48m' | |
BLUE = '\033[1;34;48m' | |
GREEN = '\033[1;32;48m' | |
YELLOW = '\033[1;33;48m' | |
RED = '\033[1;31;48m' | |
BLACK = '\033[1;30;48m' | |
UNDERLINE = '\033[4;37;48m' | |
END = '\033[1;37;0m' | |
if len(sys.argv) < 2: | |
print(f">> python3 {sys.argv[0]} <file with activitys") | |
sys.exit(1) | |
print(":: Init ::") | |
with open(sys.argv[1]) as f: | |
for line in f.readlines(): | |
if line != None: | |
clean_line = line.strip() | |
print(color.CYAN + f" :: OPEN :: {clean_line}" + color.END) | |
command = "adb shell am start -n com.foo.app/" + clean_line | |
try: | |
os.system(command) | |
time.sleep(7) | |
except KeyboardInterrupt as e: | |
print(f">> exit") | |
exit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment