Commit 46abfec9 authored by putro's avatar putro

fixed an error in writeMessage, added option to save passphrase in config.ini

parent 6e3833e2
v0.1, 02-Apr-2014 -- Initial release.
v0.2, 20-Apr-2014 -- First beta release
......@@ -6,7 +6,7 @@ homepage of the project: http://www.mixnym.net/
zax type nyms delivers messages to alt.anonymous.messages instead of using reply-block as ghio nymservers.
This script help you in:
create/update a nym (included gpg key creation)
create/update a nym (including gpg key creation)
send a message through your nym
delete a nym
create/delete gpg secret keys
......@@ -15,10 +15,15 @@ create/delete gpg secret keys
USAGE:
copy config.ini.sample to config.ini
change mixmaster, nymservers and stats section if needed
do not edit the nym section, unless you know what you are doing.
launch the script ./autonym.py and follow the onscreen instruction
remember to keep your stats & keys in your local mixmaster updated
SECURITY NOTE:
you can save the nym secret key passphrase in config file (through menu option),
so you don't have to type it every time (obviously this is not a good thing,
AT LEAST keep config.ini on an encrypted partition).
......
......@@ -54,6 +54,7 @@ def menu():
5 to delete a nym\n\
6 to create a new secret key\n\
7 to delete a secret key\n\
8 to save nym secret passphrase in config file (NOT SECURE)\n\
q to quit\n\n\n")
# perform actions based on selection above
......@@ -89,7 +90,7 @@ def menu():
config['last_message'] = msg
menu()
elif selection == "8":
modifyConfig()
savePassword()
menu()
elif selection == "q":
sys.exit("bye bye")
......@@ -170,6 +171,14 @@ def updateNym(delete=False):
sendMixMsg(dest, emsg)
def savePassword():
askNym()
pwd = askPassphrase()
configSection(anym.name, passphrase=pwd)
writeConfig()
config['last_message'] = "Password for %s saved in config.ini file (not secure, use just for testing)"
def prepareSetupMsg(keyid, subj_type, subject):
key = gpgfuncts.exportPubKey(keyid)
msg = "\n%s: %s\n\n" % (subj_type, subject) + key
......@@ -257,7 +266,7 @@ def writeMessage():
msg = msg + text
dest = 'send@' + anym.domain
signCryptMsg(msg, dest, sign=anym.fp, passphrase=pwd)
emsg = signCryptMsg(msg, dest, sign=anym.fp, passphrase=pwd)
sendMixMsg(dest, emsg)
......
......@@ -31,7 +31,7 @@ def checkSection(section, config=config):
def listSection(config):
return config.keys()
def configSection(nym, subject, subj_type, passphrase=""):
def configSection(nym, subject="", subj_type="", passphrase=""):
config['nym'][nym] = {}
config['nym'][nym]['subject'] = subject
config['nym'][nym]['subj_type'] = subj_type
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment