Author Topic: Understanding and using the Content Downloader.  (Read 12765 times)

Offline SilicaAndPina

  • Hot Pockets
  • End User
  • *****
  • Posts: 38
  • Its probably a wiccan thing..
    • View Profile
Understanding and using the Content Downloader.
« on: July 06, 2020, 11:30:21 AM »
Some of you may have noticed a "content downloader" option under "Henkaku settings",
OG scene members will remember this from "IDU Mode", but it also exists under ★Debug Settings,


infact because its possible to have IDU Flag and Testkit flag all at the same time-
its possible for this settings option can appear twice inside the settings app. one in idu, and the other in debug
(note you have to hold L when booting settings app in IDU mode, because henkaku actually hijacks the "idu_settings.xml" file..)

but enough trivia. what does it do?
well its quite like the name implies, it allows you to download PSVita apps from an HTTP source.


Specifically the following formats:

Applications:
    .PKG (fPKG and PSM Only for some reason, its possible VITA pkg works with idu flag, but i haven't tested)
    .PUP (PlaystationUPdate files.)
Images:
    .JPEG/JPG (PNG files do not show up for some reason, despite the vita being able to download them from Browser)
Videos:
    .MP4 (Does not check if its a valid video file)

Content Downloader will HTTP GET whatever url you enter, and attempt to read <a href=""> html tags from the response,
it will list any that .endswith() any of the supported file types, giving you multiple choice selections



upon clicking on the download button the PSVita will go through that list and append whats specified in <a href=""> to the base URI.
it will then send an HTTP HEAD request to that in order to get information on the file (Content-Length mainly)
and then start downloading the same URI with HTTP GET.

Introducing: Meme HTTP (mHTTP):
Content Downloader implements HTTP incorrectly, and includes spaces and special characters directly in file paths UNESCAPED so no %20 on spaces,
this breaks alot of web servers >_<

Content Downloader ASSUMES relative URIs in href tags, if for example your base URI is https://example.com/example-filelist.html
and it contains <a href="http://example.com/example.pkg">when attempting to download this file, the URI that gets requested will be
"https://example.com/example-filelist.html/http://example.com/example.pkg" BECAUSE WHY THE HELL NOT!!

Because of all these annoyances i opted to write my own "Content Downloader" server:

https://github.com/KuromeSan/ContentServer/releases
https://bitbucket.org/SilicaAndPina/contentserver/downloads



However careful usage of existing HTTP server software (making sure not to include spaces in filenames, having file lists inside directories as "index.html" etc) should work i guess?

- Blessed Be


« Last Edit: July 06, 2020, 12:06:17 PM by SilicaAndPina »