PS3 [RESEARCH] Downloading all unknown file types to HDD and Flash

Can something be served as a different mime type to its extension, interesting. I thought the mimetype was based on the extension.

I can change mimetypes in the sprx, i can edit/replace them. just not sure how to. Any tips?

View attachment 16313View attachment 16314

Yes, the mime types are based on extension, but they can be changed in server side. This is a tutorial for Apache:
https://www.developershome.com/wap/wapServerSetup/tutorial.asp?page=settingUpMIME

It looks like these mime types are the accepted ones. Not sure if changing them would make a difference. You could try replacing some of the mime types with the mime type used by your server for the CFW file extensions (e.g. application/octet-stream or binary/octet-stream) or configure the server to use a custom MIME type that matches with the size of the existing mime type in the sprx.

The problem that I see is that it would limit the download to specific servers that use the custom mime types.
 
Cool, i will look into that. Thanks.

I dont like the idea of it only working with custom server mimetypes either. So i will try add those 2 you posted. Even though they are long.

Which one is most common on servers do you know? application/octet-stream or binary/octet-stream?

@Joonie, See my video, with a tiny change on Rebug.me , hosting a txt file instead of a zip file with a txt file inside, users could update CFW without any USB.. interesting anyway as a POC. :)

 
Which one is most common on servers do you know? application/octet-stream or binary/octet-stream?
application/octet-stream

This is what RFC 2046 says:
4.1.4. Unrecognized Subtypes

Unrecognized subtypes of "text" should be treated as subtype "plain"
as long as the MIME implementation knows how to handle the charset.
Unrecognized subtypes which also specify an unrecognized charset
should be treated as "application/octet-stream".

https://tools.ietf.org/html/rfc2046
 
Does anyone know anything about sbk or sb2 files?

There is something very strange about them, PS3 will not download them at all. If you try to download to usb you get this error (see pic). its strange, because ALL other file types apart from p3t give option to download to USB:

upload_2019-4-8_18-3-27.png



Can someone here with socat setup and a few minutes, (@Joonie maybe if your not busy) Please see if there is anything coming up when you try download one of these files on ps3 web browser:

I think its looking for a folder that does not exist, maybe MSSSJ or GUIDE, but i dont know where its looking, I have tried all the usual spots like dev_hdd0/tmp, dev_usb000 root, dev_hdd0 root etc etc.

Any help much appreciated, if we can figure this out i can add 2 more unknown file types, so we can have 3 at a time added.
 
Last edited:
Maybe, I Will look at uploading too.

On CFW it might be possible, with the mimetypes.xml, to have multiple download_plugins set up, patched differently depending on the mimetype detected.
Yeah I saw that file, I tried editing it but it seemed to have no effect. I realized it was for the silk browser, so I ran silk and it worked. I added the mimetype "application/octet-stream" and left the plugin as videodownloader. The screen immediately went black and booted into recovery mode, probably because the plugin is just a dummy file.

I then changed it to download_plugin and got some interesting results, in conjunction with download_list.xml I was able to download a pkg file to hdd0 (with background download if I remember correctly). It's far from perfect though, there's all kinds of errors and it says the download failed. Sometimes the file doesn't even save.

Anyway, maybe something more can be done with that file.

Edit: Seems like the same thing would've happened regardless of the contents of the mimetypes file, I think this happened because of the download xml.
 
Last edited:
Does anyone know anything about sbk or sb2 files?

There is something very strange about them, PS3 will not download them at all. If you try to download to usb you get this error (see pic). its strange, because ALL other file types apart from p3t give option to download to USB:

View attachment 16320


Can someone here with socat setup and a few minutes, (@Joonie maybe if your not busy) Please see if there is anything coming up when you try download one of these files on ps3 web browser:

I think its looking for a folder that does not exist, maybe MSSSJ or GUIDE, but i dont know where its looking, I have tried all the usual spots like dev_hdd0/tmp, dev_usb000 root, dev_hdd0 root etc etc.

Any help much appreciated, if we can figure this out i can add 2 more unknown file types, so we can have 3 at a time added.


This is all I can see.

upload_2019-4-8_10-24-13.png


Getting debug log is fairly easy, you just have to replace your stage2 with debug version and run socat via either cygwin or msys

I'm uploading my compiled binaries, and I am sure this will speed up your research by looking at which file being accessed / crashed during your research.

Code:
socat -u udp-recv:18194 stdout

^ this is the command that you type to get debug log
 

Attachments

Yeah I saw that file, I tried editing it but it seemed to have no effect. I realized it was for the silk browser, so I ran silk and it worked. I added the mimetype "application/octet-stream" and left the plugin as videodownloader. The screen immediately went black and booted into recovery mode, probably because the plugin is just a dummy file.

I then changed it to download_plugin and got some interesting results, in conjunction with download_list.xml I was able to download a pkg file to hdd0 (with background download if I remember correctly). It's far from perfect though, there's all kinds of errors and it says the download failed. Sometimes the file doesn't even save.

Anyway, maybe something more can be done with that file.

Edit: Seems like the same thing would've happened regardless of the contents of the mimetypes file, I think this happened because of the download xml.
That freeze is the one i use to get into recovery on NANDs, that is due to missing rco , if rco was there it would just freeze i think. Try it.

You can grab the real videodownloader_plugin sprx and rco from older FW, it might need resigning (if so it would only work on CFW), or maybe old OFW sprx would load on 4.84, idk. or try renaming a copy of download_plugin.sprx, or just try putting download_plugin into the mimetypes.xml etc
Getting debug log is fairly easy, you just have to replace your stage2 with debug version and run socat via either cygwin or msys

I'm uploading my compiled binaries, and I am sure this will speed up your research by looking at which file being accessed / crashed during your research.
That would be great, thanks,. it would help, I had it set up once with your help, but forgot how. :)
.
 
That freeze is the one i use to get into recovery on NANDs, that is due to missing rco , if rco was there it would just freeze i think. Try it.

You can grab the real videodownloader_plugin sprx and rco from older FW, it might need resigning (if so it would only work on CFW), or maybe old OFW sprx would load on 4.84, idk. or try renaming a copy of download_plugin.sprx, or just try putting download_plugin into the mimetypes.xml etc

That would be great, thanks,. it would help, I had it set up once with your help, but forgot how. :)
.

I think the PS3SDKv2 I uploaded (for COBRA) a while ago should include that already you just have to type the command after running the batch for msys

https://www.mediafire.com/download/s88ycf85d0vnshd/PSDK3v2_COBRA.rar

https://www.psx-place.com/threads/e...a-7-payload-psl1ght-cell-sdk.3417/#post-26868
 
You can grab the real videodownloader_plugin sprx and rco from older FW, it might need resigning (if so it would only work on CFW), or maybe old OFW sprx would load on 4.84, idk. or try renaming a copy of download_plugin.sprx, or just try putting download_plugin into the mimetypes.xml etc
What is videodownloader? I assume it downloads videos obviously but I've never actually seen it in action. Wonder why it was removed.

I did put download_plugin in there, it just brings up the download dialog whenever you browse a page because of the generic mimetype. It's cool but somewhat useless.
 
What is videodownloader? I assume it downloads videos obviously but I've never actually seen it in action. Wonder why it was removed.

I did put download_plugin in there, it just brings up the download dialog whenever you browse a page because of the generic mimetype. It's cool but somewhat useless.
interesting, so that file is being read, you see i can add custom mimetypes to the sprx in hex, so there might be a hack there if we can think of it. :)
 
interesting, so that file is being read, you see i can add custom mimetypes to the sprx in hex, so there might be a hack there if we can think of it. :)
Interestingly I did get filecopy_plugin to work, it brings up a seemingly unique dialog asking you to select a USB device. When you do it shows a message saying no images are present. When you exit that menu it brings up a dialog asking you to download additional software for the photo gallery. It's useless for now but interesting nonetheless.

Edit: It could just be the dialog that shows when copying images to a storage device, I've never done that so I can't say for sure.
 
Interestingly I did get filecopy_plugin to work, it brings up a seemingly unique dialog asking you to select a USB device. When you do it shows a message saying no images are present. When you exit that menu it brings up a dialog asking you to download additional software for the photo gallery. It's useless for now but interesting nonetheless.

Edit: It could just be the dialog that shows when copying images to a storage device, I've never done that so I can't say for sure.
I need your help actually, i need to know how to write a path, that gets me out of a dev_xxx:/PSP/GAME/UPDATE folder, and into a dev_hdd0/xxx folder? can i do it like you did with pkgs with /../? and how long would it be is issue i have?
 
I need your help actually, i need to know how to write a path, that gets me out of a dev_xxx:/PSP/GAME/UPDATE folder, and into a dev_hdd0/xxx folder? can i do it like you did with pkgs with /../? and how long would it be is issue i have?
../ indicates going up one directory so in your example

dev_hdd0/PSP/GAME/UPDATE

../../../ <- from here you're in dev_hdd0, going up 3 directories
 
../ indicates going up one directory so in your example

dev_hdd0/PSP/GAME/UPDATE

../../../ <- from here you're in dev_hdd0, going up 3 directories
Thanks,

Ok, then i need to go up 4 , as im on dev_ms/psp . will see how i get on, getting kind of long based on room i have in hex. Might be able to add an extra 3 filetypes with this old unused PSP code if i can do this. not sure , its complicated :)
 
Last edited:
Well you can already download a rap to usb with the normal browser, A rap is not much good on dev_hdd0 anyway. Also they are small and background downloading is not an issue.
Why is not a good idea?

