1
0
mirror of https://github.com/kepler155c/opus synced 2025-02-07 12:40:01 +00:00
opus/sys/apps/password.lua

13 lines
292 B
Lua
Raw Normal View History

2018-01-24 17:39:38 -05:00
_G.requireInjector(_ENV)
local Security = require('security')
local SHA1 = require('sha1')
2017-05-10 06:11:25 -04:00
local Terminal = require('terminal')
2017-05-05 07:34:20 -04:00
2017-05-10 06:11:25 -04:00
local password = Terminal.readPassword('Enter new password: ')
2017-05-05 07:34:20 -04:00
2017-05-10 06:11:25 -04:00
if password then
2018-01-24 17:39:38 -05:00
Security.updatePassword(SHA1.sha1(password))
print('Password updated')
2017-05-10 06:11:25 -04:00
end