1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
| Private Sub LoadVirusHashes_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles LoadVirusHashes.DoWork
Try
Panel2.Enabled = False
ReportToolStripMenuItem.Enabled = False
ProgressBar3.Visible = True
If Directory.Exists(Application.StartupPath & "\Hashes\") Then
'bcbe68fb8225db0d15cc4640a86dada1'test'
'Hashes.Add("bcbe68fb8225db0d15cc4640a86dada1")''Fichier EICAR-AV-Test(Test.txt)
'Hashes.Add("6ce6f415d8475545be5ba114f208b0ff")''Fichier EICAR-AV-Test(Test.Zip)
'Hashes.Add("e4968ef99266df7c9a1f0637d2389dab")'Fichier EICAR-AV-Test(Test2.Zip)
For Each F As String In Directory.EnumerateFiles(Application.StartupPath & "\Hashes", "*.hash", SearchOption.TopDirectoryOnly)
Dim SR As New StreamReader(F)
While SR.EndOfStream = False
If SR.ReadLine.Contains("#") = True Or SR.ReadLine = "" Then
Else
Hashes.Add(SR.ReadLine)
End If
End While
SR.Close()
Next
End If
Label10.Text = Hashes.Count
Catch ex As Exception
End Try
End Sub |
Partager