mirror of
https://github.com/kepler155c/opus
synced 2025-11-14 06:17:13 +00:00
The big Anavrins security update (round 1)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
local Crypto = require('crypto')
|
||||
local Crypto = require('crypto.chacha20')
|
||||
local Security = require('security')
|
||||
local SHA1 = require('sha1')
|
||||
local SHA2 = require('crypto.sha2')
|
||||
local Socket = require('socket')
|
||||
local Terminal = require('terminal')
|
||||
|
||||
@@ -35,7 +35,7 @@ end
|
||||
|
||||
local publicKey = Security.getPublicKey()
|
||||
|
||||
socket:write(Crypto.encrypt({ pk = publicKey, dh = os.getComputerID() }, SHA1.sha1(password)))
|
||||
socket:write(Crypto.encrypt({ pk = publicKey, dh = os.getComputerID() }, SHA2.digest(password):toHex()))
|
||||
|
||||
local data = socket:read(2)
|
||||
socket:close()
|
||||
|
||||
Reference in New Issue
Block a user