This is a read-only snapshot of the ComputerCraft forums,
taken in April 2020.
Live Antivirus? Antivirus And Shell Running At The Same Time?
Started by Diamond, 11 October 2013 - 03:47 AMPosted 11 October 2013 - 05:47 AM
How would you make 2 programs run at a time? Like an antivirus and the SHELL.
Posted 11 October 2013 - 06:05 AM
There are two I do running stuff at same time as shell
Basic: Simply run both antivirus and shell at same time using parallel API
Advanced: Use one of Top Level Coroutine Overwrites that people posted on forums and then run both shell and antivirus with parallel API.
In Basic case you just run shell and antivirus inside of parent shell.
In Advanced you basically run them on top level - without parent shell.
Basic: Simply run both antivirus and shell at same time using parallel API
Advanced: Use one of Top Level Coroutine Overwrites that people posted on forums and then run both shell and antivirus with parallel API.
In Basic case you just run shell and antivirus inside of parent shell.
In Advanced you basically run them on top level - without parent shell.
Posted 15 October 2013 - 07:03 AM
How would I do the basic case?There are two I do running stuff at same time as shell
Basic: Simply run both antivirus and shell at same time using parallel API
Advanced: Use one of Top Level Coroutine Overwrites that people posted on forums and then run both shell and antivirus with parallel API.
In Basic case you just run shell and antivirus inside of parent shell.
In Advanced you basically run them on top level - without parent shell.
Posted 15 October 2013 - 09:30 AM
It may be worth first describing what it is you actually want to achieve here. What do you mean by "antivirus"? What sort of "viruses" are you expecting, and what do you intend to do to "protect" against them?
Posted 16 October 2013 - 01:59 AM
This code runs a shell:
This code runs an antivirus:
This code runs two code blocks "at the same time". If one finishes, then it stops the other as well.
shell.run("shell")
This code runs an antivirus:
shell.run("antivirus")
This code runs two code blocks "at the same time". If one finishes, then it stops the other as well.
parallel.waitForAny(function()
CODE BLOCK 1 HERE
end, function()
CODE BLOCK 2 HERE
end)
Posted 16 October 2013 - 06:15 AM
How would I even make an antivirus with a GUI and custom defenetions? I'd better study Shinji Malscan….
Posted 16 October 2013 - 02:30 PM
parallel.waitForAny(function()
shell.run("/rom/programs/shell")
end, function()
shell.run("/av")
end)
Posted 17 October 2013 - 01:11 AM
Here are the basic steps:How would I even make an antivirus with a GUI and custom defenetions? I'd better study Shinji Malscan….
- Find a virus that you want to defend against.
- Make a program to detect if the virus is on the computer.
- Make a program to undo the effects of the virus in some way (such as by deleting it).
Posted 17 October 2013 - 01:39 AM
Topic locked since OP is a banned member.