VB School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become a VB Expert!

Join 300,406 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,625 people online right now. Registration is fast and FREE... Join Now!




virus scan code for VB

 

virus scan code for VB

pritesh22

22 Nov, 2007 - 05:38 AM
Post #1

New D.I.C Head
*

Joined: 22 Nov, 2007
Posts: 1



Thanked: 2 times
My Contributions
well, i have a project which is to make a backup system and a virus scan programme using VB studio, I've created a back up system using some codes but I doubt I can make a virus scan code since it would require the programme to firstly check which virus's are what and who knows what else :X


so im wondering is it still possible to create a virus scan programme using VB? note that this doesnt have to be very good, a simple scan about afew virus's should be enough, and is there any codes for it o.o


thank you

User is offlineProfile CardPM
+Quote Post


NickDMax

RE: Virus Scan Code For VB

22 Nov, 2007 - 01:42 PM
Post #2

Can grep dead trees!
Group Icon

Joined: 18 Feb, 2007
Posts: 5,216



Thanked: 285 times
Dream Kudos: 1175
Expert In: Java/C++

My Contributions
you can write a virus scanner in any language that can open a file in binary... the trick is in creating "virus definitions" (some way of telling when a virus has a affected a file).

What many programs do is pass the actual scanning off to another program.
User is offlineProfile CardPM
+Quote Post

dacodebomb

RE: Virus Scan Code For VB

27 Jun, 2009 - 04:22 AM
Post #3

New D.I.C Head
*

Joined: 27 Jun, 2009
Posts: 1

QUOTE(pritesh22 @ 22 Nov, 2007 - 05:38 AM) *

well, i have a project which is to make a backup system and a virus scan programme using VB studio, I've created a back up system using some codes but I doubt I can make a virus scan code since it would require the programme to firstly check which virus's are what and who knows what else :X


so im wondering is it still possible to create a virus scan programme using VB? note that this doesnt have to be very good, a simple scan about afew virus's should be enough, and is there any codes for it o.o


thank you




Well, I myself actually wrote a virus scan...this is the basic idea of coding the virus definitions:

CODE

dim ex as boolean
ex = my.computer.filesystem.fileexists("c:/viruslocation.exe")
if (ex = true) then
my.computer.audio.playsystemsound(mediasounds.asterisk)
messagebox.show("a virus was found")
else
end if


Optional, but risky:
after messagebox....
my.computer.filesystem.deletefile("C:/viruslocation.exe")
thank you,
me




User is offlineProfile CardPM
+Quote Post

Tomsworld

RE: Virus Scan Code For VB

28 Jun, 2009 - 11:58 AM
Post #4

New D.I.C Head
*

Joined: 28 Jun, 2009
Posts: 1

QUOTE(dacodebomb @ 27 Jun, 2009 - 04:22 AM) *

QUOTE(pritesh22 @ 22 Nov, 2007 - 05:38 AM) *

well, i have a project which is to make a backup system and a virus scan programme using VB studio, I've created a back up system using some codes but I doubt I can make a virus scan code since it would require the programme to firstly check which virus's are what and who knows what else :X


so im wondering is it still possible to create a virus scan programme using VB? note that this doesnt have to be very good, a simple scan about afew virus's should be enough, and is there any codes for it o.o


thank you




Well, I myself actually wrote a virus scan...this is the basic idea of coding the virus definitions:

CODE

dim ex as boolean
ex = my.computer.filesystem.fileexists("c:/viruslocation.exe")
if (ex = true) then
my.computer.audio.playsystemsound(mediasounds.asterisk)
messagebox.show("a virus was found")
else
end if


Optional, but risky:
after messagebox....
my.computer.filesystem.deletefile("C:/viruslocation.exe")
thank you,
me



User is offlineProfile CardPM
+Quote Post

NoBrain

RE: Virus Scan Code For VB

28 Jun, 2009 - 11:58 PM
Post #5

D.I.C Lover
Group Icon

Joined: 25 Mar, 2009
Posts: 1,152



Thanked: 33 times
Dream Kudos: 125
My Contributions
now i dont understand nothing biggrin.gif and my.computer.... isnt that a vb.net code
User is offlineProfile CardPM
+Quote Post

Fib

RE: Virus Scan Code For VB

29 Jun, 2009 - 06:02 AM
Post #6

D.I.C Head
**

Joined: 12 Mar, 2009
Posts: 71



Thanked: 6 times
My Contributions
QUOTE


Well, I myself actually wrote a virus scan...this is the basic idea of coding the virus definitions:

CODE

dim ex as boolean
ex = my.computer.filesystem.fileexists("c:/viruslocation.exe")
if (ex = true) then
my.computer.audio.playsystemsound(mediasounds.asterisk)
messagebox.show("a virus was found")
else
end if


Optional, but risky:
after messagebox....
my.computer.filesystem.deletefile("C:/viruslocation.exe")
thank you,
me



I'm not sure how this qualifies as a "virus definition." Your code checks if a file exists, then if it does exist you tell the user it's a virus. You need some way of checking if the file is malicious in some way.

I have no idea how to find a malicious file, but I'm just saying...
User is offlineProfile CardPM
+Quote Post

Nikhil_07n

RE: Virus Scan Code For VB

30 Jun, 2009 - 02:41 AM
Post #7

Idiot of the year.
Group Icon

Joined: 9 Jan, 2009
Posts: 2,075



Thanked: 15 times
Dream Kudos: 1200
My Contributions
You are right, fib... his code is just a "Search-And-Destroy" code.
User is online!Profile CardPM
+Quote Post

NoBrain

RE: Virus Scan Code For VB

30 Jun, 2009 - 04:06 AM
Post #8

D.I.C Lover
Group Icon

Joined: 25 Mar, 2009
Posts: 1,152



Thanked: 33 times
Dream Kudos: 125
My Contributions
and how to find if file is "malicious" ? some one ? any one ? dont you have to know original code to do that ?
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/7/09 10:48PM

Live VB Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month