Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Recording Everything Keystroke

Author
Message
ArcAngel
21
Years of Service
User Offline
Joined: 18th Oct 2003
Location:
Posted: 13th Aug 2004 02:32
Hey I'm trying to make a program that runs unknowningly to the user in the background that records every keystroke. I know File coding well enough to make it, but just the whole process is troubling me. Anyone have any suggestions?

-Strad

"There's a glitch in the Matrix"
"Attack life, your going to die anyway."
"Visit my website! www.freewebs.com/stradigos"
Powersoft
21
Years of Service
User Offline
Joined: 1st Aug 2003
Location: United Kingdom
Posted: 13th Aug 2004 03:29
do
`check for key press
`write ascii (or scancode for better cover) value of key to file
loop


Create or Play? You choose!
ArcAngel
21
Years of Service
User Offline
Joined: 18th Oct 2003
Location:
Posted: 13th Aug 2004 04:09
Can you give a more detailed example? The dark basic help tutorial isn't very helpful.

"There's a glitch in the Matrix"
"Attack life, your going to die anyway."
"Visit my website! www.freewebs.com/stradigos"
Powersoft
21
Years of Service
User Offline
Joined: 1st Aug 2003
Location: United Kingdom
Posted: 13th Aug 2004 04:31 Edited at: 25th Aug 2004 00:05
REMOVED TO BE UNHELPFUL


Scorched Turf --> Project Thread
ArcAngel
21
Years of Service
User Offline
Joined: 18th Oct 2003
Location:
Posted: 13th Aug 2004 09:05
Lol, ok well yes that works, but it also doesn't. I have DB Classic with no enhancements so it won't work. Is there a way around using entry$? I noticed the {} at the end of the command, so that means it's a function. DB told me that The game creators made there own premade functions to make it easier on us. So that leads me to believe that there is a longer way around this problem. Any ideas? Be detailed please.

"There's a glitch in the Matrix"
"Attack life, your going to die anyway."
"Visit my website! www.freewebs.com/stradigos"
Powersoft
21
Years of Service
User Offline
Joined: 1st Aug 2003
Location: United Kingdom
Posted: 13th Aug 2004 22:56
ahh. yes dbpro code


Create or Play? You choose!
SandraD
20
Years of Service
User Offline
Joined: 30th May 2004
Location: Down on the corner, out in the street.
Posted: 13th Aug 2004 23:43
Avoiding entry$() would probably require the older inkey$() function, which returns the ascii values of any key pressed. Then you'd simply relay that to an array, memblock or file as a byte.

inkey$() returns null if no key if pressed though, such that a wait for keystroke is commonly built as;

a$ = ""
loop1:
a$ = inkey$()
if a$ = "" then goto loop1

s.

Any truly great code should be indisguishable from magic.
ArcAngel
21
Years of Service
User Offline
Joined: 18th Oct 2003
Location:
Posted: 14th Aug 2004 02:03
Ok that worked like a charm, I forgot i that I had the enhanced pack for DBC, lol. I want this program to run in the background. Hide Window is what I want to do, but the program kinda halts even though DB says it won't. BTW, this is a Keylogger program. It's records every key pressed. If I don't have the window hid then it records, but when it is hid then it doesn't record and i get these system beeps from the computer.

"There's a glitch in the Matrix"
"Attack life, your going to die anyway."
"Visit my website! www.freewebs.com/stradigos"
Powersoft
21
Years of Service
User Offline
Joined: 1st Aug 2003
Location: United Kingdom
Posted: 14th Aug 2004 02:59
i think the dbpro window requires to have focus... invest in learning c++ or similar


Create or Play? You choose!
ArcAngel
21
Years of Service
User Offline
Joined: 18th Oct 2003
Location:
Posted: 14th Aug 2004 04:45
Ok, i know your trying to help, but your being a bit trouble some dog. I don't want to learn c++ right now, and I do not have DBPro, i thought u had figured that out by now. There has to be something I can do to fix this. If I take out the Hide Window command which makes it so it displays the black screen, Is there a folder in windows where I can put the program in that when it starts up it runs it in the background even with me taking hide window out? The startup folder is the closest I got to that, but it still displays it.

"There's a glitch in the Matrix"
"Attack life, your going to die anyway."
"Visit my website! www.freewebs.com/stradigos"
SandraD
20
Years of Service
User Offline
Joined: 30th May 2004
Location: Down on the corner, out in the street.
Posted: 14th Aug 2004 14:52
Hmm...
The two positions in Windows where you could do that would be in the keyboard driver section and the messaging system, which dark basic doesn't generate the properly formatted files for windows to see it as such. A driver is very specific, which DB doesn't make and seems to make programs that are large enough that the machine would suffer performance if attempted. Otherwise, you have to intercept the windows messaging system for keystrokes passed between programs, meaning adding the application to the message chain. Perhaps possible, but I have no idea how to tell dark basic to make this change from within it. Other than that, the application must have the focus.

Any truly great code should be indisguishable from magic.
ArcAngel
21
Years of Service
User Offline
Joined: 18th Oct 2003
Location:
Posted: 15th Aug 2004 00:19
Sounds out of my league, lol. I'll just have to have it visible to the user. What is all this talk about window focus?

