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

Nox Anti-Virus (virus scanner)

Started by Noxbuds, 05 April 2014 - 08:47 PM
Noxbuds #1
Posted 05 April 2014 - 10:47 PM
This is just a little (181 lines) program I made.
It scans a given file for anything that could damage your files.

Get it:

pastebin get 0GhK4hzp noxav

Scan a file:

noxav <-scan/-scan-delete> <filename>

(no < or >, just use the selected text)

Features:
SpoilerArguments:

-scan ::: just scan
-scan-delete ::: scan and delete if harmful

Screenshots:
Spoiler
Edited by
awsmazinggenius #2
Posted 06 April 2014 - 05:25 AM
I haven't looked at the code, but is this a real virus defence system, or is this the same tired "It's automatically a virus if it wants to delete a file, but do shell.run("pastebin run <code to file that wipes computer>") and it isn't a virus." "scanners"?
gamax92 #3
Posted 06 April 2014 - 05:48 AM
So, the way this works is any file with the word delete in it is flagged as malicious?
fs["de" .. "lete"]("noxav")
Noxbuds #4
Posted 06 April 2014 - 09:55 AM
I haven't looked at the code, but is this a real virus defence system, or is this the same tired "It's automatically a virus if it wants to delete a file, but do shell.run("pastebin run <code to file that wipes computer>") and it isn't a virus." "scanners"?

So, the way this works is any file with the word delete in it is flagged as malicious?
fs["de" .. "lete"]("noxav")

It just scans to see if it COULD damage your files. Not meant to be much fancy stuff - just wanted to do this for like, a year but haven't been able to.
So yes, it flags it malicious if it uses a delete function.

So, the way this works is any file with the word delete in it is flagged as malicious?
fs["de" .. "lete"]("noxav")
I haven't looked at the code, but is this a real virus defence system, or is this the same tired "It's automatically a virus if it wants to delete a file, but do shell.run("pastebin run <code to file that wipes computer>") and it isn't a virus." "scanners"?

well, yes, it does just check for 'fs.delete', but I DID say it was BASIC :P/>
TheOddByte #5
Posted 06 April 2014 - 07:24 PM
Have the op removed the pastebin link? Thought I'd look through the code and see if it is as the people above me says.
To be fair there can't be a really effective anti-virus since there isn't any potentionally dangerous viruses in ComputerCraft that can't be fixed with just putting in a floppy disk in a disk-drive.
Most viruses created in ComputerCraft by people is mostly those that prevent termination and start a loop that print for example "Lol" all the time, That isn't really a virus or a hack!
Now I would suggest to make this more useful, that you use the fs API to protect files from being modified by unknown files or something like that.
If your antivirus is basically scanning files for fs.delete then most files will show up as a virus, And it can also easily hide itself from your "Antivirus System" as showed by gamax92 above
MKlegoman357 #6
Posted 06 April 2014 - 07:35 PM
And to add to what Hellkid98 said, there are literally million ways of calling a single function so no string.find would help. What would be useful is, what Hellkid98 also mentioned, sandboxing certain functions to prevent malicious code from messing with files or constantly rebooting and shutting down the PC.
Lyqyd #7
Posted 06 April 2014 - 10:00 PM
No code, locked.

Report your topic when you have code to show.
Cranium #8
Posted 07 April 2014 - 04:18 PM
As Lyqyd said earlier, at the time of his post, your code did not exist. The pastebin link you earlier provided went nowhere.
I've unlocked the topic, and edited your OP to include the link you provided.
Noxbuds #9
Posted 08 April 2014 - 07:18 AM
As Lyqyd said earlier, at the time of his post, your code did not exist. The pastebin link you earlier provided went nowhere.
I've unlocked the topic, and edited your OP to include the link you provided.

Oh right - yes
I accidentally created it as a guest and reported the one I made of a guest.
The one I posted was that one (no idea how that got to my clipboard)
Noxbuds #10
Posted 11 April 2014 - 12:29 PM
Lyqyd, please lock this - I am discontinuing this.
theoriginalbit #11
Posted 11 April 2014 - 12:36 PM
Lyqyd, please lock this - I am discontinuing this.
For future reference you can use the 'report' button to request thread locks; do note however that generally these will not be done on threads in Ask a Pro.
Lyqyd #12
Posted 11 April 2014 - 02:42 PM
Locked by request.