-
-
Save gonzalo/8c42aecb771369c569bfae61119bdb63 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cryptomachine = Fernet(key) | |
with open(inputfile, 'r') as file: | |
while True: | |
token = file.read(blocksize) | |
if not token: break | |
encToken = cryptomachine.encrypt(token) | |
if args.verbose: | |
print encToken | |
if twitter_flag: | |
try: | |
twitter_api.PostUpdate(encToken) | |
except twitter.error: | |
print "Unable to post to twitter" | |
exit(1) | |
time.sleep(interval) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment