This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-05-20 17:04:50

GameHutSoftware
Scratcher
Registered: 2010-04-24
Posts: 1000+

How to record ALL keystrokes with VB.NET?

Hi. I'm making a keystroke logger, and I've run into a problem. The program will only record keystrokes that were entered into a textbox.

Code:

Private Sub Control_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox3.KeyPress

This only records keystrokes entered into TextBox3. I need to record all of them typed into any program.


Lurking more than posting, but still here.

Offline

 

#2 2012-05-20 17:09:20

veggieman001
Scratcher
Registered: 2010-02-20
Posts: 1000+

Re: How to record ALL keystrokes with VB.NET?

Why are you making a keystroke logger :I


Posts: 20000 - Show all posts

Offline

 

#3 2012-05-20 17:15:43

GameHutSoftware
Scratcher
Registered: 2010-04-24
Posts: 1000+

Re: How to record ALL keystrokes with VB.NET?

veggieman001 wrote:

Why are you making a keystroke logger :I

...reasons


Lurking more than posting, but still here.

Offline

 

#4 2012-05-20 17:26:07

rememberchicken
Scratcher
Registered: 2011-06-18
Posts: 500+

Re: How to record ALL keystrokes with VB.NET?

This is not the forum to post this on. This one is for books and game talk.


Hello.....

Offline

 

#5 2012-05-20 17:34:00

GameHutSoftware
Scratcher
Registered: 2010-04-24
Posts: 1000+

Re: How to record ALL keystrokes with VB.NET?

rememberchicken wrote:

This is not the forum to post this on. This one is for books and game talk.

Whoops, sorry. Wasn't thinking when I posted.


Lurking more than posting, but still here.

Offline

 

#6 2012-05-20 17:51:48

Lucario621
Community Moderator
Registered: 2007-10-03
Posts: 1000+

Re: How to record ALL keystrokes with VB.NET?

GameHutSoftware wrote:

rememberchicken wrote:

This is not the forum to post this on. This one is for books and game talk.

Whoops, sorry. Wasn't thinking when I posted.

OK, I moved it.  smile


http://i.imgur.com/WBkM2QQ.png

Offline

 

#7 2012-05-20 19:58:06

jji7skyline
Scratcher
Registered: 2010-03-08
Posts: 1000+

Re: How to record ALL keystrokes with VB.NET?

I don't think making a key logger is a good idea... especially in America.


I don't know why you say goodbye, I say hello!  big_smile

Offline

 

#8 2012-05-20 20:13:09

veggieman001
Scratcher
Registered: 2010-02-20
Posts: 1000+

Re: How to record ALL keystrokes with VB.NET?

jji7skyline wrote:

I don't think making a key logger is a good idea... especially in America.

Why specifically not in America?


Posts: 20000 - Show all posts

Offline

 

#9 2012-05-20 20:49:51

jji7skyline
Scratcher
Registered: 2010-03-08
Posts: 1000+

Re: How to record ALL keystrokes with VB.NET?

veggieman001 wrote:

jji7skyline wrote:

I don't think making a key logger is a good idea... especially in America.

Why specifically not in America?

You know... FBI might find out and things like that. You're more likely to get busted than say Russia or Nigeria.


I don't know why you say goodbye, I say hello!  big_smile

Offline

 

#10 2012-05-20 21:08:33

veggieman001
Scratcher
Registered: 2010-02-20
Posts: 1000+

Re: How to record ALL keystrokes with VB.NET?

jji7skyline wrote:

veggieman001 wrote:

jji7skyline wrote:

I don't think making a key logger is a good idea... especially in America.

Why specifically not in America?

You know... FBI might find out and things like that. You're more likely to get busted than say Russia or Nigeria.

I'd say you were more likely to get busted in Russia, actually.


Posts: 20000 - Show all posts

Offline

 

#11 2012-05-20 21:17:36

technoguyx
Scratcher
Registered: 2008-10-18
Posts: 1000+

