News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Attachment Decryption outside Forum Install?

Started by TechXPlays, September 11, 2022, 03:09:41 PM

Previous topic - Next topic

TechXPlays

I have an old forum backed up that I realized I need some old files from. I've realized SMF renames the attachments to some sort of hash and removes file extension. The backup was done using Filzila, just downloading all files and folders. My idiot self forgot to backup the SQL Database, so I don't ahve that to go off of.

I have tried just adding the extension, but that doesn't work. I know these files should open in 7zip, but they only partially open. A ton of stuff is missing due to what I'm guessing is the encryption.

Is there a way to get these files back to their normal selves?

Sir Osis of Liver

The files are not encrypted or zipped, only the file name is hashed.  If you add the correct extension (.jpg, .pdf, etc.) the files should open normally.  If you downloaded the files using FileZilla without selecting binary transfer type, the files will be damaged.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

TechXPlays

i can tell you they were downloaded simply by drag and drop when doing all the folders and files at once of the host. The files were APK's, when I open them now in 7zip, its definitely not the original file.

Kindred

Quote from: Sir Osis of Liver on September 11, 2022, 04:17:06 PMIf you downloaded the files using FileZilla without selecting binary transfer type, the files will be damaged.

The only thing to do, if you still have the original files on the server,  is to re-download them in the proper, BINARY format
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."


Sir Osis of Liver

Quote from: Kindred on September 12, 2022, 08:37:13 AMThe only thing to do, if you still have the original files on the server,  is to re-download them in the proper, BINARY format

 ^ If you use default transfer setting (Auto) in FZ to d/l attachments, they will be corrupted.  FZ has a second setting (well hidden) that causes files without extensions to be d/l'd as ASCII, which ruins the attachments.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

TechXPlays

Quote from: Sir Osis of Liver on September 12, 2022, 12:42:41 PM
Quote from: Kindred on September 12, 2022, 08:37:13 AMThe only thing to do, if you still have the original files on the server,  is to re-download them in the proper, BINARY format

 ^ If you use default transfer setting (Auto) in FZ to d/l attachments, they will be corrupted.  FZ has a second setting (well hidden) that causes files without extensions to be d/l'd as ASCII, which ruins the attachments.


I've been using Filza for probably 15 years, I've never had an issue like this until specifically with SMForum

Also from the context clues, I'm sure people could easily guess the original server is gone lol

shawnb61

If you still have an export of the SMF Attachments table, you can use that info to rename the files to the original filenames.

Approach described here:
https://www.simplemachines.org/community/index.php?msg=3927825

And yeah, depending on the settings used, Filezilla can corrupt the files.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Kindred

the problem with Filezilla is that it doesn't properly interpret a file with no extension.  It tries to use ASCII format, it the file has no extension and the setting in filezilla is "auto".
(it's a stupid setting, IMO. Everything should always be BINARY, since that doesn't screw up anything, but ASCII will screw things up)

We "fixed" this in 2.1.x by adding a .dat extension -- but the 2.0 format (with no extension) will have the problem if you download before upgrading.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Sir Osis of Liver

In FZ -

  Edit > Settings > Transfers > File Types > Treat files without extensions as ASCII file

This overrides the Auto transfer type and corrupts the attachments.  Shouldn't be there, but it is.


Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Advertisement: