This commit is contained in:
kepler155c@gmail.com
2017-10-08 17:45:01 -04:00
parent 98ec840db1
commit a625b52bad
46 changed files with 334 additions and 319 deletions

View File

@@ -1,4 +1,4 @@
requireInjector(getfenv(1))
_G.requireInjector()
local Crypto = require('crypto')
local Security = require('security')
@@ -6,6 +6,8 @@ local SHA1 = require('sha1')
local Socket = require('socket')
local Terminal = require('terminal')
local os = _G.os
local remoteId
local args = { ... }
@@ -13,7 +15,7 @@ if #args == 1 then
remoteId = tonumber(args[1])
else
print('Enter host ID')
remoteId = tonumber(read())
remoteId = tonumber(_G.read())
end
if not remoteId then
@@ -34,9 +36,8 @@ if not socket then
end
local publicKey = Security.getPublicKey()
local password = SHA1.sha1(password)
socket:write(Crypto.encrypt({ pk = publicKey, dh = os.getComputerID() }, password))
socket:write(Crypto.encrypt({ pk = publicKey, dh = os.getComputerID() }, SHA1.sha1(password)))
local data = socket:read(2)
socket:close()