Re: How to record ALL keystrokes with VB.NET?

I don't know anything about VB.NET (whatever that is. A programming language I suppose, but I've never heard of it), but obviously you shouldn't need a TextBox to write into if you want to record keystrokes that don't input data into your (potentially malicious) program.


http://getgnulinux.org/links/en/linuxliberated_4_78x116.png

Offline

 

#12 2012-05-20 21:31:28

jji7skyline
Scratcher
Registered: 2010-03-08
Posts: 1000+

Re: How to record ALL keystrokes with VB.NET?

veggieman001 wrote:

jji7skyline wrote:

veggieman001 wrote:

Why specifically not in America?

You know... FBI might find out and things like that. You're more likely to get busted than say Russia or Nigeria.

I'd say you were more likely to get busted in Russia, actually.

Hm... well I've noticed that there are lots of hackers based in Russia, so I assumed that  tongue


I don't know why you say goodbye, I say hello!  big_smile

Offline

 

#13 2012-05-20 22:16:24

GameHutSoftware
Scratcher
Registered: 2010-04-24
Posts: 1000+

Re: How to record ALL keystrokes with VB.NET?

Guys, it's completely legal. They're mainly used for security purposes, like to make sure an employee isn't writing viruses, and the government uses them to watch suspected criminals.


technoguyx wrote:

I don't know anything about VB.NET (whatever that is. A programming language I suppose, but I've never heard of it), but obviously you shouldn't need a TextBox to write into if you want to record keystrokes that don't input data into your (potentially malicious) program.

Writing into that text box was for testing purposes.

Last edited by GameHutSoftware (2012-05-20 22:19:01)


Lurking more than posting, but still here.

Offline

 

#14 2012-05-20 22:21:10

stevetheipad
Scratcher
Registered: 2011-08-06
Posts: 1000+

Re: How to record ALL keystrokes with VB.NET?

GameHutSoftware wrote:

They're mainly used for security purposes, like to make sure an employee isn't writing viruses, and the government uses them to watch suspected criminals.

*Ahem* Assumption *Ahem*


http://i.imgur.com/0x8ia.jpg
gone

Offline

 

#15 2012-05-20 22:25:12

GameHutSoftware
Scratcher
Registered: 2010-04-24
Posts: 1000+

Re: How to record ALL keystrokes with VB.NET?

stevetheipad wrote:

GameHutSoftware wrote:

They're mainly used for security purposes, like to make sure an employee isn't writing viruses, and the government uses them to watch suspected criminals.

*Ahem* Assumption *Ahem*

I've read articles about this sort of thing in Popular Mechanics.


Lurking more than posting, but still here.

Offline

 

#16 2012-05-20 22:52:22

jji7skyline
Scratcher
Registered: 2010-03-08
Posts: 1000+

Re: How to record ALL keystrokes with VB.NET?

Well, it's a known fact that most governments use hackers and malware to do things that they want done.


I don't know why you say goodbye, I say hello!  big_smile

Offline

 

#17 2012-05-20 23:02:06

GameHutSoftware
Scratcher
Registered: 2010-04-24
Posts: 1000+

Re: How to record ALL keystrokes with VB.NET?

Let's not make this political, guys. I just want the answer.


Lurking more than posting, but still here.

Offline

 

#18 2012-05-20 23:34:49

cheddargirl
Scratch Team
Registered: 2008-09-15
Posts: 1000+

Re: How to record ALL keystrokes with VB.NET?

I'm not really familiar with writing a keylogger in VB, but I guess you could take a look at some open source code for VB.NET keylogger programs for ideas? There's a lot of them floating out there on the web.


http://i.imgur.com/8QRYx.png
Everything is better when you add a little cheddar, because when you have cheese your life is at ease  smile

Offline

 

#19 2012-05-21 10:08:19

what-the
Scratcher
Registered: 2009-10-04
Posts: 1000+

Re: How to record ALL keystrokes with VB.NET?

