This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Terra1's profile picture

need 2 programs

Started by Terra1, 29 March 2015 - 12:06 AM
Terra1 #1
Posted 29 March 2015 - 02:06 AM
i need 2 programs
1 to allow you to remotely execute shell commands
and the other to listen for download without taking control away from the shell
i am using these 2 in a computercraft hacking arena in the lualand server
not malicous in any way
just something to have fun and win prizes in the arena
Geforce Fan #2
Posted 29 March 2015 - 02:55 AM
If you want to access your shell remotely, Lyqyd's nsh is probably what you want.

Not sure what you mean by "listen for download without taking control away from the shell".
GreenGene #3
Posted 31 March 2015 - 04:59 PM
Ok ter, I know what u mean. U could run the code in a coroutine and receive the file in there then install it.
HPWebcamAble #4
Posted 01 April 2015 - 11:54 PM
U could run the code in a coroutine

Basically this:

function waitForProgram()
  --# Listen on some wireless channel for a computer sending the porgram
end

function runShell()
  shell.run("shell") --# Runs the 'shell' program
end

parallel.waitForAny(runShell,waitForProgram) --# Runs both at the same time