diff --git a/README b/README index 8f116dac4eeabf1ab5ad3fdff1a42769d32f5df9..eb49e74724c9ec6c0494114803fe4f8579bb2ff6 100644 --- a/README +++ b/README @@ -48,6 +48,8 @@ menu option available: 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). +there's also a --test command line argument to send a msg from a nym to a recipient (defined in config.ini) +which could be used in a cron to regularly test if a nym is working. * remember to keep your stats & keys in your local mixmaster updated diff --git a/autonym.py b/autonym.py index b2ae097e37c30a04bbab250fc8330b3de82bd457..78c4ad22a64e57bf740b81fe3299136067762658 100755 --- a/autonym.py +++ b/autonym.py @@ -399,9 +399,14 @@ def main(): try: if opts.test: - setActiveNym("1234@nymphet.paranoici.org") - parse_stats() - writeMessage(subject="prova nymphet", recipient="putro@autistici.org", text="asdadsfj", test=1) + if config['options']['testnym'] == "": + print bcolors.RED + "\nTestnym not configured in config.ini, exiting..." + bcolors.ENDC + sys.exit() + else: + setActiveNym(config['options']['testnym']) + parse_stats() + writeMessage(subject="prova nymphet", recipient=config['options']['testnym_recipient'], text="asdadsfj", test=1) + print bcolors.GREEN + "\nTest message sent from nym %s to %s" % (config['options']['testnym'], config['options']['testnym_recipient']) else: parse_stats() menu() diff --git a/config.ini.sample b/config.ini.sample index f0e6ae0923ae88cc4ed837eea51a0b4422b8536d..3461072472be8f1b5dbe603caec043339ba71638 100644 --- a/config.ini.sample +++ b/config.ini.sample @@ -6,6 +6,9 @@ nymservers = nymphet.paranoici.org, is-not-my.name, nymserv.breaka.net subj_types = symmetric, hsub, subject +testnym = "" +testnym_recipient = "" + [stats] # set parameters fow remailer stats, change with your favourite pinger stats_url = http://remailer.paranoici.org/stats/