Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Keylogger Help
#1
I am very new to .Net programming. I have created a keylogger (for my own use) that simply logs the keys. No builder or anything. Before I create a builder, I would like to add features. The first feature I'm trying to add is to get the window title, name or whatever.

In a source I have found,this is the beginning of the code for the timer:
Code:
Dim fg_hwnd As Long = GetForegroundWindow

This was taken from a source that was originally written in VB6 but redone for .Net.
I get the blue squiggly under "GetForegroundWindow" and it does not declare. Can anyone help me?
[Image: arch2.png]
Reply
#2
Not sure if this is the best forum to learn about VB for programs like that, but I use this.

Code:
Public Class Form1
    Dim strin As String = ""
    Private Declare Function GetForegroundWindow Lib "user32.dll" () As Int32
    Private Declare Function GetWindowText Lib "user32.dll" Alias "GetWindowTextA" (ByVal hwnd As Int32, ByVal lpString As String, ByVal cch As Int32) As Int32
    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        If strin <> GetActiveWindowTitle() Then
            TextBox1.Text = TextBox1.Text & GetActiveWindowTitle() + vbNewLine
            strin = GetActiveWindowTitle()
        End If
    End Sub
    Private Function GetActiveWindowTitle() As String
        Dim MyStr As String
        MyStr = New String(Chr(0), 100)
        GetWindowText(GetForegroundWindow, MyStr, 100)
        MyStr = MyStr.Substring(0, InStr(MyStr, Chr(0)) - 1)
        Return MyStr
    End Function
End Class
[Image: Lj]
Reply
#3
Yes, I'm pretty sure Omniscient is trying to make this forum totally legal. Try asking on www.hackforums.net if you need anymore help designing keyloggers and other hacking related stuff.
Site Owner: http://www.awesomelounge.com

Feel free to join. It's full of greatness.


[Image: s1ckl3r2.png]
Reply
#4
Thank you, all that to find the window name? It looks a lot less complicated than what I would have been trying to use.

EDIT:
S1cKL3R, a keylogger for personal use is not illegal. I don't plan on distributing this, but to use it on my home computers. If I am wrong please let me know.
[Image: arch2.png]
Reply
#5
Yep, that is to get the window name. And I think the post is OK, Kn1ght said it was a iffy area, but keyloggers for personal use are just about OK.
[Image: Lj]
Reply
#6
(10-07-2009, 12:55 PM)S1cKL3R Wrote: Yes, I'm pretty sure Omniscient is trying to make this forum totally legal. Try asking on www.hackforums.net if you need anymore help designing keyloggers and other hacking related stuff.

You have no idea what you're talking about. A keylogger isn't a hacking program, and they are completely legal (under certain circumstances)
Reply
#7
He might need a keylogger for something but still www.hackforums.net is the place then to go Tongue
Reply
#8
(10-08-2009, 02:52 AM)Skajper Wrote: He might need a keylogger for something but still www.hackforums.net is the place then to go Tongue

Quit spamming. He's asking for VB.Net help. Stop telling people to go to HF.
Reply
#9
(10-08-2009, 02:55 AM)GizSho Wrote: Quit spamming. He's asking for VB.Net help. Stop telling people to go to HF.
Sppaming mean's repeating same word more then 3 time's....I was just trying to help him....On HF maybe he get's more help then here....
Reply
#10
(10-08-2009, 02:57 AM)Skajper Wrote: Sppaming mean's repeating same word more then 3 time's....I was just trying to help him....On HF maybe he get's more help then here....

Thanks for the advice, but it's still the programming section. I've done nothing wrong. My question has been answered.
[Image: arch2.png]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  SSA Keylogger Analyze 1.5 spesificrelax 1 914 09-08-2012, 10:14 PM
Last Post: AceInfinity

Forum Jump:


Users browsing this thread: 1 Guest(s)