rossem / redditstorage Goto Github PK
View Code? Open in Web Editor NEWStore files onto reddit subreddits.
Store files onto reddit subreddits.
Reddit wasn't meant for this, It's against their TOS I am sure.
In requirements, you say crypt.py is required, but actually it's pycrypto
. Should change that to avoid confusion.
Also you should do a pip freeze > requirements.txt
and put it in the folder.
Line 13 in 785289b
This is bad because:
You should use instead:
Random.new
for the IVLine 28 in 785289b
This is bad because:
You should use instead:
import os
iv = os.urandom(AES.block_size)
This uses the OS's CSPRNG (/dev/urandom on Linux, CryptGenRandom() on Windows)
This is bad because:
You should use instead:
Summary:
It looks like the crypto code is copied from various places. This is fine if you have enough crypto-know-how to separate the wheat from the chaff, but in cases where people don't, they make bad choices like the above.
You can fix all of these in a really simple manner:
Use pynacl: https://pynacl.readthedocs.io/en/stable/
Remember: even if you don't maintain it anymore, crypto code that is broken that other people can use means that other people will assume it's fine to use, meaning more projects have insecure python cryptography.
I installed wxPython
from the software repositories, and I checked the version it was 2.8. Then when I started it gave me the following error message
:0: UserWarning: The keyword `bot` in your user_agent may be problematic.
Traceback (most recent call last):
File "RedditStorage.py", line 477, in <module>
MainWindow(None, title='subreddit')
File "RedditStorage.py", line 398, in __init__
notebook = MainNotebook(panel)
File "RedditStorage.py", line 365, in __init__
self.InitUI()
File "RedditStorage.py", line 371, in InitUI
tabTwo = GetPanel(self)
File "RedditStorage.py", line 225, in __init__
pub.subscribe(self.fileListener, "fileListener")
AttributeError: 'module' object has no attribute 'subscribe'
I tried importing pub
from the python interpreter as
from wx.lib.pubsub import pub
and it did import, but there was indeed no subscribe
module, it gave me an AttributeError
.
I looked through the documentation and found this page: pubsub
By following the instructions there, I could easily change the code and make everything work. The change is just two lines of code as follows,
from wx.lib.pubsub import Publisher
pub = Publisher()
This change should work.
Also, why am I having this problem? Is my version too old? Do I need to upgrade 3.0
?
I can submit a pull request if this is a real issue and not just a problem with my machine.
What about adding a command line interface? Most of the functionality is already done, so making a cli app from this should be easy.
Steps to reproduce:
Expected behavior
Image in mirror is of a person and not of a monster.
Actual behavior
Image in mirror is a monster, albeit a cool and clever one.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.