This is a program that acts as a USB and network server for use with Tinfoil.
- Download
tinfoil_driver.exeandnut.exefrom here. - Install the drivers by running the
tinfoil_driver.exein the previous step. - Run
nut.exe. You should be presented with a GUI as shown in the picture above.
- Python 3.6+
- PIP modules from
requirements.txt - OpenSSL-backed curl (for pycurl)
- Install Python 3.6+ from your preferred package manager, along with the
libusb,python3-pip&python3-pyqt5packages. - Install
curlwith the openssl backend - installlibssl-dev(ie,apt install libssl-dev libcurl4-openssl-dev) - Clone this repository to desired directory and change your working directory to the cloned repository.
- Install the PIP modules with the following command
pip3 install -r requirements.txt. If you previously tried installing pycurl and get the errorlibcurl link-time ssl backend (openssl) is different from compile-time ssl backend (none/other), uninstall it, make sure to follow step 2 again (installing curl with the openssl backend), andpip install pycurl --no-cache-dir - Add the following code snippet to
/etc/udev/rules.d/99-switch.rulesusing your favorite editor.
SUBSYSTEM=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="27e2", GROUP="plugdev"
- Run
python3 nut_gui.pyto launch the application.
- Install Python 3.6+ from your preferred package manager, for example: pyenv + pyenv-virtualenv (
brew install pyenv pyenv-virtualenvand follow install directions) - Install
libusb(brew install libusb) - Install
curlwith the openssl backend (brew install curl-openssl) - Clone this repository to desired directory and change your working directory to the cloned repository
- (Optional, but highly recommended) Create a virtualenv and activate it (
pyenv virtualenv nut && source activate nut) - Install pycurl using one of the below. Read this for more details
PYCURL_SSL_LIBRARY=openssl LDFLAGS="-L/usr/local/opt/openssl/lib" CPPFLAGS="-I/usr/local/opt/openssl/include" pip install --no-cache-dir pycurl
or try
pip install --install-option="--with-openssl" --install-option="--openssl-dir=/usr/local/opt/openssl" pycurl
- Install all other dependencies (
pip install -r requirements.txt) - Run
python nut_gui.pyto launch the application
The GUI is divided into three distinct sections (header, body, footer).
The top section has a textbox to input a folder path to scan, along with a Save and Scan buttons to update path specified in the textbox and scan it. Next to it, you should see a GDrive Auth button. A detailed explaination of what it does can be found below. The IP/Port/User/Password are the information needed to login to the NUT server. To the right of those, you can also see a USB Status indicator, indicating whether a tinfoil client is connected via USB with the server.
This shows a table containing a list of NSW files that was detected by NUT from the scanned paths. It shows the title count, file name, title ID, title type and title size for each scanned file.
This shows the progress information of any file that is currently being downloaded from the server.
NUT will authenticate with GDrive if you create a GDrive application, and place its credentials.json file either in nut's root directory, or in the conf directory. You can generate / download credentials.json from https://developers.google.com/drive/api/v3/quickstart/python.
Once this is set up, you can access your gdrive through tinfoil, by using either the usbfs, nutfs, or GDrive protocol.
This project is licensed under the terms of GPLv3, with the exemptions for specific projects noted below.
You can find a copy of the license in the LICENSE file.
Exemptions:
- nsz is exempt from the GPLv3 licensing and can license any source code from this project under MIT License instead. In doing so, they may alter, supplement, or entirely remove the copyright notice for each file they choose to relicense.
Contributions are welcome!
To prevent continuous integration failures when contributing, please consider installing pre-commit in your environment to run all of these checks prior to checking in new code.
pre-commit installThanks goes to these wonderful people (emoji key):
Radhika π» |
eXhumer π π» |
Blake Warner π» π π§ π π€ π π¬ π π§ |
throwawayay π π§ π π€ |
Sergey Gradovich π» π π π§ |
This project follows the all-contributors specification. Contributions of any kind welcome!