1
0
mirror of https://github.com/kepler155c/opus synced 2025-10-24 20:27:39 +00:00

require improvements, remove global Util

This commit is contained in:
kepler155c@gmail.com
2017-09-05 02:09:31 -04:00
parent 2b1d96ab37
commit ae7508e89b
82 changed files with 506 additions and 455 deletions

View File

@@ -1,8 +1,10 @@
require = requireInjector(getfenv(1))
local Socket = require('socket')
local SHA1 = require('sha1')
requireInjector(getfenv(1))
local Crypto = require('crypto')
local Security = require('security')
local SHA1 = require('sha1')
local Socket = require('socket')
local Terminal = require('terminal')
local Crypto = require('crypto')
local remoteId
local args = { ... }
@@ -31,7 +33,7 @@ if not socket then
error('Unable to connect to ' .. remoteId .. ' on port 19')
end
local publicKey = os.getPublicKey()
local publicKey = Security.getPublicKey()
local password = SHA1.sha1(password)
socket:write(Crypto.encrypt({ pk = publicKey, dh = os.getComputerID() }, password))