blawar / nut Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v3.0
License: GNU General Public License v3.0
Hi
I try to scrape the images from Nintendo as seen in readme:
nut.py -s --scrape
but when finish i go to the webserver and everything looks without image,this needs some cert or token now?
thanks
Hello,
I am having an issue when manually downloading.
When I use
nut.py --download ID,KEY
It will download and fail stating "NCA Verification failed". But if I remove the key from titles.json, and use
nut.py --download ID --nsx 1
It will download the NSX fine. Once I add the key back into the file, I can successfully run an unlock command and it will add the key and convert it to an NSP.
Am I missing something, or doing something wrong?
Script exits with unhandled exception if you try to change master key (any switch like "--set-masterkey4").
Traceback (most recent call last):
File "nut.py", line 879, in <module>
f = Fs.Nsp(args.set_masterkey5, 'r+b')
File "E:\Downloads\nut-master\nut-master\Fs\Nsp.py", line 35, in __init__
super(Nsp, self).__init__(None, path, mode)
File "E:\Downloads\nut-master\nut-master\Fs\Pfs0.py", line 24, in __init__
super(Pfs0, self).__init__(buffer, path, mode, cryptoType, cryptoKey, cryptoCounter)
File "E:\Downloads\nut-master\nut-master\Fs\BaseFs.py", line 40, in __init__
super(BaseFs, self).__init__(path, mode, cryptoType, cryptoKey, cryptoCounter)
File "E:\Downloads\nut-master\nut-master\Fs\File.py", line 381, in __init__
super(File, self).__init__(path, mode, cryptoType, cryptoKey, cryptoCounter)
File "E:\Downloads\nut-master\nut-master\Fs\File.py", line 258, in __init__
super(BufferedFile, self).__init__(path, mode, cryptoType, cryptoKey, cryptoCounter)
File "E:\Downloads\nut-master\nut-master\Fs\File.py", line 28, in __init__
self.open(path, mode, cryptoType, cryptoKey, cryptoCounter)
File "E:\Downloads\nut-master\nut-master\Fs\Nsp.py", line 233, in open
super(Nsp, self).open(path or self.path, mode, cryptoType, cryptoKey, cryptoCounter)
File "E:\Downloads\nut-master\nut-master\Fs\Pfs0.py", line 100, in open
self.files.append(self.partition(offset + headerSize, f.size, f))
File "E:\Downloads\nut-master\nut-master\Fs\File.py", line 64, in partition
n.open(None, None, cryptoType, cryptoKey, cryptoCounter)
File "E:\Downloads\nut-master\nut-master\Fs\Nca.py", line 212, in open
self.partition(0x0, 0xC00, self.header, Fs.Type.Crypto.XTS, uhx(Keys.get('header_key')))
File "E:\Downloads\nut-master\nut-master\Fs\File.py", line 64, in partition
n.open(None, None, cryptoType, cryptoKey, cryptoCounter)
File "E:\Downloads\nut-master\nut-master\Fs\Nca.py", line 136, in open
if self.titleId.upper() in Titles.keys() and Titles.get(self.titleId.upper()).key:
File "lib\Titles.py", line 99, in keys
return titles.keys()
Possible fix (for a single case):
if args.set_masterkey5:
initTitles() # add this line
initFiles() # add this line
f = Fs.Nsp(args.set_masterkey5, 'r+b')
f.setMasterKeyRev(5)
f.flush()
f.close()
pass
Hi! Is it possible to make it work on android as app with this method?
So first the network install, I added a game to a directory and nut is showing it when I start the server.py however in the tutorial it says to go to locations and add location in tinfoil however I do not see a locations in order to add this, there is a locations.conf but I do not know the syntax I would need to add it manually like that.
And then image scraping, in the readme is says to use command nut.py -s --scrape however when executing this I get the message "nut.py: error: unrecognized arguments: --scrape"
Thanks for any help with these, I have a feeling the first one is me just being stupid but idk I tried for a few hours doing things but to no avail so I turn to you.
I can run server.py and it will scan and serve just fine. But only once. When I close it and reopen it, it locks up upon trying to scan again. This is repeatable for me - and it happens with 1.2 and 1.1 and the exe file. I can fix by removing everything and extracting again.
Any ideas?
didnt know where to report this but the title key for Overcooked! 2 [Overcooked! 2 - Surf 'n' Turf] seems to be missing 1 letter/number in its key. Its the only one that is that length and short by one. If this is the wrong place to post let me know just saw this gihub on top of the files so thought id try
When trying to remove title rights from two recent publicly released NSPs, I get a "mismatched masterkeyrevs" exception (displayed masterkeyrev = 0x0). The calculated titlekey is also different from the titlekey normally obtained from said games using the rights ID.
My guess is the NSPs were reencoded on master_key_00 by the release team for maximum compatibility with all firmwares and therefore nut finds that the key used to encode the game is not the one that's supposed to be used and just stops with an exception when this happens.
Is there some way to let the script do its job despite the masterKeyRevs mismatch?
Thank you very much for the great tool!!
Hi, this is not an issue, it is a request, but as a programmer I consider it is very easy to add this feature if you want. I'm perfectly aware that XCI is only capable for SX OS, but many people owns.
XCI does not require installation as NSP, and the procedure is finished when you retrieve from the FTP Server the XCI file and you store it into one of the next folders:
/
/sxos/xci
/switch/xci
On any of that three folders SX OS is capable to find the XCI game. So the only job is RETR the file from FTP SERVER and store it into the root folder of microSD, or /switch/xci , or /sxos/xci.
That's all.
I hope you take it in care.
Thank you very much.
Can you, please, provide Nut for Linux users? :)
Would be a nice feature in case you don't remember the file size or might not have enough space on your Switch.
Installing dependencies with pip3 and copying server.py to Server.py will work perfectly in Linux, maybe on OSX too
FYI (in stdout)
Exception happened during processing of request from ('127.0.0.1', 36454)
Traceback (most recent call last):
File "lib/Server.py", line 146, in do_GET
method(request, response)
File "lib/Web/Api.py", line 47, in getBannerImage
id = request.bits[2]
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.5/socketserver.py", line 313, in _handle_request_noblock
self.process_request(request, client_address)
File "/usr/lib/python3.5/socketserver.py", line 341, in process_request
self.finish_request(request, client_address)
File "/usr/lib/python3.5/socketserver.py", line 354, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "lib/Server.py", line 130, in __init__
super(NutHandler, self).__init__(*args)
File "/usr/lib/python3.5/socketserver.py", line 681, in __init__
self.handle()
File "/usr/lib/python3.5/http/server.py", line 422, in handle
self.handle_one_request()
File "/usr/lib/python3.5/http/server.py", line 410, in handle_one_request
method()
File "lib/Server.py", line 150, in do_GET
self.wfile.write(Response500(request, response))
File "/usr/lib/python3.5/socket.py", line 594, in write
return self._sock.send(b)
TypeError: a bytes-like object is required, not 'NoneType'
Crashes with error code: 2168-0001 after exiting DZ since the commit 12 hours ago
never mind, local issue
In the reedme its said to:
If you only wish to rename / organize files, and not download anything, edit nut.conf and set all downloading options to false. Your NSP files should have the titleid as a part of the filename in brackets.
It can download any titles you do not have a key for (for archiving), by enabling sansTitleKey in nut.conf. These titles are saved with the .nsx file extension, and can be unlocked at a later time when a title key is found.
this options are not generated in my nut.conf, do they exist? or the download feature itself was removed?
Are you planning to add https support in dz? Maybe just use a version of curl with https support?
Getting this error part way through USB install With lithium
usb exception: [Errno None] b'libusb0-dll:err [claim_interface] could not claim interface 0, win error: Cannot create a file when that file already exists.\r\n'
Hi,
I’m on Mac OS X
When running
nut.py -s --scrape
nut.py --server
I got the following message:
TypeError: “encoding” is a invalid keyword argument for this function
It is related to file config.py line 134
Thanks
Is it not possible to read title id, patch version etc. directly from within NSP file? As far as I know everything required to parse it is already there. So why does nut
require titleid within the filename?
Hi,
I try to access an external HTTP or FTP ressource over WAN via domain name. But I just get: Couldn't resolve host.
From my browser everything is fine.
Is there anything I can do?
Update: FTP is also affected by this issue. Connecting over IP is working fine.
Is it possible to compile NUT for Qnap OS? It would be great to download games right on Qnap and install them to Switch directly from there.
Just a short question. Scraping Images. What do I get out of the pictures? 🙈 For what i need that images
When you check for updates, titleNames are not shown in the server, even with command line, you sometimes get the title's baseName. I think we should get the baseName also.
I'll try to implement in my Fork after 1 week, but if you have time you could check it out.
Setting Disable_game_image | "True" in CDNSP-GUI-config.json is ignored. Images still attempt to download.
GUI Version: 6.0.1
Language Files Version: 1.0.1
OSX
Hello,
I have a sx pro and i know you released sx server, however i run my nut server in a docker on my nas and you current nut server doesn’t offer xci integration.
Do you plan to release sx server also on github so it can be started on linux and not only under windows or add the xci integration on this nut server (without on the fly conversion, just like you did on sxserver)
Is there any chance to get the description in other languages, e.g. in german?
Please, help me. I can't login to the server. When I start the server GUI with this command: nut.py --server
and open localhost:9000
in the web browser, it wants Username and Password from me. Where I can get these information?
Thanks for your help...
FYI,
CDNSP is looking for keys.txt in the cmdLine, vs Keys lib looking for Keys.txt, so unless you have both its kind of screwy :)
I know you're developing really quickly, might have missed it, loving the progress so far.
It would be nice to be able to go into sub-dirs instead of just listing the specific folder. (Like browsing through FTP/HTTP), so we can keep both the server and the switch clean. (Kept nsp for specific games within their own folder.)
So basically when I run nut.py --usb only base games and DLC are detected by tinfoil on my switch, pretty sure the updates are correctly named as they're detected when using nut.py --organize and are actually moved from my scan folder to titles/updates.
thanks!
I was wondering if there is a function in the API that will rescan the scan directory. I saw the function getScan but if i go to api/scan it does something, but I do not see the newly added games that are put in the directory. I hope someone can help me!
USB Connected
begin recv
read complete
invalid magic! b'/api'
failed to read!
begin recv
read complete
invalid magic! b' OF '
failed to read!
begin recv
read complete
invalid magic! b'00BD'
failed to read!
begin recv
read complete
invalid magic! b'\x00\x00\x00\x00'
failed to read!
begin recv
usb exception: [Errno None] b'libusb0-dll:err [_usb_reap_async] reaping request failed, win error: A device attached to the system is not functioning.\r\n\n'
Win 10 libusbK 3.0.70 replaced driver
switch crashed with error code: 2000-0000
Just grabbed the new commit as of right now.
after"python3 nut.py -s --scrape" i get following error.
Traceback (most recent call last):
File "nut.py", line 20, in <module>
from nut import Title
File "/root/nut/nut/__init__.py", line 1, in <module>
from nut import Titles
File "/root/nut/nut/Titles.py", line 8, in <module>
from nut import Title
File "/root/nut/nut/Title.py", line 16, in <module>
from nut import Nsps
File "/root/nut/nut/Nsps.py", line 4, in <module>
import Fs
File "/root/nut/Fs/__init__.py", line 3, in <module>
from Fs.Nsp import Nsp
File "/root/nut/Fs/Nsp.py", line 19, in <module>
from Fs.Ticket import Ticket
File "/root/nut/Fs/Ticket.py", line 6, in <module>
from nut import blockchain
File "/root/nut/nut/blockchain.py", line 222
print(f'{last_block}')
^
SyntaxError: invalid syntax
please ignore im using it with root... this is just for testing ;-)
HI, there are torrents with complete CDNSP backup that could be added to this tool and select which file you would like to download, as you can do it with utorrent for example.
Do you think is possible to add this option?. This could open this tool to widespread use
There was issue with accents.
organizing
Traceback (most recent call last):
File "nut.py", line 606, in
nut.organize()
File "/srv/dev-disk-by-label-Malinka-Media/Home/sephirot/nut/nut/init.py", line 140, in organize
f.move()
File "/srv/dev-disk-by-label-Malinka-Media/Home/sephirot/nut/Fs/Nsp.py", line 252, in move
if os.path.isfile(self.fileName()) and os.path.abspath(self.path) == os.path.abspath(self.fileName()):
File "/usr/local/lib/python3.6/genericpath.py", line 30, in isfile
st = os.stat(path)
UnicodeEncodeError: 'ascii' codec can't encode character '\u2019' in position 21: ordinal not in range(128)
I have added
#!/usr/bin/python3
to every file that was missing t.
Then there was an issue with 'é' like in Pokémon.
The unicode string for \xe9 is an accented e - é
It turned out both issues were in both "Let's go" Pokemon updates. and Tatsujin games.
SX Installer sends a invalid head request
192.168.188.36 - - [05/Jan/2019 17:02:58] "HEAD /api/download/01002EB007D3A000/Star%20Ghost%5B01002EB007D3A000%5D%5BDE%5D%5Bv0%5D.nsp HTTP/1.1" 200 -
192.168.188.36 - - [05/Jan/2019 17:02:58] code 400, message Bad request syntax ('GET /api/download/01002EB007D3A000/Star Ghost[01002EB007D3A000][DE][v0].nsp HTTP/1.1')
Hey Blawar. I was wondering if you had read up on nsZip. It's a compressor for NSP files that got released awhile back and it works fairly well, but it's not supported much by anyone. Do you think you could see if it's something you'd be willing to add support for in NUT? It's be nice to have the benefit of saved space and inventory control. lol
Here's the git:
https://github.com/nicoboss/nsZip
Thanks for all you too bossman.
Is there a way to see newly scanned content on linux without restarting the server?
Currently I have to
before I can see my newly added titles.
Hi,
I use nut.exe v1.2 from the release section on windows.
I put xci file i made from my cartridge in the scan folder , the files are renames with [titleid] but they are not added on the server.
But the .nsp to update the game are.
Can you help ?
Thanks
Jul
git pull takes so long 😅 . It's hanging 10 minutes on Resolving deltas
New source type included in the new SX OS 2.2 Beta with USB support
Would be nice to have:
{
"title": "USBHDD",
"path": "usbhdd:/"
},
Should be faster than FTP if it actually work!
Thanks!
if calc_sha256(fPath) != CNMT.parse(CNMT.ncaTypes[type])[ncaID][2]:
File "(...)\nut\CDNSP.py", line 84, in calc_sha256
buf = f.read(4096)
OSError: [Errno 22] Invalid argument
Hey, I got this error.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.