Lua Netzwerk Connect
Version vom 26. Februar 2023, 11:24 Uhr von Thomas.will (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „<pre> local socket = require("socket") local host = "192.168.34.1" local port = "22" local tcp = assert(socket.tcp()) tcp:connect(host, port); tcp:send("SSH-2…“)
local socket = require("socket")
local host = "192.168.34.1"
local port = "22"
local tcp = assert(socket.tcp())
tcp:connect(host, port);
tcp:send("SSH-2.0-OpenSSH\n");
while true do
local s, status, partial = tcp:receive()
print(s or partial)
if status == "closed" then
break
end
end
tcp:close()