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 Information bombardment by python

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

Share

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

This article mainly introduces python how to achieve information bombing, the article is very detailed, has a certain reference value, interested friends must read it!

Simple information bombing

There are many ways for Python to control input devices, and we can use win32 or pynput modules. We can achieve the effect of information bombardment through a simple loop operation. Here, taking pynput as an example, we need to install the module first:

Pip install-I https://pypi.tuna.tsinghua.edu.cn/simple/ pynput

We need to manually get the coordinates of the input box before writing the code:

From pynput import mouse# create a mouse m_mouse = mouse.Controller () # output mouse position print (m_mouse.position)

There may be a more efficient way, but I won't.

After we get it, we can record this coordinate, and don't move the message window. Then we execute the following code and switch the window to the message page:

Import timefrom pynput import mouse, keyboardtime.sleep (5) m_mouse = mouse.Controller () # create a mouse m_keyboard = keyboard.Controller () # create a keyboard m_mouse.position = 670) # move the mouse to the specified location m_mouse.click (mouse.Button.left) # Click the left mouse button while (True): m_keyboard.type ('Hello') # typing m_keyboard.press (keyboard.Key.enter) # Press enter m_keyboard.release (keyboard.Key.enter) # release enter time.sleep More than half a second is all the content of the article "how to achieve Information bombardment by python" Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow 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