Hi guys. Have to be on mobile again. Stupid internet company. Any way I am make a side program for cunix and it sends keystrokes across rednet but I can't get it to work. What I have coded is two functions, one to run shell and the other to detect and send the keys. I used parallel API to run them at the same time. Could you maybe give me a snippet of this. Thanks. Btw cunix has maybe a few more weeks of dev. I have finished the wireless network and security of it.
Keystrokes and Shell
Started by Left, Mar 25 2013 04:41 PM
2 replies to this topic
#1
Posted 25 March 2013 - 04:41 PM
#2
Posted 25 March 2013 - 04:45 PM
function runCunix()
-- do your stuff here
end
function runKeylogger()
local keysPressed = {}
while true do
local e, k = os.pullEventRaw('key')
table.insert(keysPressed, k)
if #keysPressed > 10 then
local stringToSend = textutils.serialize( keysPressed )
-- send it here via what ever method you choose
keysPressed = {}
end
end
end
parallel.waitForAll( runCunix, runKeylogger )
now you might ask why I'm using a table and only sending after 10 key presses... the answer is simple, to reduce message spamming from causing lag on the client and server.
#3
Posted 25 March 2013 - 04:59 PM
Thanks. I am making this because my os will be a backtrack like os
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











