Skip to content

Commit

Permalink
v1.61 Detect Android Version before Stream/Record
Browse files Browse the repository at this point in the history
  • Loading branch information
AzeemIdrisi committed Oct 7, 2023
1 parent 3499bf1 commit f3e0309
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 3 deletions.
2 changes: 1 addition & 1 deletion 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.6"
version = "v1.61"

menu1 = f"""
Expand Down
31 changes: 29 additions & 2 deletions phonesploitpro.py
Original file line number Diff line number Diff line change
Expand Up @@ -1440,8 +1440,21 @@ def scan_network():

def record_audio(mode):
print(
f"\n{color.RED}[Warning] {color.CYAN}This feature is currently available for devices running on Android 11 or higher only.{color.WHITE}"
f"\n{color.RED}[Notice] {color.CYAN}This feature is currently available for devices running on Android 11 or higher only.{color.WHITE}"
)
try:
androidVersion = os.popen("adb shell getprop ro.build.version.release").read()
android_os = int(androidVersion.split(".")[0])
print(f"\n{color.GREEN}Detected Android Version : {androidVersion}")
except ValueError:
print(
f"\n{color.RED} No connected device found\n{color.GREEN} Going back to Main Menu{color.WHITE}"
)
return

if android_os<11:
print(f"{color.RED}Going back to Main Menu{color.WHITE}")
return

global pull_location
if pull_location == "":
Expand Down Expand Up @@ -1549,8 +1562,22 @@ def record_audio(mode):

def stream_audio(mode):
print(
f"\n{color.RED}[Warning] {color.CYAN}This feature is currently available for devices running on Android 11 or higher only.{color.WHITE}"
f"\n{color.RED}[Notice] {color.CYAN}This feature is currently available for devices running on Android 11 or higher only.{color.WHITE}"
)
try:
androidVersion = os.popen("adb shell getprop ro.build.version.release").read()
android_os = int(androidVersion.split(".")[0])
print(f"\n{color.GREEN}Detected Android Version : {androidVersion}")
except ValueError:
print(
f"\n{color.RED} No connected device found\n{color.GREEN} Going back to Main Menu{color.WHITE}"
)
return

if android_os<11:
print(f"{color.RED}Going back to Main Menu{color.WHITE}")
return

match mode:
case "mic":
print(
Expand Down

0 comments on commit f3e0309

Please sign in to comment.