ftpdump icon indicating copy to clipboard operation
ftpdump copied to clipboard

OSX Error When Dumping Patch - Could not extract file "".

Open coryshaw1 opened this issue 2 years ago • 19 comments

Before I begin I must note I had to change a few things in the script to support OSX.

  1. Replace all instances of mkdir --parents with just mkdir -p
  2. dd does not have a --version flag on OSX so I just updated L870 to dd --version 2> /dev/null | grep GNU > /dev/null

And finally for the error. I ran in debug mode to get more logging:

./ftpdump 192.168.1.250:2121 -p -r --debug

\e[95mDEBUG: \e[35mNon-GNU dd detected - using regular dd options (slow!).\e[39m
\e[95mDEBUG: \e[35mUsing current directory as output directory.\e[39m
\e[95mDEBUG: \e[35mOptions: dump_app=, dump_patch=1, dump_dlc=, dump_keystone=, dump_sflash=, dump_appdb=, dump_path=, decrypt=1, debug=1, debug_pfs=, curl_options=, curl_verbose=, wget_options=, wget_verbose=, pfs_extraction_enabled=\e[39m
\e[95mDEBUG: \e[35mUsing FTP server "ftp://192.168.1.250:2121".\e[39m
\e[95mDEBUG: \e[35mChecking FTP connection ...\e[39m
\e[95mDEBUG: \e[35mGoldHEN 2.x FTP server detected.\e[39m
\e[95mDEBUG: \e[35mServer-side SELF decryption is enabled.\e[39m
\e[95mDEBUG: \e[35mChecking if patch data exists.\e[39m
Dumping CUSA02084 patch data (17048 MB):
\e[95mDEBUG: \e[35mDumping directory "/mnt/sandbox/pfsmnt/CUSA02084-patch0/", cutting 4 directories.\e[39m
eboot.bin
libfmod.prx
...
sce_sys/trophy/
Preparing extraction of patch.pkg ...
\e[95mDEBUG: \e[35mDumping 48 bytes from patch.pkg to get body size.\e[39m
\e[95mDEBUG: \e[35mBody offset: 8192\e[39m
\e[95mDEBUG: \e[35mBody size: 21946368\e[39m
\e[95mDEBUG: \e[35mDumping body from patch.pkg (21954560 bytes).\e[39m
\e[95mDEBUG: \e[35mID: 0xffffffffe6697f70\e[39m
\e[95mDEBUG: \e[35mFilename offset: 1691452777\e[39m
\e[95mDEBUG: \e[35mData offset: -610120600\e[39m
\e[95mDEBUG: \e[35mSize: 1671949259\e[39m
Extracting
Could not extract file "".
Error encountered, script aborted.

I'm guessing something with the partial file download is failing on OSX using dd.

Any ideas here?

Editing with an example from attempting to dump a base game with app.pkg:

./ftpdump 192.168.1.250:2121 -r --debug

\e[95mDEBUG: \e[35mNon-GNU dd detected - using regular dd options (slow!).\e[39m
\e[95mDEBUG: \e[35mUsing current directory as output directory.\e[39m
\e[95mDEBUG: \e[35mNo dump options specified - enabling app, patch, and DLC dumping.\e[39m
\e[95mDEBUG: \e[35mOptions: dump_app=1, dump_patch=1, dump_dlc=1, dump_keystone=, dump_sflash=, dump_appdb=, dump_path=, decrypt=1, debug=1, debug_pfs=, curl_options=, curl_verbose=, wget_options=, wget_verbose=, pfs_extraction_enabled=\e[39m
\e[95mDEBUG: \e[35mUsing FTP server "ftp://192.168.1.250:2121".\e[39m
\e[95mDEBUG: \e[35mChecking FTP connection ...\e[39m
\e[95mDEBUG: \e[35mGoldHEN 2.x FTP server detected.\e[39m
\e[95mDEBUG: \e[35mServer-side SELF decryption is enabled.\e[39m
Dumping CUSA02084 app data (6438 MB):
\e[95mDEBUG: \e[35mDumping directory "/mnt/sandbox/pfsmnt/CUSA02084-app0/", cutting 4 directories.\e[39m
eboot.bin
main_ps4.hdr
main_ps4_0.ark
...
sce_sys/trophy/
Preparing extraction of app.pkg ...
\e[95mDEBUG: \e[35mDumping 48 bytes from app.pkg to get body size.\e[39m
\e[95mDEBUG: \e[35mBody offset: 8192\e[39m
\e[95mDEBUG: \e[35mBody size: -1646592\e[39m
\e[95mDEBUG: \e[35mDumping body from app.pkg (-1638400 bytes).\e[39m
"/user/app/CUSA02084/app.pkg": cURL reported error 1 (see https://curl.se/libcurl/c/libcurl-errors.html).
Error encountered, script aborted.

coryshaw1 avatar Dec 22 '21 23:12 coryshaw1