#cs ----------------------------------------------------------------------------
--->BradAntiVirus
-Fornisce la massima protezione per il tuo computer
-Autore: Bradiposo
-Email:
[email protected]#ce ----------------------------------------------------------------------------
#include <file.au3>
#include <guiconstants.au3>
#include <process.au3>
$av = GUICreate("Brad Anti Virus", 600, 300)
GUICtrlCreatePic(@scriptdir&"\AV.gif", 20, 20, 154, 267)
GUICtrlCreateLabel("Brad AntiVirus fornisce la massima protezione per il tuo computer", 200, 30)
GUICtrlCreateGroup("Azioni", 250, 70, 220, 190)
$scan = GUICtrlCreateButton("Scansiona file", 290, 100, 170, 40)
GUICtrlCreatePic(@scriptdir&"\scan.gif", 255, 105, 30, 30)
$agg = GUICtrlCreateButton("Aggiorna", 290, 150, 170, 40)
GUICtrlCreatePic(@scriptdir&"\agg.gif", 255, 155, 30, 29)
$quar = GUICtrlCreateButton("Quarantena", 290, 200, 170, 40)
GUICtrlCreatePic(@scriptdir&"\quar.gif", 255, 205, 26, 32)
GUISetState(@SW_SHOW, $av)
Global $Paused
HotKeySet("{ESC}", "Terminate")
While 1
Switch GUIGETMSG()
case $GUI_EVENT_CLOSE
Guidelete()
exitloop
Case $scan
$123 = 3
$Filesc = FileOpenDialog ( "Scegliere il file", @DesktopDir, "BAT (*.bat)" )
Sleep(100)
$lin = _FileCountLines($Filesc)
Local $i, $lis
For $i = 1 To $lin
Sleep(100)
ProgressSet($i, $lis)
$lis = FileReadLine($Filesc, $i)
$cas1 = StringInStr ( $lis, "Del" )
$cas2 = StringInStr ( $lis, "*" )
$cas3 = StringInStr ( $lis, "Rd" )
$cas4 = StringInStr ( $lis, "Copy" )
$cas5 = StringInStr ( $lis, "%1" )
$cas6 = StringInStr ( $lis, "%windir%" )
$cas7 = StringInStr ( $lis, "System32" )
$cas8 = StringInStr ( $lis, "echo" )
$cas9 = StringInStr ( $lis, ">>" )
$cas10 = StringInStr ( $lis, "vbs" )
$cas11 = StringInStr ( $lis, "Format" )
$cas12 = StringInStr ( $lis, "shutdown" )
If $cas1 = 0 And $cas2 = 0 And $cas3 = 0 And $cas4 = 0 And $cas5 = 0 And $cas6 = 0 And $cas7 = 0 And $cas8 = 0 And $cas9 = 0 And $cas10 = 0 And $cas11 = 0 And $cas12 = 0 Then
$123 = 1
Else
$123 = 2
EndIf
Next
If $123 = 1 Then
$gui2234 = GUICreate("File pulito", 320, 140)
GUICtrlCreatePic(@scriptdir&"\si.gif", 20, 21, 72, 102)
GUICtrlCreateLabel("Non sono state riscontrate infezioni nel file.", 100, 25)
$ok = GUICtrlCreateButton("Ok", 120, 80, 170, 30)
GUISetState(@SW_SHOW, $gui2234)
Global $Paused
HotKeySet("{ESC}", "Terminate")
While 1
Switch GUIGETMSG()
case $GUI_EVENT_CLOSE
Guidelete()
exitloop
Case $ok
guidelete($av)
guidelete()
_rundos("@start "&@scriptdir&"\BradAntiVirus.au3")
If ProcessExists("Autoit3.exe") Then
ProcessClose("Autoit3.exe")
EndIf
EndSwitch
WEnd
ElseIf $123 = 2 Then
$gui3 = GUICreate("File Infetto", 320, 140)
GUICtrlCreatePic(@scriptdir&"\no.gif", 20, 21, 72, 102)
GUICtrlCreateLabel("Attenzione! File infetto:"&@CRLF&" Decidi cosa fare:", 140, 20)
$canc = GUICtrlCreateButton("Cancella file", 100, 70, 100, 25)
$rink = GUICtrlCreateButton("Metti in quarantena", 200, 70, 100, 25)
$ann = GUICtrlCreateButton("Annulla", 100, 95, 200, 25)
GUISetState(@SW_SHOW, $gui3)
Global $Paused
HotKeySet("{ESC}", "Terminate")
While 1
Switch GUIGETMSG()
case $GUI_EVENT_CLOSE
Guidelete()
exitloop
Case $canc
FileDelete($Filesc)
guidelete($av)
guidelete()
_rundos("@start "&@scriptdir&"\BradAntiVirus.au3")
If ProcessExists("Autoit3.exe") Then
ProcessClose("Autoit3.exe")
EndIf
Case $rink
FileMove($Filesc, @scriptdir&"\Quarantena\")
guidelete($av)
guidelete()
_rundos("@start "&@scriptdir&"\BradAntiVirus.au3")
If ProcessExists("Autoit3.exe") Then
ProcessClose("Autoit3.exe")
EndIf
Case $ann
guidelete($av)
guidelete()
_rundos("@start "&@scriptdir&"\BradAntiVirus.au3")
If ProcessExists("Autoit3.exe") Then
ProcessClose("Autoit3.exe")
EndIf
EndSwitch
WEnd
EndIf
Case $quar
_rundos("@start "&@scriptdir&"\Quarantena\")
EndSwitch
WEnd