I have been doing a keyloger (for personal use) and I do not understand why it does not capture all the keys I press, taking into account that there are keys that are kept pressed for several seconds in a row, I would like to see where I am going wrong. Thank you in advance.
PS: I think I can't upload the file where the code is. (I'm new to programming)
#š Hello, I need help
100 messages Ā· Page 1 of 1 (latest)
@short ibex
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
Closes after a period of inactivity, or when you send !close.
for future helpers I would not help with this.
the "for personal use" part gives away the fact that it' gonna be used maliciously imo
Thatās nice
there are very few practical uses for making a "personal key-logger" so i agree with user here, but these are just speculations, OP can further argue if it really is for personal use
I would use it for beneficial reasons my self.
What keys is it not capturing.
Considering that OP is new to programming, then clearly the level of code in that screenshot is AI generated. I will not be fixing whatever AI coded garbage. Learn programming first and then come back with a more sensible beginner project to work on
!resources has great beginner level materials
Resources
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
not to mention it looks like there are thousands of lines, which is pretty uncommon when you're new to programming
I could easily help you fix this. With just 2 or 3 lines.
i would advise against it
He screenshots the first part because he knows thatās where the problem is.
I was making that point clear because the program will basically be used on an ESP32. only when I put it running, they don't recognize all the keys.
it clearly isnt the purpose of the screenshot? and i doubt the cause of the issue is there
Mhm.
Then why not screenshot the full code when you say there is potentially more.
Because how else could we know the problem when there isnāt much to work with.
how would you screenshot 1000+ lines..?
what're you using to write files to use esp32?
"PS: I think I can't upload the file where the code is. (I'm new to programming)"
You donāt.
If you guys are unsure, dm @alpine osprey to ask the moderators without pinging them about whether or not this question is deemed appropriate or not.
!rule 5
Instead of polluting this chat and arguing.
5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.
Why donāt they just give me the code I can help.
Because of this server's rule 5.
āļø
Dang it. @gritty canopy
(Sorry @serene jolt for the wrong ping š¦ )
if you wanna help them, help them, but i'm not
@short ibex do you know what the problem could potentially be.
Also what keys arenāt getting logged.
It doesn't capture multiple keys, for example I press the D-keys and then let's say I press any other key (let's say the A key and then the C key while still pressing the D-key) almost all of that event is not captured.
That makes sense.
Youāre using the keyboard model. You would need to add new code for multiple keys to be registered at the same time. If you havenāt already done that?
visual studio code.
i mean are you using a usb
? What is it.
bc those have microusb ports
Mmh.
!rule 5 ... basically don't help on a question if it can be deemed inappropriate/malicious.
5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.
Itās fine I think.
whether its fine or not i dont think is up to you
I don't know what that code would be. Let me find one.
sure, but that's not really your choice to make, dm @alpine osprey if you're unsure
Ok I will do if Iām unsure.
yes
@short ibex so if Iām holding d and pressing c it should do d and c but instead it dose d and ignore c
@short ibex you would need to implement a while loop. I think Iām not sure because I canāt see your code.
In theory you need to check the key states not just the single key event.
Maybe, but I don't know how to explain it exactly.
Ok so if I press d and then let go of the d key and then press c what should happen and what dose happen?
Can I send you private?
Sure
fyi that's also considered suspicious as this server has a sorta strict-ish policy on no-dms
pretty sure that isnt allowed, could be wrong tho
The correct thing should be that the two keys are used simultaneously, but I don't understand why it happens that it doesn't, that it only registers the last key.
!paste Bt-dubs, you can paste code with the link below
Pasting large amounts of code
If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.
Mhm. Thatās actually confusing.
So if I press d and then let go of the d key and then I press c what does happen? Does it work as intended. Letās just get this part dealt with first @short ibex
If the keys are used one by one it works almost normally, but if you use two or more keys it gets confused. and it doesn't record what it should record
Ah ok I get it now.
Yea thatās likely because they are indeed being checked simultaneously.
I'm trying to upload the codes to where he told me to go up.
Is that a good idea?
You need to continually check the key states.
That code does seem very AI.
this really sounds suspicious, putting a keylogger on a esp32...
so that it can be connected between a computer and a keyboard and log all the key strokes?
And that too.
That should be the whole code, but I still don't understand why I get that error, or is it because I do it for an SP32, I have no idea what happens, I'm still new to this š¦
Thanks.
Thatās fineā¦
Iāll try to tell you.
Can we go private.
sloppy AI code is near impossible to debug, but hey, im not stopping you
did you not read this?
#1370406576048967822 message
Ok. I can pick out the main parts I think I know the issue so it should be easy to locate.
okay great? dont see any reason to go into dms
@short ibex do you know anything about serial1 in your code?
fyi no 2, it's harder to moderate something if you're in dms, so please try your best to stay in here.
I think I should leave the subject as a finish, since many people think that this cannot be used by oneself or for oneself, thank you all for responding so soon. thanks a lot
They donāt need to keep track of everything that ruins our privacy.
It's not about ruining privacy, it's just a matter of safety and regulation.
Thatās ok.
They donāt need to know what goes on my end. Thatās up to me and @short ibex
The same program in the hands of different people can have drastically different outcomes. So if you do end up helping someone with malicious intent finish up their malicious code, then nobody will be able to stop you if you're in a dm.
whats so difficult with following rules? and if I remember correctly, werent you banned from this server for a week like over a month ago?
Thatās true.
I canāt remember it was probably longer.
I donāt remember you to be honest.
We're not trying to ruin your privacy. If you want to have a casual convo with them in a DM, that's ok. But when it comes to helping someone with their code, it's best to keep it here.
Any way this is actually a very fun problem. Iāll be working on it my self and donāt worry I wonāt be using it for any malicious purposes.
if you can build something malicious yourself without any help, no one will really know unless you tell anyone about it and no one will really be able to stop you either, but people that can't do it them selves maybe shouldn't be doing it at all
Oki. Thatās a good point bro.
This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.