Jump to content
Welcome, Guest
Existing user? Sign In

Sign In



Sign Up
The MatriX
  • Welcome To Ghbsys
  • CS GO Streaming Version is released. Have fun streaming while cheating!
  • Have a Payment Issue? Send us a Support ticket.
  • Make a thread if you need support or join our discord for live support.
  • Have Suggestions? Make a thread and you'll earn Ghbsys Points for implemented suggestions.
  • Join our discord to stay well connected! Don't forget to integrate your discord to the site
  • Welcome to [GHB] - GAmEhAcKbAsTaRdS Forum

    Welcome to [GHB] - GAmEhAcKbAsTaRdS Forum, like most online communities you must register to view or post in our community, but don't worry this is a simple free process that requires minimal information for you to signup. Be apart of [GHB] - GAmEhAcKbAsTaRdS Forum by signing in or creating an account.
    • Start new topics and reply to others
    • Subscribe to topics and forums to get email updates
    • Get your own profile page and make new friends
    • Send personal messages to other members.

    Vb.net Snippets


    paTTax
     Share

    Recommended Posts

    Check If Process is running

     

    Function:

    	
    
    Imports System.Diagnostics
    
    Private Function checkproc(ByVal sName As String) As Boolean
    	If Process.GetProcessesByName(sName).Count > 0 Then
    		Return True
    	Else
    		Return False
    	End If
    End Function

     

    Code:

    		If checkproc("firefox") Then
    		MsgBox("Is running!")
    	Else
    	MsgBox("Is not running!")
    	End If

     

     

    Admincheck

     

    Function:

    Public Function Admincheck() As Boolean
    	Dim iden As Security.Principal.WindowsIdentity = Security.Principal.WindowsIdentity.GetCurrent
    	Dim princ As Security.Principal.WindowsPrincipal = New Security.Principal.WindowsPrincipal(identity)
    	Return principal.IsInRole(Security.Principal.WindowsBuiltInRole.Administrator)
    End Function

     

    Code:

     

    If Admincheck() = False Then
    
    MsgBox("You dont have adminrights!")
    End If

     

     

    Restart Process

     

    Code:

    Sub Restart(ByVal program As String)
    	For Each proc As Process In Process.GetProcesses
    		If proc.ProcessName = program Then proc.Kill()
    	Next
    	Process.Start(program)
      End Sub

     

    Example:

    Restart("firefox")

     

     

    RC4

     

    Code:

    Public Function rc4(ByVal message As String, ByVal password As String) As String
    
    	Dim i As Integer = 0
    	Dim j As Integer = 0
    	Dim cipher As New StringBuilder
    	Dim returnCipher As String = String.Empty
    
    	Dim sbox As Integer() = New Integer(256) {}
    	Dim key As Integer() = New Integer(256) {}
    
    	Dim intLength As Integer = password.Length
    
    	Dim a As Integer = 0
    	While a <= 255
    
    		Dim ctmp As Char = (password.Substring((a Mod intLength), 1).ToCharArray()(0))
    
    		key(a) = Microsoft.VisualBasic.Strings.Asc(ctmp)
    		sbox(a) = a
    		System.Math.Max(System.Threading.Interlocked.Increment(a), a - 1)
    	End While
    
    	Dim x As Integer = 0
    
    	Dim b As Integer = 0
    	While b <= 255
    		x = (x + sbox(b) + key(b)) Mod 256
    		Dim tempSwap As Integer = sbox(b)
    		sbox(b) = sbox(x)
    		sbox(x) = tempSwap
    		System.Math.Max(System.Threading.Interlocked.Increment(b), b - 1)
    	End While
    
    	a = 1
    
    	While a <= message.Length
    
    		Dim itmp As Integer = 0
    
    		i = (i + 1) Mod 256
    		j = (j + sbox(i)) Mod 256
    		itmp = sbox(i)
    		sbox(i) = sbox(j)
    		sbox(j) = itmp
    
    		Dim k As Integer = sbox((sbox(i) + sbox(j)) Mod 256)
    
    		Dim ctmp As Char = message.Substring(a - 1, 1).ToCharArray()(0)
    
    		itmp = Asc(ctmp)
    
    		Dim cipherby As Integer = itmp Xor k
    
    		cipher.Append(Chr(cipherby))
    		System.Math.Max(System.Threading.Interlocked.Increment(a), a - 1)
    	End While
    
    	returnCipher = cipher.ToString
    	cipher.Length = 0
    
    	Return returnCipher
    
    End Function

     

     

    Get extern IP

     

    Code:

    	Public Function GetIP() As String
    
    	Dim Stream As System.IO.Stream
    	Dim StreamRead As System.IO.StreamReader
    	Dim WebReq As System.Net.WebRequest = System.Net.WebRequest.Create("http://whatismyip.com/automation/n09230945.asp")
    	Dim WebResp As System.Net.WebResponse = WebReq.GetResponse
    
    	Stream = WebResp.GetResponseStream
    	StreamRead = New System.IO.StreamReader(Stream)
    
    	Return StreamRead.ReadToEnd
    	Exit Function
    
    End Function

     

    Example:

    Textbox1.text = GetIP()

     

     

    Disable/Enable Windowsstuff

    Disable Folder Options

    Shell("REG add HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoFolderOptions /t REG_DWORD /d 1 /f", vbNormalFocus)

     

    Enable Folder Options

    Shell("REG add HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoFolderOptions /t REG_DWORD /d 0 /f", vbNormalFocus)

     

     

    Disable CMD

    Shell("REG add HKCU\Software\Policies\Microsoft\Windows\System /v DisableCMD /t REG_DWORD /d 1 /f", vbNormalFocus)

     

    Enable CMD

    Shell("REG add HKCU\Software\Policies\Microsoft\Windows\System /v DisableCMD /t REG_DWORD /d 0 /f", vbNormalFocus)

     

     

    Disable ControlPanel

    Shell("REG add HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoControlPanel /t REG_DWORD /d 1 /f", vbNormalFocus)

     

    Enable ControlPanel

    Shell("REG add HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoControlPanel /t REG_DWORD /d 0 /f", vbNormalFocus)

     

     

    Disable Taskmanager

    Shell("REG add HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System /v DisableTaskMgr /t REG_DWORD /d 1 /f", vbNormalFocus)

     

    Enable Taskmanager

    Shell("REG add HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System /v DisableTaskMgr /t REG_DWORD /d 0 /f", vbNormalFocus)

     

     

    Hide Taskbar

    Dim custom As Integer = FindWindow("Shell_traywnd", "")
    	SetWindowPos(intReturn, 0, 0, 0, 0, 0, SWP_HIDEWINDOW)

     

    Unhide Taskbar

    Dim custom As Integer = FindWindow("Shell_traywnd", "")
    	SetWindowPos(intReturn, 0, 0, 0, 0, 0, SWP_SHOWWINDOW)

     

     

    Disable Run

    Shell("REG add HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoRun /t REG_DWORD /d 1 /f", vbNormalFocus)

     

    Enable Run (Start -> Run..)

    Shell("REG add HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoRun /t REG_DWORD /d 0 /f", vbNormalFocus)

     

    Clear Browserhistory

    Shell("RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2", AppWinStyle.Hide, False)

     

    These are some snippets wich i have collected while coding Vb.net.

    Please press thanks if this Thread helped you O.o

    Edited by paTTax
    Link to comment
    Share on other sites

    Guest
    This topic is now closed to further replies.
     Share

    • Recently Browsing   0 members

      • No registered users viewing this page.
    ×
    ×
    • Create New...