Hi all, and welcome to my Very New Project: Making a True AV in VB. I'm new at VB, so maybe can you help me with my new "Security Pilot Anti-Virus". I made the most part of it, but because i'm now learning the ropes of programming, i need help with the Source Codes. Additional information is shown down.

I've followed a tutorial on Youtube: How to make a fake AV in VB. Now i want to transform it in a real AV. I made the most of it, but i still need some infos, because i need it to be as real as it's possible. So pelase help with developing. :D :)

Because i didn't find a place where to post my Source Code without downloading some stupid clients, i decided to put my Code here, and also give explanations about my AV. The problems(lots or not) will be posted at the Discussions tab, so please be very active there, cause i need help.

My project consists in: 3 forms(1: Main Form, 2:Detected Viruses, 3:Registration and also a SplashScreen
Form 1 consists in: Some labels (for names,etc..)
4 Buttons: "Scan" ; "Clean Viruses" ; "Register" and "Stop Scan"
A Combobox("Scan for Virus(s)" "Scan for SpyWare" "Scan for AdWare")
And finally, a Progressbar

Form 2 consists in: 2 Listboxes("Major Viruses Found" and "Total Viruses")
A label to say wether the computer is at risk or it has no viruses( here, we must talk a little bit)
A Clean button for cleaning the viruses listed in the listbox1(if they exist)
And a ProgressBar to show when the cleaning it's complete.
Form 3 consists in: 3 Buttons( "Get Reg Key" ; "Register" and "Cancel")
A label to say:Put your reg key here!
And down: three textboxes, where the code will apear

Now, i'll paste the code in, for each Forms. After this, PLEASE GO TO THE DISCUSSIONS TAB:

Form 1:
Public Class Form1
Public FoundFiles As New ArrayList
Public FoundDirs As New ArrayList

Scan button: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Timer1.Start()
End Sub

Register button: Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Form3.Show()
End Sub
Clean Viruses(shows form 2): Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Form2.Show()
End Sub

ProgressBar: Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
ProgressBar1.Value += 1

If ProgressBar1.Value = _
ProgressBar1.Maximum Then
Timer1.Stop()
MsgBox("Your computer has been scanned!Click the Clean Viruses Button, and we'll show you the results!", MsgBoxStyle.Information)
Me.Hide()
End If
End Sub

Stop Scan: Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Timer1.Stop()
Label3.Text = "Scan Stopped"
ProgressBar1.Value += 0
End Sub


And: Public Sub Scan()
Select Case ComboBox1.SelectedIndex
Case 0 ' 1st Item in Combobox Selected - Scan for Virus(s).
' Worms/Tojans Files.
Dim Worms_Files() As String = c:\Program Files\Archive.exe", "c:\Program Files\Archive.exe
' Worms/Tojans Directories - Full Path.
Dim Worms_Dirs() As String = c:\Program Files\aolx", "c:\Program Files\BTV

' Loop through Worms/Tojans Files(), add any found to listbox, and delete.
For i = 0 To Worms_Files.GetUpperBound(0)
If IO.File.Exists(Worms_Files(i)) Then
FoundFiles.Add(Worms_Files(i))
End If
Next

' Loop through Worms/Tojans Dirs(), add any found to listbox, and delete.
For i = 0 To Worms_Dirs.GetUpperBound(0)
If IO.Directory.Exists(Worms_Dirs(i)) Then
FoundDirs.Add(Worms_Dirs(i))
End If
Next


Case 1 ' 2nd Item in Combobox Selected - Scan for SpyWare.
' Spyware Files.
Dim Spyware_Files() As String = C:\Program Files\AdStatComm.dll", "C:\Program Files\0er8k4va\0er8k4va.exe", "C:\WINDOWS\System32\Mkfxut.exe", "C:\WINDOWS\system32\pkdacs.exe", _
"C:\WINDOWS\System32\ywrqku.exe", "C:\windows\system32\msnavc32.exe", "C:\Program Files\AutoUpdate\AutoUpdate.exe", "C:\WINDOWS\System32\vwix32.exe", _
"C:\WINDOWS\System32\winntcreate.exe", "C:\WINDOWS\System32\sysmonnt.exe", "C:\WINDOWS\System32\winhcek32.exe", "C:\WINDOWS\System32\qlykdnb.dll", _
"C:\WINDOWS\System32\rypgvtoimrl.exe", "C:\WINDOWS\System32\spwgoc.exe", "C:\windows\system32\msnavc32.exe", "C:\WINDOWS\System32\sysmonnt", _
"C:\Program Files\hpdll\hpdll.exe", "C:\WINDOWS\System32\w?wexec.exe", "C:\WINDOWS\isrvs\ffisearch.exe", "c:\Program Files\Autosearch.dll", _
"c:\Program Files\Archive.exe", "c:\Program Files\Archive.exe
'Spyware Directories - Full Path.
Dim Spyware_Dirs() As String = c:\Program Files\180 SearchAssistant", "c:\Program Files\2Search", "c:\Program Files\5whgue21", "c:\Program Files\aolx", "c:\Program Files\ACM", _
"c:\Program Files\Browser Pal", "c:\Program Files\Activity Keylogger", "c:\Program Files\Activity Logger", "c:\Program Files\Actual Spy", _
"c:\Program Files\AdvSearch", "c:\Program Files\AppsTraka", "c:\Program Files\Ardamax Keylogger", "c:\Program Files\Auto Keylogger", _
"c:\Program Files\BazookaBar", "c:\Program Files\Blackbox7", "c:\Program Files\Blackbox7", "c:\Program Files\BTV

' Loop through Spyware Files(), add any found to listbox, and delete.
For i = 0 To Spyware_Files.GetUpperBound(0)
If IO.File.Exists(Spyware_Files(i)) Then
FoundFiles.Add(Spyware_Files(i))
End If
Next

' Loop through Spyware Dirs(), add any found to listbox, and delete.
For i = 0 To Spyware_Dirs.GetUpperBound(0)
If IO.Directory.Exists(Spyware_Dirs(i)) Then
FoundDirs.Add(Spyware_Dirs(i))
End If
Next


Case 2 ' 3rd Item in Combobox Selected - Scan for AdWare.
' Adware Files.
Dim Adware_Files() As String = c:\Program Files\AdStatComm.dll", "C:\Program Files\0er8k4va\0er8k4va.exe", " C:\WINDOWS\System32\Mkfxut.exe", " C:\WINDOWS\system32\pkdacs.exe", " C:\WINDOWS\System32\ywrqku.exe", " C:\windows\system32\msnavc32.exe", " C:\Program Files\AutoUpdate\AutoUpdate.exe", " C:\WINDOWS\System32\winntcreate.exe", " C:\WINDOWS\System32\vwix32.exe", " C:\WINDOWS\System32\sysmonnt.exe", " C:\WINDOWS\System32\winhcek32.exe", " C:\WINDOWS\System32\qlykdnb.dll", " C:\WINDOWS\System32\rypgvtoimrl.exe", " C:\WINDOWS\System32\spwgoc.exe ", " C:\windows\system32\msnavc32.exe", " C:\WINDOWS\System32\sysmonnt", " C:\Program Files\hpdll\hpdll.exe ", " C:\WINDOWS\System32\w?wexec.exe", " C:\WINDOWS\isrvs\ffisearch.exe", "c:\Program Files\Autosearch.dll
'Adware Directories - Full Path.
Dim Adware_Dirs() As String = c:\Program Files\180 SearchAssistant", "c:\Program Files\2Search", "c:\Program Files\5whgue21", "c:\Program Files\aolx", "c:\Program Files\ACM", _
"c:\Program Files\Browser Pal", "c:\Program Files\Activity Keylogger", "c:\Program Files\Activity Logger", "c:\Program Files\Actual Spy", _
"c:\Program Files\AdvSearch", "c:\Program Files\AppsTraka", "c:\Program Files\Ardamax Keylogger", "c:\Program Files\Auto Keylogger", _
"c:\Program Files\BazookaBar", "c:\Program Files\Blackbox7", "c:\Program Files\Blackbox7", "c:\Program Files\BTV

' Loop through Adware Files(), add any found to listbox, and delete.
For i = 0 To Adware_Files.GetUpperBound(0)
If IO.File.Exists(Adware_Files(i)) Then
FoundFiles.Add(Adware_Files(i))
End If
Next

' Loop through Adware Dirs(), add any found to listbox, and delete.
For i = 0 To Adware_Dirs.GetUpperBound(0)
If IO.Directory.Exists(Adware_Dirs(i)) Then
FoundDirs.Add(Adware_Files(i))
End If
Next

End Select
End Sub
End Class

Form 2:
Public Class Form2
Clean button: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Timer1.Start()
' Delete Files.
For i = 0 To Form1.FoundFiles.Count - 1
IO.File.Delete(CStr(Form1.FoundFiles(i)))
Next

' Delete Directories.
For i = 0 To Form1.FoundDirs.Count - 1
IO.Directory.Delete(CStr(Form1.FoundDirs(i)))
Next

End Sub

ProgressBar: Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
ProgressBar1.Value += 1

If ProgressBar1.Value = _
ProgressBar1.Maximum Then

End If

Timer1.Stop()

MsgBox("All Virus(s) have been cleaned. Your Computer is now safe. Purchase the full version to keep your computer safe!", MsgBoxStyle.Information)
Me.Hide()
End Sub

Form Load: Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
' Add Items in FoundFiles array to listbox.
For i = 0 To Form1.FoundFiles.Count - 1
ListBox1.Items.Add(Form1.FoundFiles(i))
Next

' Add Items in FoundDirs array to Listbox.
For i = 0 To Form1.FoundDirs.Count - 1
ListBox1.Items.Add(Form1.FoundDirs(i))
Next

End Sub
End Class

Form 3:
Public Class Form3

Get Reg Key button: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TextBox1.Text = Int(Rnd() * 1000)
TextBox2.Text = Int(Rnd() * 7890)
TextBox3.Text = Int(Rnd() * 54)

End Sub

Cancel button: Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Me.Hide()
End Sub

Register: Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
If TextBox3.Text = ("Button1") And TextBox2.Text = ("Button1") And TextBox1.Text = ("Button1") Then
Me.Hide()
Else
MsgBox("Register Sucsessful!", MsgBoxStyle.Information)
Me.Hide()
End If
End Sub
End Class

SplashScreen:
Public NotInheritable Class SplashScreen1

'TODO: This form can easily be set as the splash screen for the application by going to the "Application" tab
' of the Project Designer ("Properties" under the "Project" menu).


Private Sub SplashScreen1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'Set up the dialog text at runtime according to the application's assembly information.

'TODO: Customize the application's assembly information in the "Application" pane of the project
' properties dialog (under the "Project" menu).

'Application title
If My.Application.Info.Title <> "" Then
ApplicationTitle.Text = My.Application.Info.Title
Else
'If the application title is missing, use the application name, without the extension
ApplicationTitle.Text = System.IO.Path.GetFileNameWithoutExtension(My.Application.Info.AssemblyName)
End If

'Format the version information using the text set into the Version control at design time as the
' formatting string. This allows for effective localization if desired.
' Build and revision information could be included by using the following code and changing the
' Version control's designtime text to "Version {0}.{1:00}.{2}.{3}" or something similar. See
' String.Format() in Help for more information.
'
' Version.Text = System.String.Format(Version.Text, My.Application.Info.Version.Major, My.Application.Info.Version.Minor, My.Application.Info.Version.Build, My.Application.Info.Version.Revision)

Version.Text = System.String.Format(Version.Text, My.Application.Info.Version.Major, My.Application.Info.Version.Minor)

'Copyright info
Copyright.Text = My.Application.Info.Copyright
End Sub

Private Sub MainLayoutPanel_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MainLayoutPanel.Paint

End Sub
End Class


That's the hole code. Now go to "Discussions" :D

Last edited Sep 20, 2009 at 1:20 PM by Roxor, version 3