added functionality to save address and private key pair to disk

I know I'd forget that information under my own volition, so why not save it to disk? I opted for 'data/mysites.txt' as an easy place to remember, and alerted the user that such an action was taking place.
This commit is contained in:
Joshua Sandlin 2015-01-13 20:43:51 -05:00
parent 3f974e0bc7
commit 239f8b2db0
2 changed files with 5 additions and 0 deletions

View File

@ -78,6 +78,11 @@ def siteCreate():
os.mkdir("data/%s" % address)
open("data/%s/index.html" % address, "w").write("Hello %s!" % address)
#start:dydx
logging.info("Saving address and private ket to data/mysite.txt...")
open("data/mysite.txt", a+).write("address: %s, private key: %s" % (address, privatekey))
#end:dydx
logging.info("Creating content.json...")
site = Site(address)
site.signContent(privatekey)

0
zeronet.py Normal file → Executable file
View File