So it downloads and go to usb/exdata??
It would be cool if when downloaded it would go to hdd if the rap folder was set on psnpatch.cfg as hdd/exdata (default is to usb/exdata).


Sent from my Redmi Note 5 using Tapatalk
 
Why is not a good idea?

So it downloads and go to usb/exdata??
It would be cool if when downloaded it would go to hdd if the rap folder was set on psnpatch.cfg as hdd/exdata (default is to usb/exdata).


Sent from my Redmi Note 5 using Tapatalk
Well, if i can add unlimited filetypes maybe, but if i am limited to 3 or 4 then rap will not be one of them. :)
 
Well, if i can add unlimited filetypes maybe, but if i am limited to 3 or 4 then rap will not be one of them. :)

Maybe you could sacrifice more file types, leaving only the most popular formats... we always have the option of restore the original sprx if we need to download some of these rare file types.

IMO we need at least *.pkg, *.iso, *.pup. As these are containers, they could be used to get any other file installed easily (specially if we use the new custom package maker by lmn7).

If there are more slots available, it would be nice to have some of these too: *.zip, *.mkv, *.sprx, *.rap, *.rif, *.dat, *.edat. Although I think that the first 3 would be enough for 90% of CFW needs.
 
Maybe you could sacrifice more file types, leaving only the most popular formats... we always have the option of restore the original sprx if we need to download some of these rare file types.
exactly, its easy toggle the download_plugin with the original if needed, as a bonus, this can be done without rebooting if its not being used, as in background downloading,
IMO we need at least *.pkg, *.iso, *.pup. As these are containers, they could be used to get any other file installed easily (specially if we use the new custom package maker by lmn7).
Definitely those 3, and maybe zip or bin too although those can be in pkgs like you say.



I have an issue, i can replace any of these easily,

upload_2019-4-8_20-47-32.png


And we can spare loads of those, but if i only replace those, we get the 99% error. Now i dont think that the 99% error is too bad, it still allows background downloading, and the file is still perfect.

BUT... the files end up in dev_hdd0/vsh/task/0000000x and it keep changing.

So, can i use your auto exec script function, to do this on boot up , for example:

scan dev_hdd0/vsh/task/ and ALL subfolders for *.pkg and move them all to dev_hdd0/packages
scan dev_hdd0/vsh/task/ and ALL subfolders for *.p3t and move them to dev_hdd0/theme
scan dev_hdd0/vsh/task/ and ALL subfolders for *.ISO and move them to dev_hdd0/PS3ISO
scan dev_hdd0/vsh/task/ and ALL subfolders for *.PUP and move them to dev_hdd0/updater/01
scan dev_hdd0/vsh/task/ and ALL subfolders for *.sprx and move them to dev_hdd0/plugin
scan dev_hdd0/vsh/task/ and ALL subfolders for *.zip and move them to dev_hdd0/tmp/downloader/

etc etc
 
So, can i use your auto exec script function, to do this on boot up , for example:

scan dev_hdd0/vsh/task/ and ALL subfolders for *.pkg and move them all to dev_hdd0/packages
scan dev_hdd0/vsh/task/ and ALL subfolders for *.p3t and move them to dev_hdd0/theme
scan dev_hdd0/vsh/task/ and ALL subfolders for *.ISO and move them to dev_hdd0/PS3ISO
scan dev_hdd0/vsh/task/ and ALL subfolders for *.PUP and move them to dev_hdd0/updater/01
scan dev_hdd0/vsh/task/ and ALL subfolders for *.sprx and move them to dev_hdd0/plugin
scan dev_hdd0/vsh/task/ and ALL subfolders for *.zip and move them to dev_hdd0/tmp/downloader/

etc etc
Wildcards and recursive search are not currently supported, but I could add them for in a next build ;)
 
Wildcards and recursive search are not currently supported, but I could add them for in a next build ;)
Cool, that would be a nice feature.


I also had idea for a feature, now its a bit random , and feel free to tell me to piss off.

But i wonder can we have a wildcard to use in scripts, that increases by 1 every boot? :)

I have idea for it. Maybe others would use it , idk.

If i had a variable, where i could define it, and set the range, so i might say $$ is equal to 001 to 100. Then it starts off that $$ is 001, then next reboot its 002 etc. It could also be used to count and log reboots, maybe have a timestamp next to each reboot added to a log while incrimenting the counter on $$.

Idk, might be mad idea. :D

I was thinking of changing stuff. for example, you could have new coldboot every boot, automatically changing, or new start up sound. or perform other tasks in more ways. new background image etc

For example, i could have:
  • Copy dev_hdd0/tmp/coldboot$$.raf to dev_flash/vsh/resource/coldboot.raf
It could be used to do other tasks too that you might not want to do every reboot, like every 100th boot, delete blah blah,
 
Back
Top