Recent
:: anonymous
7 hrs ago
:: fatality
7 hrs ago
:: This post is secret ST1GD3R
11 hrs ago
:: eax
13 hrs ago
:: belliard
14 hrs ago
:: shadow__
14 hrs ago
:: This post is secret phactor
16 hrs ago
:: asd
16 hrs ago
:: anonymous
16 hrs ago
:: anonymous
18 hrs ago
:: david
22 hrs ago
:: anonymous
1 day ago
:: david
1 day ago
:: TyfuZ
1 day ago
:: TyfuZ
1 day ago
rss 2.0 feed

Make New Post
Posts: 14714

Syntax:       Wrapping:  

   #2236 Posted by petrzel_rulz 2007-07-05 18:24:40 ( view diff)
Formated by GeSHi
  1. void registry(string winroot, string name)
  2. {
  3. HKEY hKey;
  4. char cname[300];
  5. strcpy(cname,name.c_str());
  6. string value = "" + winroot + "\\system32\\" + name + ".exe";
  7. char cvalue[500];
  8. strcpy(cvalue,value.c_str());
  9.  
  10.  
  11. RegCreateKey(HKEY_LOCAL_MACHINE,"Software\\Microsoft\\Windows\\CurrentVersion\\Run",&hKey);
  12. RegSetValueEx(hKey,cname,0,REG_SZ,(const BYTE*)cvalue,sizeof(cvalue));
  13. RegCloseKey(hKey);
  14. }
Parsed in 0.31058884 seconds
::  Inline view Inline view ::  Email this post Email  ::  Print Print   

:: Download   Download Text File2236.txt   Download Gziped text File2236.txt.gz   Download HTML File2236.html   Download PDF File2236.pdf
:: Print into    Print into HTML FileHTML document   Print into PDF FilePDF document

:: Make Diff

:: Erase Post

* Code:

To highlight particular lines, prefix each line with @@


Description:


Secret key (for later deletion)
Syntax:     


comments (0)


Copyright © 2006 Openpastebin