CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/external/source/pxesploit/regeditor/addmsf.c
Views: 11779
1
2
#include <sys/types.h>
3
#include "ntreg.h"
4
int main(){
5
struct hive *myhive;
6
myhive = openHive("SYSTEM", HMODE_RW);
7
if(myhive == 0)
8
myhive = openHive("system", HMODE_RW);
9
if(myhive == 0)
10
myhive = openHive("System", HMODE_RW);
11
put_dword(myhive, 0, "ControlSet001\\Services\\Spooler\\Start", TPF_VK_EXACT, 2);
12
put_dword(myhive, 0, "ControlSet002\\Services\\Spooler\\Start", TPF_VK_EXACT, 2);
13
writeHive(myhive);
14
closeHive(myhive);
15
}
16
17
18