Sign in to follow this  
Followers 0
mrbond007

Quick Virus Checker

14 posts in this topic

#include <File.au3>

Opt("RunErrorsFatal", 0)

If Not _FileCreate("1.exe") Then

MsgBox(4096, "Error", "error:" & @error)

Exit

EndIf

Run("1.exe")

$size = FileGetSize("1.exe")

If $size > 0 Then

FileDelete("1.exe")

MsgBox(4096, "Virus Found", "PC is infected")

Else

FileDelete("1.exe")

MsgBox(4096, "Virus Not Found", PC is clean")

EndIf

Exit

===========================================

Not much but might be usefull.

Share this post


Link to post
Share on other sites



Cool code, but I think you need to post this in the Example Scripts forum. You can do that once you reach a ten post count.


[font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Just a quick question: why does it delete the file if it is "not infected?"

EDIT: Wait, now I see, it's not part of program :)

Edited by BALA

[font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com

Share this post


Link to post
Share on other sites

So your script creates a file, gets the size of the file, and if the file size is bigger then "0" it deletes the file saying the PC is infected, or if its not bigger then "0" it deletes it saying the PC is clear.

How does this check for viruses again?

Share this post


Link to post
Share on other sites

So your script creates a file, gets the size of the file, and if the file size is bigger then "0" it deletes the file saying the PC is infected, or if its not bigger then "0" it deletes it saying the PC is clear.

How does this check for viruses again?

You don't understand ? I am sure BALA and Secure_IT can explain since they already praised it and assume they tested it....

Why in hell Symantec and others have some much difficulty maintaining their AV product is beyond me when it can be do this simple :)


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

So your script creates a file, gets the size of the file, and if the file size is bigger then "0" it deletes the file saying the PC is infected, or if its not bigger then "0" it deletes it saying the PC is clear.

How does this check for viruses again?

I think he meant: "How to delete your own virus" :)

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Ah, simple logic but very useful. Viruses attach themselves to .exes so if that file is still empty, then you know that your computers clean.

Share this post


Link to post
Share on other sites

Viruses attach themselves to .exes

Says who?

I've clean thousands of computers that have been infected with viri, but I don't recall seeing one that adds itself to every .exe that is created.

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

Well he did say it's not finished. Besides, creating a trap for a virus (malware) seems like pretty smart idea.

Edited by BALA

[font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

Well he did say it's not finished. Besides, creating a trap for a virus (malware) seems like pretty smart idea.

no ... i think installing proper AV software is a smart idea..

not something like this that even if it would work is too little too late because the virus has to be active....

Now the big question to the OP .. did you test it and did it work ?

If so, I would like to hear the details of which virus you tested with etc ...

:)

Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0