[Tutorial] How To Make A Real Anti-Virus (File Scanner)
Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
today i will show you how to make an %100 real anti-virus with HASH CODES
U need 2 TextBox
2 button
1st button = open
2nd button = scan
1st TextBox will be program's hash
2nd textbox will be virus hashes
1st add this codes to top of Form1
U need 2 TextBox
2 button
1st button = open
2nd button = scan
1st TextBox will be program's hash
2nd textbox will be virus hashes
1st add this codes to top of Form1
Code: Select all
and button1(open button) codes:Imports System
Imports System.IO.FileStream
Imports System.Security.Cryptography
Imports System.Text
Imports System.IO
Code: Select all
and scan button codes:
Dim dialog As New OpenFileDialog
dialog.CheckFileExists = True
dialog.CheckPathExists = True
dialog.ShowDialog()
Dim provider As New MD5CryptoServiceProvider
Dim inputStream As New FileStream(dialog.FileName, FileMode.Open, FileAccess.Read, FileShare.Read, &H2000)
provider.ComputeHash(inputStream)
Dim hash As Byte() = provider.Hash
Dim builder As New StringBuilder
Dim num As Byte
For Each num In hash
builder.Append(String.Format("{0:X2}", num))
Next
Me.TextBox1.Text = builder.ToString
Code: Select all
If TextBox2.Text.Contains(TextBox1.Text) Then
MsgBox("Virus Found")
Else
MsgBox("Safe File")
End If
leeching someone's stuff and not saying their name is somewhat of a illegal , i have seen this somewhere in mpgh,
yeah aLcohoL_95 posted it
its me -.-
and u can look to him signature
or just pm him :arrow: :mrgreen:
its me -.-
and u can look to him signature
or just pm him :arrow: :mrgreen:
You O.o oic, my mistake, sorry
np hope u liked my tutorial cooll;
.. well cool. but it dosent works 100%?.. i downloaded a virus (for testing).. my bullguard detected it, but this one didnt.. but cool
Free, Safe & Professional software at: http://www.teamnibic.com
Code: Select all
[/size] Try
RichTextBox1.SelectAll() 'this will make all text in Richtextbox1 marked
Richtextbox1.selectedtext = "Visit my website ;)"
Catch ex As Exception
End Try
NiBiCTm wrote:.. well cool. but it dosent works 100%?.. i downloaded a virus (for testing).. my bullguard detected it, but this one didnt.. but coolYes, it does work 100%, but you'll need to add hashes.
You're crazy!
I'm not crazy, my mother had me tested. ~Sheldon Cooper
I'm not crazy, my mother had me tested. ~Sheldon Cooper
Just telling you that you cannot use the code:
Code: Select all
You should replace the code with: If TextBox2.Text.Contains(TextBox1.Text)
Code: Select all
If TextBox1.Text = TextBox2.text
no now look
TextBox1 has a Lot of Hash Codes
so we cant use your code
we must use "contains" for that
TextBox1 has a Lot of Hash Codes
so we cant use your code
we must use "contains" for that
How can i make this search maybe a whole folder?
Copyright Information
Copyright © Codenstuff.com 2020 - 2023