"There's a glitch in the Matrix"
"Attack life, your going to die anyway."
"Visit my website! www.freewebs.com/stradigos"
SandraD
20
Years of Service
User Offline
Joined: 30th May 2004
Location: Down on the corner, out in the street.
Posted: 15th Aug 2004 06:43 Edited at: 15th Aug 2004 06:45
Focus is when the title bar is blue for an application, meaning that windows is sending all activity to that task first. When it's greyed out, a task may continue running, but it's placed into a queue of time sliced operations at some point other than the top. Most of the time, particularly in console operations, only the top task receives keystrokes because it is the first to receive them in the windows message chain.

So for your operation, you have to receive the keystrokes first, then pass them along to any other operation running. This means you have to intercept the position of the user's application getting the messages before you, then continue to pass them along to the rest of the chain.
S
.

Any truly great code should be indisguishable from magic.
BearCDPOLD
21
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 15th Aug 2004 11:51
Sounds like you want a keystroke logger......useful for grabbing passwords and such?

DB is really not fit for stuff like this. There might be a way in DBPro to run in the background, but it requires you to compile it a special way in DBPro. If you want to develop that kind of software you're definitely going to need a lower level language.

Crazy Donut Productions, Current Project: Project Starbuks
Sony stole our name!
Ilya
21
Years of Service
User Offline
Joined: 10th Aug 2003
Location:
Posted: 15th Aug 2004 12:51
Are you making spyware that logs everything a user types?

DBP programs use a LOT of system recorces and are BIG...

-Ilya
Powersoft
21
Years of Service
User Offline
Joined: 1st Aug 2003
Location: United Kingdom
Posted: 15th Aug 2004 17:25
or watching what other people type in your family....


Create or Play? You choose!
Izzy545
21
Years of Service
User Offline
Joined: 18th Feb 2004
Location:
Posted: 16th Aug 2004 00:16
I'm sure it'd be real easy in C++... I mean, I could give it a try
John Y
Synergy Editor Developer
22
Years of Service
User Offline
Joined: 4th Sep 2002
Location: UK
Posted: 16th Aug 2004 05:02
He isn't using DBPro!

I think there is a command called

Set Active On

or something and it allows the db program to continue running even though it doesn't have the focus. Look through the help files

Izzy545
21
Years of Service
User Offline
Joined: 18th Feb 2004
Location:
Posted: 16th Aug 2004 07:25
I'm writing a C++ program for this, and so far I got it taking in the keystrokes, but it's not saving them yet, and the window isn't invisible yet.
ArcAngel
21
Years of Service
User Offline
Joined: 18th Oct 2003
Location:
Posted: 18th Aug 2004 01:19
Ok you got me I'm writing a keylogger trojan. One of the problems I'm having is hidding the program, but also I'm having trouble saving the file. I'm checking to see if the file {disguised to look important} "i87c.txt" exists, which i get that. But I don't want to delete the file so I can keep those files, plus add on to what I have. So far it looks like this:

If File exist{"i87c.txt"}=1
there's where i need help
Else
Open to write 1, "i87c.txt"
Endif

I'll check the set active on thing and i'll get back to u on that. Till then, all help is welcome

"There's a glitch in the Matrix"
"Attack life, your going to die anyway."
"Visit my website! www.freewebs.com/stradigos"
ArcAngel
21
Years of Service
User Offline
Joined: 18th Oct 2003
Location:
Posted: 18th Aug 2004 01:29
Yea, the command is called Always Active on and continues running a program if the window is out of focus. Thats all good and great but people can still see the window, and the program in the taskbar is still visible. I've tried hide window, but it halts the program. I'm gonna go try Always active on and hide window together in a few minutes and again I'll get back to you.

"There's a glitch in the Matrix"
"Attack life, your going to die anyway."
"Visit my website! www.freewebs.com/stradigos"
ArcAngel
21
Years of Service
User Offline
Joined: 18th Oct 2003
Location:
Posted: 20th Aug 2004 05:11
No, it doesn't work. It still halts the whole program, even with active on. I tried the always active on and hide window thing together and seperately and no success. Anyone?

"There's a glitch in the Matrix"
"Attack life, your going to die anyway."
"Visit my website! www.freewebs.com/stradigos"
ArcAngel
21
Years of Service
User Offline
Joined: 18th Oct 2003
Location:
Posted: 24th Aug 2004 06:55
anyone with any ideas? I could use a little help please...

"There's a glitch in the Matrix"
"Attack life, your going to die anyway."
"Visit my website! www.freewebs.com/stradigos"
ArcAngel
21
Years of Service
User Offline
Joined: 18th Oct 2003
Location:
Posted: 25th Aug 2004 01:48
whatever. but this trojan doesn't have evil purposes.

"There's a glitch in the Matrix"
"Attack life, your going to die anyway."
"Visit my website! www.freewebs.com/stradigos"

Login to post a reply

Server time is: 2025-05-25 10:09:50
Your offset time is: 2025-05-25 10:09:50