https://github.com/BinZoom/sv-cracker
滑块验证码破解,通过使用 cv2 + numpy 分析滑块背景图片并计算所需滑动的距离,使用 PID 控制算法生成轨迹,使用 Selenium 模拟手工拖动滑块行为。
https://github.com/BinZoom/sv-cracker
numpy opencv pid python selenium spider
Last synced: 10 months ago
JSON representation
滑块验证码破解,通过使用 cv2 + numpy 分析滑块背景图片并计算所需滑动的距离,使用 PID 控制算法生成轨迹,使用 Selenium 模拟手工拖动滑块行为。
- Host: GitHub
- URL: https://github.com/BinZoom/sv-cracker
- Owner: BinZoom
- License: mit
- Created: 2022-04-06T07:44:32.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-07-07T08:34:59.000Z (almost 3 years ago)
- Last Synced: 2024-05-10T19:28:46.210Z (about 2 years ago)
- Topics: numpy, opencv, pid, python, selenium, spider
- Language: Python
- Homepage:
- Size: 885 KB
- Stars: 26
- Watchers: 2
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sv-cracker
Using cv2 and numpy to analyze the background image of the slider and calculate the sliding distance, using PID algorithm to generate trajectories, and using Selenium simulation to manually drag the slider to crack the verification code.

## Install
1. Install dependencies:
```bash
pip install -r requirements.txt
```
2. Install chrome and chromedriver
## About PID
PID (Proportional-Integral-Derivative) algorithm is a commonly used control algorithm, mainly used for automatic control of various systems and processes. It is based on the feedback information of the current state of the system, and determines the size and direction of the controller output by calculating the proportional, integral and derivative parts of the grating signal, thereby achieving stable control of the system.
The PID algorithm consists of three parts:
- Proportional control (P): Based on the size of the current error signal, a control output proportional to the error is directly generated to quickly respond to system changes.
- Integral control (I): The error signal is accumulated over a period of time and a control output proportional to the integral value of the error is generated to eliminate the static error of the system.
- Derivative control (D): Based on the rate of change of the error signal, a control output proportional to the rate of change of the error is generated to reduce the overshoot and oscillation of the system.
These three control parts work together on the system so that the value output by the controller can follow the changes of the system in a timely and accurate manner, thereby achieving precise control of the system.
### Declaration
This repository is for learning and research purposes only, and is strictly prohibited from being used for illegal, irregular, or infringing activities. Users shall bear all responsibilities arising from the use of the code on their own.