2017-05-05 11:34:20 +00:00
|
|
|
require = requireInjector(getfenv(1))
|
|
|
|
local Config = require('config')
|
|
|
|
local SHA1 = require('sha1')
|
2017-05-10 10:11:25 +00:00
|
|
|
local Terminal = require('terminal')
|
2017-05-05 11:34:20 +00:00
|
|
|
|
|
|
|
local config = {
|
|
|
|
enable = false,
|
|
|
|
pocketId = 10,
|
|
|
|
distance = 8,
|
|
|
|
}
|
|
|
|
|
|
|
|
Config.load('os', config)
|
|
|
|
|
2017-05-10 10:11:25 +00:00
|
|
|
local password = Terminal.readPassword('Enter new password: ')
|
2017-05-05 11:34:20 +00:00
|
|
|
|
2017-05-10 10:11:25 +00:00
|
|
|
if password then
|
|
|
|
config.password = SHA1.sha1(password)
|
|
|
|
Config.update('os', config)
|
|
|
|
print('Password updated')
|
|
|
|
end
|