I made one before. It has the ability to capture which key but I just used it to make a graph of how many keys I press each day. No I'm not going to post the source code on a public forum.

What I will show is

GetAsyncKeyState(Cnt) <> 0

That should get you started.


http://imageshack.us/m/64/9034/ddfss.pngMy site
Find someone post count. Click posts under username. Find number of pages. Times that by 40 for min and 60 for max and you have a rough estimate of post count.

Offline

 

#20 2012-05-21 11:25:58

GameHutSoftware
Scratcher
Registered: 2010-04-24
Posts: 1000+

Re: How to record ALL keystrokes with VB.NET?

what-the wrote:

I made one before. It has the ability to capture which key but I just used it to make a graph of how many keys I press each day. No I'm not going to post the source code on a public forum.

What I will show is

GetAsyncKeyState(Cnt) <> 0

That should get you started.

Can you just give me the source? You can change any private info, I just need to know how to use it.

Last edited by GameHutSoftware (2012-05-21 11:26:22)


Lurking more than posting, but still here.

Offline

 

#21 2012-05-21 17:19:08

RedRocker227
Scratcher
Registered: 2011-10-26
Posts: 1000+

Re: How to record ALL keystrokes with VB.NET?

I think the reason he isn't posting it is because even if you're not gonna use it for illegal purposes, anyone else who sees it could (right?). Unless you give him your email or something.


Why

Offline

 

#22 2012-05-21 17:29:32

GameHutSoftware
Scratcher
Registered: 2010-04-24
Posts: 1000+

Re: How to record ALL keystrokes with VB.NET?

GameHutSoftware wrote:

what-the wrote:

I made one before. It has the ability to capture which key but I just used it to make a graph of how many keys I press each day. No I'm not going to post the source code on a public forum.

What I will show is

GetAsyncKeyState(Cnt) <> 0

That should get you started.

Can you just give me the source? You can change any private info, I just need to know how to use it.

You also delete it after I see it.


Lurking more than posting, but still here.

Offline

 

#23 2012-05-21 17:40:09

16Skittles
Scratcher
Registered: 2009-08-26
Posts: 1000+

Re: How to record ALL keystrokes with VB.NET?

veggieman001 wrote:

jji7skyline wrote:

veggieman001 wrote:


Why specifically not in America?

You know... FBI might find out and things like that. You're more likely to get busted than say Russia or Nigeria.

I'd say you were more likely to get busted in Russia, actually.

But you're more likely to get arrested for no reason in the U.S.  tongue

When I saw the title I thought "Sounds like he's making a keylogger" and then I saw "I am trying to make a keystroke logger"

iWin!  tongue


http://16skittles.tk/sig.png
Are you a student? Check out OnSchedule!

Offline

 

#24 2012-05-21 17:55:27

Daffy22
Scratcher
Registered: 2008-12-15
Posts: 500+

Re: How to record ALL keystrokes with VB.NET?

Put what-the's code in a timer tick event:
For i = 1 To 255
Dim key as Integer = GetAsyncKeyState(I)
Next

You also need to include this line so that it knows what code to look for:
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Put this somewhere in the form class between functions and stuff.

I havent tested any of this but if you need any more help let me know  wink


http://img201.imageshack.us/img201/1784/logosmalle.png
"Spectacular - 5 Star" -  CNET.com Editor.

Offline

 

#25 2012-05-21 18:08:31

GameHutSoftware
Scratcher
Registered: 2010-04-24
Posts: 1000+

Re: How to record ALL keystrokes with VB.NET?

Daffy22 wrote:

Put what-the's code in a timer tick event:
For i = 1 To 255
Dim key as Integer = GetAsyncKeyState(I)
Next

You also need to include this line so that it knows what code to look for:
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Put this somewhere in the form class between functions and stuff.

I havent tested any of this but if you need any more help let me know  wink

Stupid exception wrote:

GetAsyncKeyState' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature.


Lurking more than posting, but still here.

Offline

 

Board footer