Homebrew [release] sockfile python

moghedien

Well-Known Member
OP
Member
Joined
Mar 9, 2015
Messages
411
Trophies
0
XP
317
Country
United States
I made a new Python version of sockfile that works with the new FBI 2 protocol (so it wont work with FBI 1)
It should work with both Python 2 and Python 3 and it uses the same command line arguments as the official sockfile.
https://github.com/svanheulen/sockfile_python

Edit: I added a new script to the repository!

The "net_installer.pyw" script runs a HTTP server and displays a QR code that can be scanned by FBI to install the specified CIA/TIK file.

You do need to install the "pyqrcode" Python module, which can easily be done by just opening your console/terminal and typing:
Code:
pip install --user pyqrcode

Once that's all set, you can just drag-and-drop a CIA/TIK file (or a folder containing CIA/TIK files) onto the script, then scan the QR code with FBI. (Note: you need to keep the window open until the install on your 3DS finishes)

On Linux and Mac you can also use the "-t" argument to have the QR code display in the terminal if you want :)
Code:
./net_installer.pyw -t /path/to/cia/file.cia

Edit: I renamed the "qr_installer.pyw" script to "net_installer.pyw" and added support for the new network install protocol added in FBI 2.4.5

You can use the new protocol like this:
Code:
./net_installer.pyw --send x.x.x.x /path/to/file.cia
Where "x.x.x.x" if the IP address of your 3DS (displayed by FBI).
If you don't use the "--send" argument (or if you drag-and-drop files onto the script) it will display the QR code.

I also added a script for the old FBI 1.x protocol, just because.


GUI display:
GyDfZ0E.png

Terminal display:
yt9f9jz.png
 
Last edited by moghedien,

moghedien

Well-Known Member
OP
Member
Joined
Mar 9, 2015
Messages
411
Trophies
0
XP
317
Country
United States
Excellent job! However I found a minor issue. You can't specify the port.
Yeah, the port is hard-coded to 5000 in FBI so I did the same. If there is an actual use case for needing to specify the port I can certainly add that option.
 

retroguy

Well-Known Member
Member
Joined
Nov 28, 2006
Messages
116
Trophies
1
XP
299
Country
Netherlands
Nice. Can I install a few CIA's at once with the python script? If so, wha'ts the command line? Just a space between the CIA names?

And what is the commandline for showing the transfer speed in the window (I'm using this script with a .bat so I only need to type in the CIA name, and I would like to add the 'show transfer speed' command).
 
Last edited by retroguy,

moghedien

Well-Known Member
OP
Member
Joined
Mar 9, 2015
Messages
411
Trophies
0
XP
317
Country
United States
Nice. Can I install a few CIA's at once with the python script? If so, wha'ts the command line? Just a space between the CIA names?
For the sockfile.py script, yes, exactly. For the qr_installer.pyw script it only serves one CIA file.

--------------------- MERGED ---------------------------

There is no way to show the transfer speed
 

moghedien

Well-Known Member
OP
Member
Joined
Mar 9, 2015
Messages
411
Trophies
0
XP
317
Country
United States
I updated the QR code installer to allow installing multiple files with a single QR code. Just give it a path to a folder containing some CIA/TIK files. Keep in mind that if there are too many files FBI might have a hard time reading the QR code.
 

moghedien

Well-Known Member
OP
Member
Joined
Mar 9, 2015
Messages
411
Trophies
0
XP
317
Country
United States
I renamed the "qr_installer.pyw" script to "net_installer.pyw" and added support for the new network install protocol added in FBI 2.4.5

You can use the new protocol like this:
Code:
./net_installer.pyw --send x.x.x.x /path/to/file.cia
Where "x.x.x.x" if the IP address of your 3DS (displayed by FBI).
If you don't use the "--send" argument (or if you drag-and-drop files onto the script) it will display the QR code.

I also added a script for the old FBI 1.x protocol, just because.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: Lesbians invented babies +2