funcaptcha 验证码2 通过记录
**
**
问题 点击相同图标的格子 大概这个意思 验证码图片大概如下
如何解决?
训练模型计算目标位置
识别正确的
识别失败的
注:
这个系列的产品好像都是如下:
1 响应失败
2 响应成功
3 每个站点不一样 错了会越来越多验证码让你点 全部正确才会响应成功
4 省略…
最后使用代码验证:
由于模型训练的轮数和训练的数据有些脏 成功率不是很高!
代码如下:
class funcaptcha2:
def __init__(self, email, phoneNum, oldPassword, email_passwd, newPassword):
pass
def main(self):
pass
import random
def generate_trajectory(start_x, start_y, end_x, end_y, duration, num_points):
trajectory = []
# 计算时间间隔
time_step = duration / (num_points - 1)
# 生成轨迹点
for i in range(num_points):
# 计算时间戳
timestamp = i * time_step
# 判断是否是最后两个点
if i == num_points - 2:
point_type = 1
elif i == num_points - 1:
point_type = 2
else:
point_type = 0
# 生成随机坐标
if i == num_points - 2 or i == num_points - 1:
x = end_x
y = end_y
else:
x = random.randint(min(start_x, end_x), max(start_x, end_x))
y = random.randint(min(start_y, end_y), max(start_y, end_y))
point = {"timestamp": timestamp, "type": point_type, "x": x, "y": y}
trajectory.append(point)
return trajectory
# 设置起点、终点、持续时间和轨迹点数
start_x = 6
start_y = 192
end_x = 50
end_y = 157
duration = 10000 # 持续时间(毫秒)
num_points = 100 # 轨迹点数
# 生成轨迹
trajectory = generate_trajectory(start_x, start_y, end_x, end_y, duration, num_points)
# 打印生成的轨迹
for point in trajectory:
print(point)