Skip to content

Commit

Permalink
Fixed some error with PPPwn_Go
Browse files Browse the repository at this point in the history
  • Loading branch information
B-Dem committed Jun 9, 2024
1 parent d5bd18a commit 659e5e3
Showing 1 changed file with 27 additions and 12 deletions.
39 changes: 27 additions & 12 deletions PPPwnUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
LINUX_3GB = "Linux 3GB 11.00"
LINUX_4GB = "Linux 4GB 11.00"

i1_00 = "11.00"


def get_network_interface_names():
interfaces = psutil.net_if_addrs()
Expand Down Expand Up @@ -185,17 +187,19 @@ def update_firmware_options(self):
elif self.radio_var.get() == "HEN":
num_columns = 1
self.firmware_var.set(VTX_1070)
self.custom_payloads_frame.pack_forget()
elif self.radio_var.get() == "Linux":
num_columns = 1
self.firmware_var.set(LINUX_1GB)
self.custom_payloads_frame.pack_forget()
else:
self.custom_payloads_frame.pack_forget()
if self.radio_var.get() == "PPPwn":
num_columns = 3
self.firmware_var.set(self.selected_fw1)
self.firmware_var.set(i1_00)
else:
num_columns = 1
self.firmware_var.set(self.selected_fw2)
self.firmware_var.set(GOLDHEN_1100)

column_widgets = []
for firmware in firmware_versions:
Expand Down Expand Up @@ -263,10 +267,21 @@ def start_pppwn(self):
if not os.path.isfile(stage2_path):
messagebox.showerror("Error", "Stage2 does not exist")
return
if sys.platform == "linux":
command = f'python3 PPPwn/pppwn.py --interface="{interface}" --stage1="{stage1_path}" --stage2="{stage2_path}"'
else:
command = f'python PPPwn/pppwn.py --interface="{interface}" --stage1="{stage1_path}" --stage2="{stage2_path}"'
if exploit_version == "PPPwn Python":
if sys.platform == "linux":
command = f'python3 PPPwn/pppwn.py --interface="{interface}" --stage1="{stage1_path}" --stage2="{stage2_path}"'
else:
command = f'python PPPwn/pppwn.py --interface="{interface}" --stage1="{stage1_path}" --stage2="{stage2_path}"'
elif exploit_version == "PPPwn C++":
if sys.platform == "linux":
command = f'./PPPwn/pppwn_cpp --interface="{interface}" --stage1="{stage1_path}" --stage2="{stage2_path}"'
else:
command = f'PPPwn\\pppwn_cpp.exe --interface="{interface}" --stage1="{stage1_path}" --stage2="{stage2_path}"'
elif exploit_version == "PPPwn_GO":
if sys.platform == "linux":
command = f'./PPPwn/pppwn_go --stage1="{stage1_path}" --stage2="{stage2_path}"'
else:
command = f'PPPwn\\pppwn_go.exe --stage1="{stage1_path}" --stage2="{stage2_path}"'
elif firmware.find("Goldhen for ") != -1:
firmware_value = firmware.replace("Goldhen for ","").replace(".", "")
if exploit_version == "PPPwn Python":
Expand All @@ -281,9 +296,9 @@ def start_pppwn(self):
command = f'PPPwn\\pppwn_cpp.exe --interface="{interface}" --stage1="PPPwn/goldhen/{firmware_value}/stage1.bin" --stage2="PPPwn/goldhen/{firmware_value}/stage2.bin"'
elif exploit_version == "PPPwn_GO":
if sys.platform == "linux":
command = f'./PPPwn/pppwn_go --stage1="PPPwn/goldhen/{firmware_value}/stage1.bin" --stage2="PPPwn/goldhen/{firmware_value}/stage2.bin"'
command = f'./PPPwn/pppwn_go --fw={firmware_value} --stage1="PPPwn/goldhen/{firmware_value}/stage1.bin" --stage2="PPPwn/goldhen/{firmware_value}/stage2.bin"'
else:
command = f'PPPwn\\pppwn_go.exe --interface="{interface}" --stage1="PPPwn/goldhen/{firmware_value}/stage1.bin" --stage2="PPPwn/goldhen/{firmware_value}/stage2.bin"'
command = f'PPPwn\\pppwn_go.exe --fw={firmware_value} --stage1="PPPwn/goldhen/{firmware_value}/stage1.bin" --stage2="PPPwn/goldhen/{firmware_value}/stage2.bin"'
elif firmware.find("VTX HEN for ") != -1:
firmware_value = firmware.replace("VTX HEN for ","").replace(".", "")
if exploit_version == "PPPwn Python":
Expand Down Expand Up @@ -329,14 +344,14 @@ def start_pppwn(self):
command = f'python PPPwn/pppwn.py --interface="{interface}" --fw="{firmware_value}" --stage1="PPPwn/stage1/{firmware_value}/stage1.bin" --stage2="PPPwn/stage2/{firmware_value}/stage2.bin"'
elif exploit_version == "PPPwn C++":
if sys.platform == "linux":
command = f'./PPPwn/pppwn_cpp --interface="{interface}" --fw="{firmware_value}"'
command = f'./PPPwn/pppwn_cpp --interface="{interface}" --fw="{firmware_value} --stage1="PPPwn/stage1/{firmware_value}/stage1.bin" --stage2="PPPwn/stage2/{firmware_value}/stage2.bin"'
else:
command = f'PPPwn\\pppwn_cpp.exe --interface="{interface}" --fw="{firmware_value}"'
command = f'PPPwn\\pppwn_cpp.exe --interface="{interface}" --fw="{firmware_value} --stage1="PPPwn/stage1/{firmware_value}/stage1.bin" --stage2="PPPwn/stage2/{firmware_value}/stage2.bin"'
elif exploit_version == "PPPwn_GO":
if sys.platform == "linux":
command = f'./PPPwn/pppwn_go --interface="{interface}" --fw="{firmware_value}"'
command = f'./PPPwn/pppwn_go -fw="{firmware_value} --stage1="PPPwn/stage1/{firmware_value}/stage1.bin" --stage2="PPPwn/stage2/{firmware_value}/stage2.bin"'
else:
command = f'PPPwn\\pppwn_go.exe --interface="{interface}" --fw="{firmware_value}"'
command = f'PPPwn\\pppwn_go.exe --fw={firmware_value} --stage1=PPPwn/stage1/{firmware_value}/stage1.bin --stage2=PPPwn/stage2/{firmware_value}/stage2.bin'
else:
messagebox.showerror("Error", "Invalid firmware selection")
return
Expand Down

0 comments on commit 659e5e3

Please sign in to comment.