Skip to content
This repository was archived by the owner on Dec 30, 2024. It is now read-only.

Commit 3053a5f

Browse files
committed
Version 1
1 parent 7651646 commit 3053a5f

File tree

12 files changed

+1450
-1
lines changed

12 files changed

+1450
-1
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.vscode/
2+
__pycache__/
3+
dist/
4+
build/
5+
app.spec

LICENSE

Lines changed: 339 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,49 @@
1-
fusee-interfacee-tk
1+
![A cute rocket in outerspace!](icon.png)
2+
# Fusée Launcher Interfacée (Nintendo Homebrew Version)
3+
A very simple GUI for applying [Team {Re}Switched Fusée Launcher script](https://github.com/reswitched/fusee-launcher) onto your Nintendo Switch.
4+
5+
6+
## Disclaimer
7+
* As always, use at your own discretion. I take no reponsibility for any damages caused to your device.
8+
* I'm assuming you understand how the exploit is done and the setup needed, this README is to help you run this specific app.
9+
* Although Fusée is able to exploit any Tegra X1 device, this app is designed to work with Nintendo Switches only.
10+
* The Fusée Launcher script included in this project is slightly modified to be used as a module.
11+
* Binaries built and tested on Ubuntu 17.10 and Windows 10 in a 64 bit machine. If your platform is older you probably won't be able to run the executables.
12+
13+
14+
## Running this app
15+
You can run this app as a simple python script or by executing the binary file for your platform.
16+
17+
### Running as a script
18+
* Have latest [python 3](https://www.python.org/downloads/) and [pyusb](https://github.com/pyusb/pyusb) installed.
19+
* __On Windows__ have [libusbk](http://libusbk.sourceforge.net/UsbK3/index.html) as the device driver.
20+
* __On Linux__ have libusb1 installed (you probably already have).
21+
* Download/clone this repo and simply run `app.py` like you would any python script.
22+
23+
24+
### Running the binary file
25+
### Linux
26+
* You need to have `libc ver. 2.61` or higher (if you use a modern distro you probably already have).
27+
* Download the linux binary from the [releases page](https://github.com/falquinho/fusee-interfacee-tk/releases) and run it. It *should* simply work.
28+
29+
### Windows
30+
* Download the Windows binary from the [releases page](https://github.com/falquinho/fusee-interfacee-tk/releases) and run it. It *should* simply work.
31+
32+
## Using Fusée Launcher Interfacée
33+
The app is very simple, it should be very intuitive to use:
34+
35+
![App looking for a device.](https://image.ibb.co/n1CEv8/fusee_interfacee_ss0.png) ![App found a device and is ready!](https://image.ibb.co/ep6ra8/fusee_interfacee_ss1.png)
36+
* Click the `Select Payload` button to browse your files and select the desired payload.
37+
* Connect your Switch in RCM mode to the computer. The progress bar will stop and fill up when the device is detected.
38+
* When the `Launch Fusée!` button activate simply click it.
39+
40+
41+
## Freezing
42+
If the binary executable won't run in your machine you can build it yourself. The tool I used was [pyinstaller](https://www.pyinstaller.org/).
43+
44+
### A note on freezing on Linux:
45+
If you want to freeze using `pyinstaller` on linux there's a bug on the pip version of it that prevents the `libusb` to
46+
be bundled. You need to donwload [the develop branch of pyinstaller](https://github.com/pyinstaller/pyinstaller/tree/develop) and use it as a script.
47+
48+
## Special Thanks
49+
### To the Team {Re}Switched and contributors. You are awesome. Thanks for your hard work.

app.py

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
import sys
2+
import os
3+
import tkinter as tk
4+
import tkinter.ttk as ttk
5+
from tkinter.filedialog import askopenfilename
6+
import fusee_launcher as fusee
7+
import mock_arguments
8+
9+
10+
11+
class App(tk.Frame):
12+
13+
def __init__(self, master=None):
14+
tk.Frame.__init__(self, master)
15+
self.grid()
16+
self.build_widgets()
17+
18+
self.payload_path = ''
19+
self.device_found = False
20+
self.lbl_length = 22
21+
self.usb_backend = fusee.HaxBackend.create_appropriate_backend()
22+
23+
root = self.winfo_toplevel()
24+
root.update()
25+
root.resizable(0, 0)
26+
27+
self.do_update()
28+
29+
30+
31+
def build_widgets(self):
32+
style = ttk.Style()
33+
style.configure('Horizontal.TProgressbar', background='#5eba21')
34+
self.progress = ttk.Progressbar(self, mode='indeterminate', maximum=50)
35+
self.progress.grid(row=0, columnspan=2, sticky=tk.W+tk.E)
36+
self.progress.start(30)
37+
38+
self.lbl_look = ttk.Label(self, text="Looking for Device...")
39+
self.lbl_look.grid(row=1, column=0, columnspan=2, pady=8)
40+
41+
self.btn_open = ttk.Button(self, text="Select Payload", command=self.btn_open_pressed)
42+
self.btn_open.grid(row=2, column=0, padx=8)
43+
44+
self.lbl_file = ttk.Label(self, text="No Payload Selected. ", justify=tk.LEFT)
45+
self.lbl_file.grid(row=2, column=1, padx=8)
46+
47+
self.btn_send = ttk.Button(self, text="Send Payload!", command=self.btn_send_pressed)
48+
self.btn_send.grid(row=3, column=0, columnspan=2, sticky=tk.W+tk.E, pady=8, padx=8)
49+
self.btn_send.state(('disabled',)) # trailing comma to define single element tuple
50+
51+
self.btn_mountusb = ttk.Button(self, text="Mount SD on PC", command=self.btn_mountusb_pressed)
52+
self.btn_mountusb.grid(row=4, column=0, columnspan=2, sticky=tk.W+tk.E, pady=8, padx=8)
53+
self.btn_mountusb.state(('disabled',)) # trailing comma to define single element tuple
54+
55+
56+
def do_update(self):
57+
device = self.usb_backend.find_device(0x0955, 0x7321)
58+
if device and not self.device_found:
59+
self.device_found = True
60+
self.lbl_look.configure(text='Device found!')
61+
self.progress.stop()
62+
self.progress.configure(mode='determinate', maximum=1000)
63+
self.progress.step(999)
64+
65+
elif not device and self.device_found:
66+
self.device_found = False
67+
self.lbl_look.configure(text='Looking for device...')
68+
self.progress.configure(mode='indeterminate', maximum=50)
69+
self.progress.start(30)
70+
71+
self.validate_form()
72+
self.after(333, self.do_update)
73+
74+
75+
76+
def btn_open_pressed(self):
77+
path = askopenfilename(filetypes=[('Binary', '*.bin')], title='Select Payload')
78+
if path:
79+
excess = len(path)-self.lbl_length
80+
self.payload_path = path
81+
self.lbl_file.configure(text='..'+path[max(0, excess):])
82+
83+
self.validate_form()
84+
85+
86+
87+
def btn_send_pressed(self):
88+
args = mock_arguments.MockArguments()
89+
args.payload = self.payload_path
90+
args.relocator = self.build_relocator_path()
91+
fusee.do_hax(args)
92+
93+
94+
def btn_mountusb_pressed(self):
95+
args = mock_arguments.MockArguments()
96+
args.payload = self.build_mountusb_path()
97+
args.relocator = self.build_relocator_path()
98+
fusee.do_hax(args)
99+
100+
101+
def validate_form(self):
102+
if self.payload_path and self.device_found:
103+
self.btn_send.state(('!disabled',))
104+
self.btn_mountusb.state(('!disabled',))
105+
elif self.device_found:
106+
self.btn_mountusb.state(('!disabled',))
107+
else:
108+
self.btn_send.state(('disabled',))
109+
self.btn_mountusb.state(('disabled',))
110+
111+
112+
def build_mountusb_path(self):
113+
try:
114+
path = sys._MEIPASS
115+
except Exception:
116+
path = os.path.abspath('.')
117+
118+
return os.path.join(path, 'memloader.bin')
119+
120+
def build_relocator_path(self):
121+
try:
122+
path = sys._MEIPASS
123+
except Exception:
124+
path = os.path.abspath('.')
125+
126+
return os.path.join(path, 'intermezzo.bin')
127+
128+
my_app = App()
129+
my_app.master.title('Payload Injector')
130+
my_app.mainloop()

0 commit comments

Comments
 (0)