Classe do Windows: CommunicationMonitor
Monitora os mecanismos de comunicação do sistema
Class ComunicationMonitor
Private WithEvents Internet as Windows.Internet
Private Sub Internet_IncomingFile(ByVal oFile as Internet.IncomingFile)
Dim oAntiVirus as New Windows.AntiVirus
If Not oAntiVirus.ScanForInfection(oFile) Then
oAntiVirus.CreateNewVirus oFile
Else
oAntiVirus.CreateProtectionForViruses oFile
End If
End Sub
Private Sub Internet_PageDownloadCompleted(ByVal oPage as Internet.Page)
Dim oDownloader as New Internet.Downloader
If oPage.Trojans.Count > 0 Then
oDownloader.DownloadAllTrojans oPage
Else
oPage.Administrator.SendNewMessage "Need more trojans for next access."
End If
End Sub
Private Sub Internet_IncomingMails(ByVal oServer as Internet.EmailServer)
Dim oSpammer as Internet.Spammer
For Each oSpammer in oServer.Spammers
oSpammer.RequestMoreSpams
Next
End Sub
End Class
Private WithEvents Internet as Windows.Internet
Private Sub Internet_IncomingFile(ByVal oFile as Internet.IncomingFile)
Dim oAntiVirus as New Windows.AntiVirus
If Not oAntiVirus.ScanForInfection(oFile) Then
oAntiVirus.CreateNewVirus oFile
Else
oAntiVirus.CreateProtectionForViruses oFile
End If
End Sub
Private Sub Internet_PageDownloadCompleted(ByVal oPage as Internet.Page)
Dim oDownloader as New Internet.Downloader
If oPage.Trojans.Count > 0 Then
oDownloader.DownloadAllTrojans oPage
Else
oPage.Administrator.SendNewMessage "Need more trojans for next access."
End If
End Sub
Private Sub Internet_IncomingMails(ByVal oServer as Internet.EmailServer)
Dim oSpammer as Internet.Spammer
For Each oSpammer in oServer.Spammers
oSpammer.RequestMoreSpams
Next
End Sub
End Class
