Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
4dca99e
Added example config file
Kenneth-W-Chen Mar 28, 2023
6283424
Changed prints to use python3 syntax
Kenneth-W-Chen Mar 28, 2023
b0e669b
Changed functions to match updated praw functions
Kenneth-W-Chen Mar 28, 2023
da47fdf
Fixed byte + str issues; Switched to use cryptodome inherent pad func…
Kenneth-W-Chen Mar 31, 2023
e0213de
Adjusted to use the subreddit obj instead
Kenneth-W-Chen Mar 31, 2023
ed55f49
Changed to wxPython's new window filter namings
Kenneth-W-Chen Mar 31, 2023
539d3b7
Added extra info; may not need username, password fields anymore in w…
Kenneth-W-Chen Mar 31, 2023
2b24b85
Removed pathname; only filename is posted now
Kenneth-W-Chen Mar 31, 2023
6450947
Getting files now works. Doesn't resolve filename conflicts though
Kenneth-W-Chen Mar 31, 2023
3beea76
Fixed bug from putting full pathname in Get window's fileToGetField f…
Kenneth-W-Chen Mar 31, 2023
7622a48
Added some PEP suppressions
Kenneth-W-Chen Mar 31, 2023
c70ae7f
Updated to stop using deprecated libraries and functions
Kenneth-W-Chen Mar 31, 2023
05338ca
Removed unused globals
Kenneth-W-Chen Mar 31, 2023
dc5f6f3
Renamed vars to more descriptive names
Kenneth-W-Chen Mar 31, 2023
f9d4ec9
Removed unnecessary fields in window
Kenneth-W-Chen Mar 31, 2023
1ed5b9f
Added praw.ini which stores passwords and secrets
Kenneth-W-Chen Mar 31, 2023
84c12a9
Rewrote to be more descriptive
Kenneth-W-Chen Mar 31, 2023
2c87532
Update gitignore to include project dependency directories
Kenneth-W-Chen Apr 7, 2023
5086cf5
Put app initialization into its own function
Kenneth-W-Chen Apr 7, 2023
c709e16
Create 'main.py'; this is the new script to run
Kenneth-W-Chen Apr 7, 2023
6e30655
Renamed some vars to be more descriptive
Kenneth-W-Chen Apr 8, 2023
fea2aa9
Password is hashed with argon2id; now using AES-GCM
Kenneth-W-Chen Apr 8, 2023
d63f936
Update encrypt to include MAC in post content; adjust encrypt logic
Kenneth-W-Chen Apr 8, 2023
1d363a3
Decrypt set up; Added DocString; Refactoring to be more descriptive
Kenneth-W-Chen Apr 9, 2023
a5e1635
Subreddit is now set in the config file instead of redditglobals.py
Kenneth-W-Chen Apr 9, 2023
d07533f
Adjusted to match new decryption stuff
Kenneth-W-Chen Apr 9, 2023
67b9765
Changed typehints to Tuple
Kenneth-W-Chen Apr 9, 2023
e43b44b
Encryption and decryption now works; parameters are in post text
Kenneth-W-Chen Apr 9, 2023
3426a02
Adjusted note about Reddit search
Kenneth-W-Chen Apr 9, 2023
22fe8ef
Reformatting and improve DocString
Kenneth-W-Chen Apr 10, 2023
720c855
Merge remote-tracking branch 'origin/python3' into python3
Kenneth-W-Chen Apr 12, 2023
a1b22ea
Now encrypts as it reads file instead of loading entire file first; s…
Kenneth-W-Chen Apr 12, 2023
923f4b7
Added sleep to prevent rate limiting/banning
Kenneth-W-Chen Apr 12, 2023
c399205
Some documentation
Kenneth-W-Chen Apr 12, 2023
d84cea9
Documentation done.
Kenneth-W-Chen Apr 12, 2023
e237340
Added DocString to some vars
Kenneth-W-Chen Apr 12, 2023
69fb85d
Added DocString to some vars
Kenneth-W-Chen Apr 12, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ build/
setup.py

filebrowse.py
/praw.ini
**/venv
**/.idea
81 changes: 61 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,75 @@
#RedditStorage
######Cloud storage that uses Reddit as a backend.
# RedditStorage
###### Cloud storage that uses Reddit as a backend.

=============

RedditStorage is an application that allows you to store on reddit subreddits via raw bytes. The file is encoded into characters and encrypted using AES encryption, after which it can be stored on a subreddit of choice (ideally your own private subreddit). To retrieve the file, the process is simply reversed. Unfortunately, reddit comments have a character limit of 10000. If your file exceeds that amount, it will be split up among comments in the same thread which form links by replying to each other.

=============

Requirements:
* reddit account (preferably with over 1 link karma on it)
* private subreddit with your reddit account as a moderator (make sure to set the spam filter strength of self posts and comments to "low")
* praw 2.1.21
* Python 2.7
* pycrypto 2.6.1
* wxPython 3.0+
## Requirements:
* A Reddit account (preferably with over 1 link karma on it)
* A private subreddit with your reddit account as a moderator (make sure to set the spam filter strength of self posts and comments to "low")
* praw 7.7.0
* Python 3.5+ (and Pip3)
* pycryptodome 3.17
* wxPython 3.0
* Pypubsub 4.3.0

### Required Files
You'll need a few things first:
1. A config file named `praw.ini` to be used with `configparser`. See an example here of what the format should look like: [example_praw.ini](/example_praw.ini)
2. Fill out `redditglobals.py` with the label you're using in the `praw.ini` file.
1. Replace `reddit storage bot` with whatever label you set in between the square brackets in your `praw.ini`

### Python installation:

#### All Operating Systems:

Download the latest version of Python from [here](https://www.python.org/downloads/). Pip is included by default.

#### Linux only

If you can't use a browser for whatever reason, run this instead:

```shell
sudo apt-get install python3 python3-pip
```

### Package installation:

```shell
pip install praw pycryptodome wxpython pypubsub
```


=============

How to Use:
## Usage:

### Start-up:
```shell
python main.py
```

### Posting files

1. RedditStorage uses an AES encryption algorithm which requires you to choose a password(e.g. "bunny").
2. Run: `python RedditStorage.py`
3. Enter your username, password, subreddit and desired encryption key
4. Choose the file you want to upload
5. When getting the file, choose the file you want to get and how/where you want to save it
1. Enter the encryption key to be used to encrypt the files. Treat this like a normal password. *If you lose this, we can't help you decrypt it*
2. Choose the file you want to upload.
3. Press `Post`.

*The window may say "Not Responding" or freeze if you choose large files. This is normal and you need to wait it out.*

Screenshots
### Downloading files

1. Enter the name of the file to get. *It takes some time for Reddit's search index to update (about every 20 minutes). You should check that you can find it using Reddit's search feature first before running this.*
2. Enter the encryption key you used to encrypt the file when posting it.
3. Click `Save File As` and select a location and name to save the file as. Alternatively, enter the save location manually.
4. Press `Get`.

*As before, the window may say "Not Responding" or you may get the beachball of death on MacOS. Again, just wait it out.*

### Screenshots


===========
Expand All @@ -37,11 +80,9 @@ Screenshots
![ss4](screenshot4.png "README.md uploaded")
![ss5](screenshot5.png "Big file made up of linked comments")


To Do
## To Do

==============

* Save username/password between sessions
* Upload as webapp
* Auto generate subreddits
* Auto generate subreddits
Loading