Sep 14, 2012 08:55 PM
(This post was last modified: Sep 25, 2012 04:52 AM by observers.watch.)
Still working on the file storage. File encryption works right now, but I haven't put a page in for actually retreiving your uploaded files yet. Sorry, it'll be done in an hour or so and I'll edit the thread accordingly.
Also, if you're interested in the source of any page, click the "src?" down at the bottom. It's a quine, it prints it's own (unformatted, unfortunately) source. (Source will be formatted later with the GeSHi syntax highlighting library.)
Feel free to make any suggestions for new features that you'd like!
How paste storage/retrieval works:
Storage:
- User enters paste data, password, and Captcha
- Paste data is AES-256 encrypted with the user's provided password (done via PHPseclib)
- Encrypted data is converted to base64 (to solve compatibility issues with the characters that encrypted shit comes out as)
- Base64'd data is stored in a MySQL DB
Retrieval:
- User gets a link to a paste
- User enters a password
- If the password is correct, proceed. If not, they're shown an error.
- Base64 data is retrieved from database and converted into encrypted text
- Password is used to decrypt plaintext
- Plaintext is shown to user
How file storage/retrieval will work once fully implemented:
Storage:
- User enters a file, a password, and fills out a Captcha
- File is moved to an alternate directory and given a 32 character random name (file extension is kept in-tact)
- File's contents are read using file_get_contents(), then that data is encrypted with the provided password
- The data is converted into base64 (again, for compatibility reasons with MySQL)
- The data + some info about the file is stored in the MySQL DB for retrieval later
Retrieval:
- User is given a link to a file
- User enters password; if the password is correct, proceed to 3
- Data from MySQL DB is decoded and then decrypted with the pass the user provided
- Data is assembled into a file with a random name (but the appropriate extension)
- User is linked to that file
- 120 seconds after the download link is clicked, the file given to the user is deleted (But can be recreated again under a different name if the user enters the password again, of course)
i dont smoke weed i smoke clowns like u on the b-ball court



![[Image: mhL8hhj.png]](https://i.imgur.com/mhL8hhj.png)
![[Image: AmU3ZAf.gif]](https://i.imgur.com/AmU3ZAf.gif)