some fancy remote shell related stuff. it works in the background now. currently breaks all stable builds.
This commit is contained in:
parent
5814140245
commit
4552888f8b
1
modules/applications/autoluash.lua
Normal file
1
modules/applications/autoluash.lua
Normal file
@ -0,0 +1 @@
|
||||
luash()
|
@ -1,7 +1,9 @@
|
||||
function luash(si)
|
||||
s("lua shell",function()
|
||||
print(_VERSION)
|
||||
while true do
|
||||
write("> ")
|
||||
print(pcall(load(readln())))
|
||||
end
|
||||
end)
|
||||
end,si)
|
||||
end
|
||||
|
@ -5,13 +5,12 @@ function nshc(evPP,nid)
|
||||
local V,msg=false,tostring(ev[4])
|
||||
if ev[3] == evPP and ev[2] == nid then
|
||||
if msg:sub(1,3) == "dis" then
|
||||
h("display",msg:sub(4))
|
||||
write(msg:sub(4))
|
||||
end
|
||||
end
|
||||
elseif ev[1] == "key_down" then
|
||||
elseif ev[1] == "key" and ev[2] == tT[cT][3].sI then
|
||||
ns(nid,evPP,"key"..tostring(ev[3]))
|
||||
end
|
||||
C.yield()
|
||||
end
|
||||
end
|
||||
|
@ -1,20 +1,21 @@
|
||||
evPP,tEPs="nsh",{}
|
||||
s("netsh daemon",function()
|
||||
function nshd(evPP,tEPs,sI)
|
||||
s("netsh daemon",function() print(pcall(function()
|
||||
while true do
|
||||
if ev[1] == "net_msg" then
|
||||
local V,msg=false,tostring(ev[4])
|
||||
for k,v in ipairs(tEPs) do if ev[2] == v then V=true end end
|
||||
if ev[3] == evPP and V then
|
||||
if msg:sub(1,3) == "key" then
|
||||
h("key_down",ev[2],tonumber(msg:sub(4)),0)
|
||||
h("key",tT[cT][3].sI,tonumber(msg:sub(4)),0)
|
||||
end
|
||||
end
|
||||
elseif ev[1] == "display" then
|
||||
elseif ev[1] == "display" and ev[3] == tT[cT][3].sI then
|
||||
for k,v in ipairs(tEPs) do
|
||||
ns(v,evPP,"dis"..tostring(ev[2]))
|
||||
end
|
||||
end
|
||||
C.yield()
|
||||
end
|
||||
end)
|
||||
|
||||
end)) end,{["sI"]=sI})
|
||||
luash({["sI"]=sI})
|
||||
end
|
Loading…
Reference in New Issue
Block a user