Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to realize remote sending of screenshot Keyboard record by Python Code

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article shows you how Python code can achieve screenshot keylogger remote transmission. The content is concise and easy to understand. It will definitely make your eyes shine. I hope you can learn something from the detailed introduction of this article.

These days, the number thieves are never poor, either taking off their pants or social workers fishing. Today, we will use the previous several technical articles as a foreshadowing to talk about the principle of python hacking (learning purposes, do not use it for illegal crimes). Only by knowing yourself and knowing your enemy can you win every battle.

We won't mention it more when we take off our pants. It's nothing more than sql injection caused by lax filtering, or unsafe database storage. The simplest and relatively low-tech way to steal numbers is phishing (of course, social workers test psychology more). In addition to phishing websites, it is to publish certain tempting tools to induce consumers to download, open backdoors after running, or enable hooks for keyboard logging. In this article, we will talk about the realization of technology.

Environment topology:

Operating system: windows 7

Python version: 2.7.14

Main libraries/modules: smtplib/pyHook/PIL/pythoncom, etc.

Design Idea:

1. Enable Hook to monitor keyboard (mouse coordinates can also be monitored, which is not the focus of this lesson)

2. Get title tag/title content (e.g. new text document)

3. Set sensitive titles (this is important, we only need to record specific sensitive titles, otherwise it will be confusing to record keyboard values from the beginning)

4. Find sensitive titles (similar to QQ mailbox, Weibo, League of Legends and other web page titles)

5. Record the title after finding it, and send a screenshot when the user presses Enter or Tab.

Key Functions/Methods:

.find() Search for keywords

time.strftime('%Y%m%d%H%M%S',time.localtime(time.time()))

ImageGrab.grab() Screenshot

hm = pyHook.HookManager() Create hook

Note: To judge the return space and delete the Tab key, you can compare it with the ascii code table to judge

(keyboard ascii comparison table)

So, after we've done our thinking, we'll start with the code.

Code implementation:

Library modules used

(Used class libraries)

*** Section: Send mail section

(Mail sending code)

Note: Screenshot function is described below, this is only the process

Part 2: Set key trigger event

(Key screenshot)

(Start function)

After completing everything above, we can test it. Let's first open Netease mailbox to test the effect ~

(Start)

This is the startup effect, of course, you can remove these debug tips, I am to test easy to use, so there will be black box display under CMD, this is not as difficult.

We open Netease 163 login, the following is the background debug display, that is, the running effect of our program.

(background display)

Let's see what we received in our mailbox:

So that's how Python code does screenshots, keyloggers, and remote delivery. Have you learned anything? If you want to learn more skills or enrich your knowledge reserves, please pay attention to the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report