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

Spark Anti Virus! (Most Advanced!)

Started by xcrafter_40, 28 August 2016 - 01:18 AM
xcrafter_40 #1
Posted 28 August 2016 - 03:18 AM
Spark Anti Virus! One of the most advanced virus remover tools!

Pastebin command: pastebin get P2Qmh0gn av
move the av file to a floppy disk and rename it startup.

Source Code
-- Spark AntiVirus +
-- 2016 No Rights Reserved
-- Plz dont copy!
-- Stop looking at the code! Make ur own program!
function rcolors ()
  term.setTextColor(1)
  term.setBackgroundColor(32768)
  term.setCursorPos(1,1)
end
function background ()
  term.setCursorPos(51,18)
  term.setBackgroundColor(8)
  term.clear()
  rcolors()
end
function writetxt (wt,wx,wy,wc,wbc)
  term.setTextColor(wc)
  term.setBackgroundColor(wbc)
  term.setCursorPos(wx,wy)
  term.write(wt)
  rcolors()
end
function writeStatus (st,sc)
  term.setCursorPos(1,19)
  term.setTextColor(sc)
  term.setBackgroundColor(8)
  term.clearLine()
  term.write(st)
  rcolors()
end
function bar (bl,bc)
  term.setCursorPos(51,bl)
  term.setBackgroundColor(bc)
  term.clearLine()
  rcolors()
end
function eshell ()
  rcolors()
  term.clear()
  term.setTextColor(2)
  term.write("Emergency shell! Use exit to go back!")
  term.setTextColor(1)
  term.setCursorPos(1,2)
  shell.run("shell")
end
--
function drawmain ()
  background()
  bar(1,1)
  writeStatus("Ok",1)
  writetxt("Shell Reboot Delete Exit",1,1,8,1)
end
drawmain()
run = true
while run do
  event, AA, AB, AC = os.pullEventRaw()
  if event == "terminate" then
	writeStatus("Bye!",1)
	sleep(0.5)
	rcolors()
	term.clear()
	run = false
  end

  if event == "mouse_click" then
	if AA == 1 and AB >= 21 and AB <= 24 and AC == 1 then
	  rcolors()
	  term.clear()
	  run = false
	end
	if AA == 1 and AB >= 0 and AB <= 5 and AC == 1 then
	  writeStatus("Emergency Shell Activated!",32)
	  eshell()
	  drawmain()
	  writeStatus("Ok",1)
	end
	if AA == 1 and AB >= 7 and AB <= 12 and AC == 1 then
	  os.reboot()
	end
	if AA == 1 and AB >= 14 and AB <= 19 and AC == 1 then
	  writeStatus("Delete File>",2)
	  term.setCursorPos(14,19)
	  term.setBackgroundColor(8)
	  term.setTextColor(32768)
	  deletefile = io.read()
	  term.clear()
	  term.setCursorPos(1,1)
	  drawmain()
	  -- DelFile
	  if fs.exists(deletefile) then
		fs.delete(deletefile)
		writeStatus("Deleted File " .. deletefile,8192)
		sleep(1)
		writeStatus("Ok",1)
	  else
		writeStatus("Could Not Find File " .. deletefile,16384)
		sleep(1)
		writeStatus("Ok",1)
	  end
	end
  end
end

How to use!

1. Grab the pastebin file and rename it startup and put it on your floppy disk!
2. When you're infected, hold down Ctrl + S, put the disk in the drive and open up your computer. This should boot into recovery.

Features:
Click on shell for emergency shell.
Click on reboot to reboot the computer.
Click on delete to delete a file of your choice.
Click on exit to exit to the shell, with all startup files disabled!

Supported virusesTons of them!
One Example https://www.youtube....h?v=uSapirxs9vU


News8/28/2016 Running a test on Foxdata's Fox AV!

-xcrafter_40
Edited on 28 August 2016 - 03:06 PM
TheRockettek #2
Posted 28 August 2016 - 06:56 AM
Not useful for computercraft visuses in 1.8+ as they most have used the settings api to disable disk. Also its not an antivirus….
Anavrins #3
Posted 28 August 2016 - 07:54 AM
Not to bash on you or anything, but as far as I can see, your "AV" ask for a file to remove, without a way to list the files on the hdd.
An empty startup file on a disk is enough to boot directly into the computer, bypassing any infections, you can then use the full extend of CraftOS to inspect and remove the virus.

I feel that over-complicated virus removal tools is a complete waste of time, and people should focus on virus prevention instead, sandboxing, stuff that inherently needs coding to do.
Edited on 28 August 2016 - 05:54 AM
xcrafter_40 #4
Posted 28 August 2016 - 04:03 PM
Not to bash on you or anything, but as far as I can see, your "AV" ask for a file to remove, without a way to list the files on the hdd.
An empty startup file on a disk is enough to boot directly into the computer, bypassing any infections, you can then use the full extend of CraftOS to inspect and remove the virus.

I feel that over-complicated virus removal tools is a complete waste of time, and people should focus on virus prevention instead, sandboxing, stuff that inherently needs coding to do.

:(/> Use the emergency shell to list files!
The emergency shell is a shell untouched from the virus!
Sidenote: AV Tools are either too simple or too complicated!

At least it's not as simple as http://www.computercraft.info/forums2/index.php?/topic/25662-fox-anti-virus-101/
Edited on 28 August 2016 - 02:29 PM
TheRockettek #5
Posted 28 August 2016 - 04:09 PM
[quote name='xcrafter_40' timestamp='1472396604' post='258563]
The emergency shell is a shell untouched from the virus!
Sidenote: AV Tools are either too simple or too complicated!
[/quote]

Your "Emergency shell" is litteraly just it running shell… which autostarts startupfiles (which could also be the virus) so ya…
KingofGamesYami #6
Posted 28 August 2016 - 04:20 PM
Ummm… viruses cannot modify rom/programs/shell. So according to your definition, every computer has an emergency shell built in.
Lyqyd #7
Posted 28 August 2016 - 04:47 PM
Moved to Programs.
xcrafter_40 #8
Posted 28 August 2016 - 04:53 PM
[quote name='xcrafter_40' timestamp='1472396604' post='258563]
The emergency shell is a shell untouched from the virus!
Sidenote: AV Tools are either too simple or too complicated!
[/quote]

Your "Emergency shell" is litteraly just it running shell… which autostarts startupfiles (which could also be the virus) so ya…
[/quote]

Tested it and… It doesn't run startup files! (I Made a custom startup file that says hi and it didn't say hi in emergency shell)
xcrafter_40 #9
Posted 28 August 2016 - 05:02 PM
Ummm… viruses cannot modify rom/programs/shell. So according to your definition, every computer has an emergency shell built in.
[quote name='xcrafter_40' timestamp='1472396604' post='258563]
The emergency shell is a shell untouched from the virus!
Sidenote: AV Tools are either too simple or too complicated!
[/quote]

Your "Emergency shell" is litteraly just it running shell… which autostarts startupfiles (which could also be the virus) so ya…
[/quote]

So that means it runs a unaffected shell!
(Programs can't modify /rom/programs/shell!)
So if you had a virus, it bypasses /rom/programs/shell. So if you relaunch it, You get a shell!
(For some reason running shell.run("shell") Avoids startup files!)

Not useful for computercraft visuses in 1.8+ as they most have used the settings api to disable disk. Also its not an antivirus….

Yeah… More of a Emergency Boot Disk…
The point is it's not automatic so it's up to you to delete the virus.
Because I don't want it just deleting the startup file! (It might be custom or uninfected!)
Edited on 28 August 2016 - 03:02 PM