Forum » Programiranje » Neki bi iz registra pobrisal
Neki bi iz registra pobrisal
strel ::
Torej na firmi mamo en hud virus KLEZ@E.mm se širi ko ...
Je pa taka stvar da bi blo treba izbrisat string iz registra da bi lahko kudiča mal ustavu.
In to v veji[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run]
Noter je pa recimo string WinkXX
Lahko iz VB al pa kak skript bi blo še bolje.
Tako da bi lahko poslal 200 uporabnikom po pošti oni kliknejo in gre to sranje iz zagona. HE HE Pol ga bomo pa že ...>:D
Je pa taka stvar da bi blo treba izbrisat string iz registra da bi lahko kudiča mal ustavu.
In to v veji[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run]
Noter je pa recimo string WinkXX
Lahko iz VB al pa kak skript bi blo še bolje.
Tako da bi lahko poslal 200 uporabnikom po pošti oni kliknejo in gre to sranje iz zagona. HE HE Pol ga bomo pa že ...>:D
Spajky ::
Ja izvozi ključ pa datoteko editiraj v Notepadu tako, da pred vsako vrstico texta daš minus razen pred Regedit4. Sejvaj in probaj če dela! 8-)
"Bluzim na forumu, torej sem !" (še živ ) ...
StratOS ::
Na na hitro nekaj. Glavno je v Main !!
ostalo iz setup redist procedur - lahko višek zbrišeš :)
Option Explicit
' Hkey cache (used for logging purposes)
Private Type HKEY_CACHE
Hkey As Long
strHkey As String
End Type
Private hkeyCache() As HKEY_CACHE
' Registry manipulation API's (32-bit)
Public Const HKEY_CLASSES_ROOT = &H80000000
Public Const HKEY_CURRENT_USER = &H80000001
Public Const HKEY_LOCAL_MACHINE = &H80000002
Public Const HKEY_USERS = &H80000003
Private Const ERROR_SUCCESS = 0&
Private Const ERROR_NO_MORE_ITEMS = 259&
Private Const REG_SZ = 1
Private Const REG_BINARY = 3
Private Const REG_DWORD = 4
Private Declare Function OSRegCloseKey Lib "advapi32" Alias "RegCloseKey" (ByVal Hkey As Long) As Long
Private Declare Function OSRegCreateKey Lib "advapi32" Alias "RegCreateKeyA" (ByVal Hkey As Long, ByVal lpszSubKey As String, phkResult As Long) As Long
Private Declare Function OSRegDeleteKey Lib "advapi32" Alias "RegDeleteKeyA" (ByVal Hkey As Long, ByVal lpszSubKey As String) As Long
Private Declare Function OSRegEnumKey Lib "advapi32" Alias "RegEnumKeyA" (ByVal Hkey As Long, ByVal iSubKey As Long, ByVal lpszName As String, ByVal cchName As Long) As Long
Private Declare Function OSRegOpenKey Lib "advapi32" Alias "RegOpenKeyA" (ByVal Hkey As Long, ByVal lpszSubKey As String, phkResult As Long) As Long
Private Declare Function OSRegQueryValueEx Lib "advapi32" Alias "RegQueryValueExA" (ByVal Hkey As Long, ByVal lpszValueName As String, ByVal dwReserved As Long, lpdwType As Long, lpbData As Any, cbData As Long) As Long
Private Declare Function OSRegSetValueEx Lib "advapi32" Alias "RegSetValueExA" (ByVal Hkey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal dwType As Long, ByVal lpData As String, ByVal cbData As Long) As Long
Private Declare Function OSRegSetValueNumEx Lib "advapi32" Alias "RegSetValueExA" (ByVal Hkey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal dwType As Long, lpData As Any, ByVal cbData As Long) As Long
Public Declare Function RegDeleteValue Lib "advapi32.dll" Alias "RegDeleteValueA" (ByVal Hkey As Long, ByVal lpValueName As String) As Long
'-----------------------------------------------------------
' FUNCTION: RegOpenKey
'
' Opens an existing key in the system registry.
'
' Returns: True if the key was opened OK, False otherwise
' Upon success, phkResult is set to the handle of the key.
'-----------------------------------------------------------
'
Private Function RegOpenKey(ByVal Hkey As Long, ByVal lpszSubKey As String, phkResult As Long) As Boolean
Dim lResult As Long
Dim strHkey As String
strHkey = strGetHKEYString(Hkey)
lResult = OSRegOpenKey(Hkey, lpszSubKey, phkResult)
If lResult = ERROR_SUCCESS Then
RegOpenKey = True
End If
End Function
'-----------------------------------------------------------
'Given an HKEY, return the text string representing that
'key.
'-----------------------------------------------------------
'
Private Function strGetHKEYString(ByVal Hkey As Long) As String
Dim strKey As String
Dim intIdx As Integer
'Is the hkey predefined?
strKey = strGetPredefinedHKEYString(Hkey)
If Len(strKey) > 0 Then
strGetHKEYString = strKey
Exit Function
End If
End Function
'-----------------------------------------------------------
' FUNCTION: RegCloseKey
'
' Closes an open registry key.
'
' Returns: True on success, else False.
'-----------------------------------------------------------
'
Private Function RegCloseKey(ByVal Hkey As Long) As Boolean
Dim lResult As Long
lResult = OSRegCloseKey(Hkey)
RegCloseKey = (lResult = ERROR_SUCCESS)
End Function
'-----------------------------------------------------------
'Given a predefined HKEY, return the text string representing that
'key, or else return vbNullString.
'-----------------------------------------------------------
'
Private Function strGetPredefinedHKEYString(ByVal Hkey As Long) As String
Select Case Hkey
Case HKEY_CLASSES_ROOT
strGetPredefinedHKEYString = "HKEY_CLASSES_ROOT"
Case HKEY_CURRENT_USER
strGetPredefinedHKEYString = "HKEY_CURRENT_USER"
Case HKEY_LOCAL_MACHINE
strGetPredefinedHKEYString = "HKEY_LOCAL_MACHINE"
Case HKEY_USERS
strGetPredefinedHKEYString = "HKEY_USERS"
End Select
End Function
Sub Main()
Dim Tmp As Long
Dim Hkey As Long
Tmp = RegOpenKey(HKEY_LOCAL_MACHINE, "Software/Microsoft/Windows/CurrentVersion/Run", Hkey)
Tmp = RegDeleteValue(Hkey, "WinkXX")
RegCloseKey Hkey
End Sub
ostalo iz setup redist procedur - lahko višek zbrišeš :)
Option Explicit
' Hkey cache (used for logging purposes)
Private Type HKEY_CACHE
Hkey As Long
strHkey As String
End Type
Private hkeyCache() As HKEY_CACHE
' Registry manipulation API's (32-bit)
Public Const HKEY_CLASSES_ROOT = &H80000000
Public Const HKEY_CURRENT_USER = &H80000001
Public Const HKEY_LOCAL_MACHINE = &H80000002
Public Const HKEY_USERS = &H80000003
Private Const ERROR_SUCCESS = 0&
Private Const ERROR_NO_MORE_ITEMS = 259&
Private Const REG_SZ = 1
Private Const REG_BINARY = 3
Private Const REG_DWORD = 4
Private Declare Function OSRegCloseKey Lib "advapi32" Alias "RegCloseKey" (ByVal Hkey As Long) As Long
Private Declare Function OSRegCreateKey Lib "advapi32" Alias "RegCreateKeyA" (ByVal Hkey As Long, ByVal lpszSubKey As String, phkResult As Long) As Long
Private Declare Function OSRegDeleteKey Lib "advapi32" Alias "RegDeleteKeyA" (ByVal Hkey As Long, ByVal lpszSubKey As String) As Long
Private Declare Function OSRegEnumKey Lib "advapi32" Alias "RegEnumKeyA" (ByVal Hkey As Long, ByVal iSubKey As Long, ByVal lpszName As String, ByVal cchName As Long) As Long
Private Declare Function OSRegOpenKey Lib "advapi32" Alias "RegOpenKeyA" (ByVal Hkey As Long, ByVal lpszSubKey As String, phkResult As Long) As Long
Private Declare Function OSRegQueryValueEx Lib "advapi32" Alias "RegQueryValueExA" (ByVal Hkey As Long, ByVal lpszValueName As String, ByVal dwReserved As Long, lpdwType As Long, lpbData As Any, cbData As Long) As Long
Private Declare Function OSRegSetValueEx Lib "advapi32" Alias "RegSetValueExA" (ByVal Hkey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal dwType As Long, ByVal lpData As String, ByVal cbData As Long) As Long
Private Declare Function OSRegSetValueNumEx Lib "advapi32" Alias "RegSetValueExA" (ByVal Hkey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal dwType As Long, lpData As Any, ByVal cbData As Long) As Long
Public Declare Function RegDeleteValue Lib "advapi32.dll" Alias "RegDeleteValueA" (ByVal Hkey As Long, ByVal lpValueName As String) As Long
'-----------------------------------------------------------
' FUNCTION: RegOpenKey
'
' Opens an existing key in the system registry.
'
' Returns: True if the key was opened OK, False otherwise
' Upon success, phkResult is set to the handle of the key.
'-----------------------------------------------------------
'
Private Function RegOpenKey(ByVal Hkey As Long, ByVal lpszSubKey As String, phkResult As Long) As Boolean
Dim lResult As Long
Dim strHkey As String
strHkey = strGetHKEYString(Hkey)
lResult = OSRegOpenKey(Hkey, lpszSubKey, phkResult)
If lResult = ERROR_SUCCESS Then
RegOpenKey = True
End If
End Function
'-----------------------------------------------------------
'Given an HKEY, return the text string representing that
'key.
'-----------------------------------------------------------
'
Private Function strGetHKEYString(ByVal Hkey As Long) As String
Dim strKey As String
Dim intIdx As Integer
'Is the hkey predefined?
strKey = strGetPredefinedHKEYString(Hkey)
If Len(strKey) > 0 Then
strGetHKEYString = strKey
Exit Function
End If
End Function
'-----------------------------------------------------------
' FUNCTION: RegCloseKey
'
' Closes an open registry key.
'
' Returns: True on success, else False.
'-----------------------------------------------------------
'
Private Function RegCloseKey(ByVal Hkey As Long) As Boolean
Dim lResult As Long
lResult = OSRegCloseKey(Hkey)
RegCloseKey = (lResult = ERROR_SUCCESS)
End Function
'-----------------------------------------------------------
'Given a predefined HKEY, return the text string representing that
'key, or else return vbNullString.
'-----------------------------------------------------------
'
Private Function strGetPredefinedHKEYString(ByVal Hkey As Long) As String
Select Case Hkey
Case HKEY_CLASSES_ROOT
strGetPredefinedHKEYString = "HKEY_CLASSES_ROOT"
Case HKEY_CURRENT_USER
strGetPredefinedHKEYString = "HKEY_CURRENT_USER"
Case HKEY_LOCAL_MACHINE
strGetPredefinedHKEYString = "HKEY_LOCAL_MACHINE"
Case HKEY_USERS
strGetPredefinedHKEYString = "HKEY_USERS"
End Select
End Function
Sub Main()
Dim Tmp As Long
Dim Hkey As Long
Tmp = RegOpenKey(HKEY_LOCAL_MACHINE, "Software/Microsoft/Windows/CurrentVersion/Run", Hkey)
Tmp = RegDeleteValue(Hkey, "WinkXX")
RegCloseKey Hkey
End Sub
Zgodovina sprememb…
- spremenila: StratOS ()
AnWar ::
Stratos ti v p***i:D Pa brez zamere.:D
[Asus ROG Strix SCAR III]
Zgodovina sprememb…
- spremenil: AnWar ()
Vredno ogleda ...
Tema | Ogledi | Zadnje sporočilo | |
---|---|---|---|
Tema | Ogledi | Zadnje sporočilo | |
» | [C#] Prosim pomagajte! Potrebujem program, ki bi pobiral podatke iz ene straniOddelek: Programiranje | 2768 (2378) | David1994 |
» | Vb6Oddelek: Programiranje | 1354 (1217) | StratOS |
» | API+VBOddelek: Programiranje | 2125 (1829) | webblod |
» | Odpiranje dat.exe v VBOddelek: Programiranje | 3023 (2816) | webblod |
» | Visual basic Progress barOddelek: Programiranje | 1587 (1520) | Lunik |