SMF Support > SMF 2.0.x Support
Decrypt all attachments and rename
(1/1)
The.Shadow:
Is there a simple way to decrypt all of the attachments and rename them to the original name. I have transferred all of the attachments from my site onto my comp. I have also exported my smf_attachments database. Now, is there some kind of script to take the database filename and rename the files?
Arantor:
No there is not. They are done in that fashion for security reasons.
Why would you want to decrypt them on your computer anyway?
MrPhil:
You have both the original name and the hashed name in each record of the table. Edit a backup of the table (.sql file) to form a simple batch script to rename the files. How to do that depends on the OS of where you're doing this. It's also possible to write a script to convert the .sql to a batch file/script, but again that depends on your OS. Since you can always go to a post and download the attachment, I don't see it as any ethical problem -- it's publicly viewable data.
Note that if you transferred the attachments using FileZilla, they may have been corrupted by transferring in ASCII mode if you didn't force binary. Be sure to check the integrity of the files before you lose the copies still on the server. Text files downloaded in binary can be fixed (by uploading in binary and downloading in ASCII), but binary files (images, etc.) are toast if downloaded in ASCII. This is a huge design flaw in SMF (omitting any file extensions on attachments) that the developers refuse to acknowledge (they just blame FileZilla).
Navigation
[0] Message Index
Go to full version