Skip to content

Commit

Permalink
v1.6 Update
Browse files Browse the repository at this point in the history
  • Loading branch information
AzeemIdrisi committed Jul 8, 2023
1 parent bd526fe commit ad6d2f1
Show file tree
Hide file tree
Showing 7 changed files with 162 additions and 14 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,13 @@ The goal of this project is to make penetration testing on Android devices easy.

* Scan local network for connected devices to get Target IP Address.

## v1.6

* Record Microphone Audio
* Stream Microphone Audio
* Record Device Audio
* Stream Device Audio

# Requirements
* [`python3`](https://www.python.org/) : Python 3.10 or Newer
* [`adb`](https://developer.android.com/studio/command-line/adb) : Android Debug Bridge (ADB) from `Android SDK Platform Tools`
Expand Down
1 change: 1 addition & 0 deletions docs/SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ currently being supported with security updates. -->

| Version | Supported |
| ------- | ------------------ |
| v1.6 ||
| v1.5 ||
| v1.4 ||
| v1.3 ||
Expand Down
Binary file modified docs/Screenshot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/Screenshot-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/Screenshot-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions modules/banner.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from modules import color

version = "v1.52"
version = "v1.6"

menu1 = f"""
Expand Down Expand Up @@ -33,11 +33,11 @@

menu3 = f"""
{color.WHITE}31. {color.GREEN}Unlock Device {color.WHITE}36. {color.GREEN}Extract APK from Installed App {color.WHITE}41. {color.GREEN}Visit PhoneSploit-Pro on GitHub
{color.WHITE}32. {color.GREEN}Lock Device {color.WHITE}37. {color.GREEN}Stop ADB Server {color.WHITE} {color.GREEN}
{color.WHITE}33. {color.GREEN}Dump All SMS {color.WHITE}38. {color.GREEN}Power Off Device {color.WHITE} {color.GREEN}
{color.WHITE}34. {color.GREEN}Dump All Contacts {color.WHITE}39. {color.GREEN}Use Keycodes (Control Device) {color.WHITE} {color.GREEN}
{color.WHITE}35. {color.GREEN}Dump Call Logs {color.WHITE}40. {color.GREEN}Update PhoneSploit-Pro {color.WHITE} {color.GREEN}
{color.WHITE}31. {color.GREEN}Unlock Device {color.WHITE}36. {color.GREEN}Extract APK from Installed App {color.WHITE}41. {color.GREEN}Record Mic Audio
{color.WHITE}32. {color.GREEN}Lock Device {color.WHITE}37. {color.GREEN}Stop ADB Server {color.WHITE}42. {color.GREEN}Listen Device Audio
{color.WHITE}33. {color.GREEN}Dump All SMS {color.WHITE}38. {color.GREEN}Power Off Device {color.WHITE}43. {color.GREEN}Record Device Audio
{color.WHITE}34. {color.GREEN}Dump All Contacts {color.WHITE}39. {color.GREEN}Use Keycodes (Control Device) {color.WHITE}44. {color.GREEN}Update PhoneSploit-Pro
{color.WHITE}35. {color.GREEN}Dump Call Logs {color.WHITE}40. {color.GREEN}Listen Mic Audio {color.WHITE}45. {color.GREEN}Visit PhoneSploit-Pro on GitHub
{color.YELLOW}
Expand Down
156 changes: 148 additions & 8 deletions phonesploitpro.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ def get_shell():
def get_screenshot():
global screenshot_location
# Getting a temporary file name to store time specific results
file_name = f"screenshot-{datetime.datetime.now().year}-{datetime.datetime.now().month}-{datetime.datetime.now().day}-{datetime.datetime.now().hour}-{datetime.datetime.now().minute}-{datetime.datetime.now().second}.png"
instant = datetime.datetime.now()
file_name = f"screenshot-{instant.year}-{instant.month}-{instant.day}-{instant.hour}-{instant.minute}-{instant.second}.png"
os.system(f"adb shell screencap -p /sdcard/{file_name}")
if screenshot_location == "":
print(
Expand Down Expand Up @@ -212,7 +213,8 @@ def get_screenshot():
def screenrecord():
global screenrecord_location
# Getting a temporary file name to store time specific results
file_name = f"vid-{datetime.datetime.now().year}-{datetime.datetime.now().month}-{datetime.datetime.now().day}-{datetime.datetime.now().hour}-{datetime.datetime.now().minute}-{datetime.datetime.now().second}.mp4"
instant = datetime.datetime.now()
file_name = f"vid-{instant.year}-{instant.month}-{instant.day}-{instant.hour}-{instant.minute}-{instant.second}.mp4"

duration = input(
f"\n{color.CYAN}Enter the recording duration (in seconds) > {color.WHITE}"
Expand Down Expand Up @@ -758,7 +760,8 @@ def copy_camera():
def anonymous_screenshot():
global screenshot_location
# Getting a temporary file name to store time specific results
file_name = f"screenshot-{datetime.datetime.now().year}-{datetime.datetime.now().month}-{datetime.datetime.now().day}-{datetime.datetime.now().hour}-{datetime.datetime.now().minute}-{datetime.datetime.now().second}.png"
instant = datetime.datetime.now()
file_name = f"screenshot-{instant.year}-{instant.month}-{instant.day}-{instant.hour}-{instant.minute}-{instant.second}.png"
os.system(f"adb shell screencap -p /sdcard/{file_name}")
if screenshot_location == "":
print(
Expand Down Expand Up @@ -799,7 +802,8 @@ def anonymous_screenshot():
def anonymous_screenrecord():
global screenrecord_location
# Getting a temporary file name to store time specific results
file_name = f"vid-{datetime.datetime.now().year}-{datetime.datetime.now().month}-{datetime.datetime.now().day}-{datetime.datetime.now().hour}-{datetime.datetime.now().minute}-{datetime.datetime.now().second}.mp4"
instant = datetime.datetime.now()
file_name = f"vid-{instant.year}-{instant.month}-{instant.day}-{instant.hour}-{instant.minute}-{instant.second}.mp4"

duration = input(
f"\n{color.CYAN}Enter the recording duration (in seconds) > {color.WHITE}"
Expand Down Expand Up @@ -1174,7 +1178,9 @@ def dump_sms():
else:
print(f"\n{color.PURPLE}Saving SMS file to {pull_location}\n{color.WHITE}")
print(f"{color.GREEN}\nExtracting all SMS{color.WHITE}")
file_name = f"sms_dump-{datetime.datetime.now().year}-{datetime.datetime.now().month}-{datetime.datetime.now().day}-{datetime.datetime.now().hour}-{datetime.datetime.now().minute}-{datetime.datetime.now().second}.txt"

instant = datetime.datetime.now()
file_name = f"sms_dump-{instant.year}-{instant.month}-{instant.day}-{instant.hour}-{instant.minute}-{instant.second}.txt"
os.system(
f"adb shell content query --uri content://sms/ --projection address:date:body > {pull_location}/{file_name}"
)
Expand All @@ -1195,7 +1201,9 @@ def dump_contacts():
else:
print(f"\n{color.PURPLE}Saving Contacts file to {pull_location}\n{color.WHITE}")
print(f"{color.GREEN}\nExtracting all Contacts{color.WHITE}")
file_name = f"contacts_dump-{datetime.datetime.now().year}-{datetime.datetime.now().month}-{datetime.datetime.now().day}-{datetime.datetime.now().hour}-{datetime.datetime.now().minute}-{datetime.datetime.now().second}.txt"

instant = datetime.datetime.now()
file_name = f"contacts_dump-{instant.year}-{instant.month}-{instant.day}-{instant.hour}-{instant.minute}-{instant.second}.txt"
os.system(
f"adb shell content query --uri content://contacts/phones/ --projection display_name:number > {pull_location}/{file_name}"
)
Expand All @@ -1218,7 +1226,9 @@ def dump_call_logs():
f"\n{color.PURPLE}Saving Call Logs file to {pull_location}\n{color.WHITE}"
)
print(f"{color.GREEN}\nExtracting all Call Logs{color.WHITE}")
file_name = f"call_logs_dump-{datetime.datetime.now().year}-{datetime.datetime.now().month}-{datetime.datetime.now().day}-{datetime.datetime.now().hour}-{datetime.datetime.now().minute}-{datetime.datetime.now().second}.txt"

instant = datetime.datetime.now()
file_name = f"call_logs_dump-{instant.year}-{instant.month}-{instant.day}-{instant.hour}-{instant.minute}-{instant.second}.txt"
os.system(
f"adb shell content query --uri content://call_log/calls --projection name:number:duration:date > {pull_location}/{file_name}"
)
Expand Down Expand Up @@ -1422,6 +1432,128 @@ def scan_network():
print("\n")


def record_audio(mode):
global pull_location
if pull_location == "":
print(
f"\n{color.YELLOW}Enter location to save Recordings, Press 'Enter' for default{color.WHITE}"
)
pull_location = input("> ")
if pull_location == "":
pull_location = "Downloaded-Files"
print(
f"\n{color.PURPLE}Saving recordings to PhoneSploit-Pro/{pull_location}\n{color.WHITE}"
)
else:
print(f"\n{color.PURPLE}Saving recordings to {pull_location}\n{color.WHITE}")

match mode:
case "mic":
instant = datetime.datetime.now()
file_name = f"mic-audio-{instant.year}-{instant.month}-{instant.day}-{instant.hour}-{instant.minute}-{instant.second}.opus"
print(
f"""
{color.WHITE}1.{color.GREEN} Stream & Record {color.YELLOW}
{color.WHITE}2.{color.GREEN} Record Only {color.YELLOW}(Fast)
{color.WHITE}"""
)
choice = input("> ")
if choice == "1":
print(
f"\n{color.GREEN}Recording Microphone Audio \n\n{color.RED}Press Ctrl+C to Stop.\n{color.WHITE}"
)
os.system(
f"scrcpy --no-video --audio-source=mic --record={pull_location}/{file_name}"
)
elif choice == "2":
print(
f"\n{color.GREEN}Recording Microphone Audio \n\n{color.RED}Press Ctrl+C to Stop.\n{color.WHITE}"
)
os.system(
f"scrcpy --no-video --audio-source=mic --no-playback --record={pull_location}/{file_name}"
)
else:
print(
f"\n{color.RED} Invalid selection\n{color.GREEN} Going back to Main Menu{color.WHITE}"
)
return

case "device":
instant = datetime.datetime.now()
file_name = f"device-audio-{instant.year}-{instant.month}-{instant.day}-{instant.hour}-{instant.minute}-{instant.second}.opus"
print(
f"""
{color.WHITE}1.{color.GREEN} Stream & Record {color.YELLOW}
{color.WHITE}2.{color.GREEN} Record Only {color.YELLOW}(Fast)
{color.WHITE}"""
)
choice = input("> ")

if choice == "1":
print(
f"\n{color.GREEN}Recording Device Audio \n\n{color.RED}Press Ctrl+C to Stop.\n{color.WHITE}"
)
os.system(f"scrcpy --no-video --record={pull_location}/{file_name}")

# Asking to open file
choice = input(
f"\n{color.GREEN}Do you want to Open the file? Y / N {color.WHITE}> "
).lower()
if choice == "y" or choice == "":
os.system(f"{opener} {pull_location}/{file_name}")

elif not choice == "n":
while choice != "y" and choice != "n" and choice != "":
choice = input("\nInvalid choice!, Press Y or N > ").lower()
if choice == "y" or choice == "":
os.system(f"{opener} {pull_location}/{file_name}")

elif choice == "2":
print(
f"\n{color.GREEN}Recording Device Audio \n\n{color.RED}Press Ctrl+C to Stop.\n{color.WHITE}"
)
os.system(
f"scrcpy --no-video --no-playback --record={pull_location}/{file_name}"
)

# Asking to open file
choice = input(
f"\n{color.GREEN}Do you want to Open the file? Y / N {color.WHITE}> "
).lower()
if choice == "y" or choice == "":
os.system(f"{opener} {pull_location}/{file_name}")

elif not choice == "n":
while choice != "y" and choice != "n" and choice != "":
choice = input("\nInvalid choice!, Press Y or N > ").lower()
if choice == "y" or choice == "":
os.system(f"{opener} {pull_location}/{file_name}")

else:
print(
f"\n{color.RED} Invalid selection\n{color.GREEN} Going back to Main Menu{color.WHITE}"
)
return
print("\n")


def stream_audio(mode):
match mode:
case "mic":
print(
f"\n{color.GREEN}Streaming Microphone Audio \n\n{color.RED}Press Ctrl+C to Stop.\n{color.WHITE}"
)
os.system("scrcpy --no-video --audio-source=mic")

case "device":
print(
f"\n{color.GREEN}Streaming Device Audio \n\n{color.RED}Press Ctrl+C to Stop.\n{color.WHITE}"
)
os.system("scrcpy --no-video")

print("\n")


def main():
# Clearing the screen and presenting the menu
# taking selection input from user
Expand Down Expand Up @@ -1518,8 +1650,16 @@ def main():
case "39":
use_keycode()
case "40":
update_me()
stream_audio("mic")
case "41":
record_audio("mic")
case "42":
stream_audio("device")
case "43":
record_audio("device")
case "44":
update_me()
case "45":
visit_me()
case other:
print("\nInvalid selection!\n")
Expand Down

0 comments on commit ad6d2f1

Please sign in to comment.