|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
import os
|
|
|
|
|
from IPython.lib import passwd
|
|
|
|
|
# from IPython.lib import passwd
|
|
|
|
|
from hashlib import sha1
|
|
|
|
|
from jinja2 import Environment, FileSystemLoader
|
|
|
|
|
from random import shuffle
|
|
|
|
|
|
|
|
|
@ -21,7 +22,8 @@ password = "".join(passwords[:3])
|
|
|
|
|
userdata = {}
|
|
|
|
|
userdata['username'] = username
|
|
|
|
|
userdata['password'] = password
|
|
|
|
|
userdata['password_sha1'] = passwd(password)
|
|
|
|
|
# userdata['password_sha1'] = passwd(password)
|
|
|
|
|
userdata['password_sha1'] = sha1(password.encode("utf-8"))
|
|
|
|
|
userdata['port'] = port
|
|
|
|
|
userdata['servername'] = servername
|
|
|
|
|
|
|
|
|
|