This is a read-only snapshot of the ComputerCraft forums,
taken in April 2020.
Help With Virus?[General]
Started by unstopablekk, 26 February 2012 - 08:52 PMPosted 26 February 2012 - 09:52 PM
Im trying to make a virus for my friend to use and I want it to spam his computer with text everytime he turns the computer on but without the disk in it. can anyone help?
Posted 27 February 2012 - 03:21 AM
i'd honestly rather send a turtle with TNT to blow it up, haha
Posted 27 February 2012 - 10:51 AM
+1 on that.i'd honestly rather send a turtle with TNT to blow it up, haha
get the floppy your spreading the file via. Name the file "virus" for now. create a new file on the floppy called startup containing just this code:
fs.copy("disk/virus","startup")
Insert the floppy into the computers disk drive and reboot the computer. It will run the version of startup on the floppy. Startup on the floppy simply copies the floppies virus into the startup file of his terminal. Reboot is terminal and sit around for the lols. Do what you want in the virus program.
My personal favourite though is the TNT trap. Simply hide a block of tnt under his computer. Create a startup program that changes the alias shutdown to direct to a new program. The new program activates the TNT under the computer. Sit around and wait for the fireworks ;)/>/>
fs.copy("disk/virus","startup")
Posted 27 February 2012 - 10:57 AM
Create a file called startup and put it in the root directory of the target computer. It will run every time the computer starts.
To prevent the user from terminating the program with Ctrl-T, overwrite the os.pullEvent() function.
Edit: Bah, you beat me to it. ;)/>/>
To prevent the user from terminating the program with Ctrl-T, overwrite the os.pullEvent() function.
function os.pullEvent()
return os.pullEventRaw()
end
while true do
print("Problem?")
os.sleep(1)
end
To get rid of a startup virus like this, create a floppy disk with an empty startup file in it, put a disk drive next to the infected computer, put the floppy disk in the disk drive and restart the computer with Ctrl-R. The computer will use the startup file on the floppy disk instead of running the one on itself.Edit: Bah, you beat me to it. ;)/>/>
Posted 27 February 2012 - 11:05 AM
That part I did not know. Learn something new every day :P/>/>function os.pullEvent() return os.pullEventRaw() end
Edit: Bah, you beat me to it. ;)/>/>
Posted 28 February 2012 - 01:20 AM
I would do the tnt but i dont feel like putting the backup on the server all over again. and I want to charge him iron to fix his computer XD TroLLLL M0DE!
Posted 28 February 2012 - 02:37 AM
now is there any way to prevent the ctrl + r key? so that way i dont need to hide that disk drive. i just put the floppy in hit ctrl +r (to reset the computer) and then the virus prevents the ctrl+r key from being used so the script keeps going.
Posted 28 February 2012 - 02:42 AM
There is no way to prevent the ctrl + r key from being used. However you could delete the startup file of any disk that gets inserted <_</>/>
That however will not prevent the person from ctrl + s which will shutdown the computer, then they place the floppy with the startup and then proceed to start the computer.
If you want to bypass ALL of that, the only solution is to place a blank startup file in a disk-drive on TOP of the computer. Then you just have to find a way to protect that drive from being accessed :)/>/>
That however will not prevent the person from ctrl + s which will shutdown the computer, then they place the floppy with the startup and then proceed to start the computer.
If you want to bypass ALL of that, the only solution is to place a blank startup file in a disk-drive on TOP of the computer. Then you just have to find a way to protect that drive from being accessed :)/>/>
Posted 28 February 2012 - 03:00 AM
so put bedrock? lol (too bad we are all in creative in the server <_</>/>)
he still doesnt know about the ctrl+r or ctrl+s or ctrl+t which is good. I just wanted to know just in case. (he'll prob just break the computer and put it back lol)
he still doesnt know about the ctrl+r or ctrl+s or ctrl+t which is good. I just wanted to know just in case. (he'll prob just break the computer and put it back lol)
Posted 28 February 2012 - 03:30 AM
Well, for a virus, you could try this one:
If you put this in the startup, the only way out is to replace the computer. Yes, it really waits that long (I set the sleep time to a googol seconds)!
print "Now waiting 316,880,878,140,289,502,370,268.96 years"
while true do
os.pullEventRaw()
end
sleep(10e100)
os.reboot()
If you put this in the startup, the only way out is to replace the computer. Yes, it really waits that long (I set the sleep time to a googol seconds)!
Posted 28 February 2012 - 03:34 AM
actually your program never even reaches that sleep
Posted 28 February 2012 - 03:35 AM
Well, for a virus, you could try this one:print "Now waiting 316,880,878,140,289,502,370,268.96 years" while true do os.pullEventRaw() end sleep(10e100) os.reboot()
If you put this in the startup, the only way out is to replace the computer. Yes, it really waits that long (I set the sleep time to a googol seconds)!
That does not brick a pc.
Posted 06 March 2012 - 03:36 AM
put this in startup:
Non password version:
term.clear()
term.setCursorPos(1,1)
password = "1234x"
print("CraftOS 1.3")
function trolol()
write("> ")
aba = read()
if aba == password then
print("Access Granted.")
print("Computer unlocked.")
else
print("No such program")
trolol()
end
end
trolol()
Every time they try to do something, it returns no such program. If they enter the password it will stop this (but will continue if they turn off computer)Non password version:
term.clear()
term.setCursorPos(1,1)
print("CraftOS 1.3")
function trolol()
write("> ")
aba = read()
print("No such program")
trolol()
end
end
trolol()
Posted 13 March 2012 - 06:49 AM
that a good one ComputerCraftFan11 lol