Jump to content

Quick Virus Checker


Recommended Posts

#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.

Link to comment
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
Link to comment
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.

Wel i'm still a beginner and this is my first script.

Link to comment
Share on other sites

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
Link to comment
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?

Link to comment
Share on other sites

  • Developers

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 :)

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Moderators

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" :)

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.

Link to comment
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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...