1
0
mirror of https://github.com/kepler155c/opus synced 2024-12-28 17:40:26 +00:00
opus/sys/apps/password.lua

11 lines
259 B
Lua
Raw Normal View History

2017-05-05 11:34:20 +00:00
require = requireInjector(getfenv(1))
local SHA1 = require('sha1')
2017-05-10 10:11:25 +00:00
local Terminal = require('terminal')
2017-05-05 11:34:20 +00:00
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
2017-05-14 01:05:05 +00:00
os.updatePassword(SHA1.sha1(password))
2017-05-10 10:11:25 +00:00
print('Password updated')
end