Nowadays, there are many people who steal names. They are either gang members or social workers fishing. Today, let’s use the previous technical articles as a foreshadowing to talk about the principle of Python pilfering (learning purpose, please don’t use it for illegal crime). Only knowing one’s own and knowing the other can win all battles.
Operating system: windows7
Python version: 2.7.14
Main libraries / modules: smtplib / pyhook / PIL / python, etc
1. Enable hook to monitor the keyboard (of course, mouse coordinates can also be monitored, which is not the focus of this lesson)
2. Get the title tag / Title Content (for example: new text document)
3. Set sensitive titles (this is very important, we only need to record specific sensitive titles, otherwise it will be messy to record keyboard values from the beginning)
4. Find sensitive titles (similar to the titles of QQ email, Weibo, hero League, etc.)
5. Record after finding the title, and send the screenshot when the user presses enter or tab
Key functions / METHODS:
. find() to find keywords
time.strftime (‘%Y%m%d%H%M%S’, time.localtime ( time.time ()) time point
ImageGrab.grab () screenshot
hm = pyHook.HookManager () create hook
Note: to judge the carriage return space deletion tab key, refer to ASCII code table
(keyboard ASCII comparison table)
After finishing the thought foreshadowing in the early stage, we will start the code part.
Code implementation: library module used
(class library used)
Part I: sending mail
Note: the screenshot function is described below, this is just the process
Part 2: setting key trigger events
(screenshot of key)
After finishing all the above, we can test it. First, we can open Netease email to test the effect~
This is the startup effect. Of course, you can get rid of all these debugging tips. I’m running under the CMD to test it well. So there will be a black box display. This is not a difficulty.
We open 163 of Netease to log in. The following is the background debug display, which is the running effect of our program.
Let’s see what we received in our email:
Well, that’s what we’re going to do today. I have a lot of interesting case projects. No matter you are for Python employment or hobbies, remember: project development experience is always the core. If you lack new project practice or Python intensive tutorial, you can go to small-scale Python exchange. Skirt: seven clothes, nine seven bars and five (Digital homophony) can be found under conversion. Many new tutorial projects can also be exchanged with old drivers for advice!
The text and pictures of this article come from the Internet and my own ideas. They are only for learning and communication. They have no commercial use. The copyright belongs to the original author. If you have any questions, please contact us in time for handling.