中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當(dāng)前位置: 首頁 > news >正文

網(wǎng)站接單做項目代做百度首頁排名

網(wǎng)站接單做項目,代做百度首頁排名,簡述建設(shè)一個網(wǎng)站的一般過程,優(yōu)化wordpress訪問速度Selenium操作Web頁面 Why? 通常情況下,網(wǎng)絡(luò)安全相關(guān)領(lǐng)域,更多是偏重于協(xié)議和通信。但是,如果協(xié)議通信過程被加密或者無法了解其協(xié)議構(gòu)成,是無法直接通過協(xié)議進行處理。此時,可以考慮模擬UI操作,進而實現(xiàn)相…

Selenium操作Web頁面

Why?

  1. 通常情況下,網(wǎng)絡(luò)安全相關(guān)領(lǐng)域,更多是偏重于協(xié)議和通信。
  2. 但是,如果協(xié)議通信過程被加密或者無法了解其協(xié)議構(gòu)成,是無法直接通過協(xié)議進行處理。此時,可以考慮模擬UI操作,進而實現(xiàn)相對應(yīng)的部分功能。

原理

  1. 運行被操作的程序,使其界面出現(xiàn)
  2. 找到被操作的界面元素
    1. 基于元素的特征進行識別
    2. 圖像識別和對比
    3. opencv
  3. 對其進行操作:輸入、單擊、右鍵等
  4. 對操作后的結(jié)果進行驗證,確認(rèn)操作是成功的
  5. Selenium Webdriver的通信機制:Python模擬客戶端發(fā)送HTTP請求給WebDriver,WebDriver再驅(qū)動瀏覽器去執(zhí)行

基于Selenium實現(xiàn)dvwa_ui

問題:

  1. 運行代碼后打開網(wǎng)頁閃退
  2. 解決方法:
    1. selenium版本回退到4.1.1
pip uninstall selenium			# 卸載已安裝版本
pip install selenium==4.1.1		# 安裝指定版本

tips:

  1. 如果要操作windows元素,則可以使用庫uiautomation
  2. 如果要處理移動端,可以使用庫Appium-Python-Client
  3. scapy,比socket更加底層的框架
from selenium import webdriver
import time
# 第一步,先實例化webdriver對象,用于初始化瀏覽器操作
# 默認(rèn)情況下,建議將chromedriver.exe等放在PATH環(huán)境變量的某個目錄中,否則需要在參數(shù)中指定execute_path='C:/xxx/xxx.exe'
# driver = webdriver.Chrome(executable_path='C:/chromedriver.exe')
driver = webdriver.Chrome()
# 使用火狐
# driver=webdriver.Firefox()
# 最大化瀏覽器窗口
driver.maximize_window()
time.sleep(2)
# 打印網(wǎng)頁標(biāo)題
print(driver.title)
# 打印網(wǎng)頁源碼
print(driver.page_source)
# 刷新
driver.refresh()
# 后退
driver.back()
# 前進
driver.forward()
# 獲取對應(yīng)的所有cookie
driver.get_cookies()
# 添加cookie
# 關(guān)閉瀏覽器窗口# 訪問目標(biāo)網(wǎng)站的頁面地址
url="http://www.myfsec.com/login.php"
driver.get(url)# 第二步:利用DOM的識別機制,去識別和操作頁面元素
# 舊方法,將棄用
# driver.find_element_by_name('username').send_keys('admin')
# driver.find_element_by_name('password').send_keys('password')driver.find_element('name','username').send_keys('admin')
driver.find_element('name','password').send_keys('password')# 將棄用
# 根據(jù)xpath與css選擇器定位元素
# driver.find_element_by_xpath("//input[@id='verifycode']").secd_keys('0000')
# driver.find_element_by_xpath('//*[@id="content"]/form/fieldset/p/input').click()
# driver.find_element_by_css_selector("#content > form > fieldset > p > input[type=submit]")
# 推薦使用
# driver.find_element('xpath',"//*[@id='content']/form/fieldset/p/input").click()
driver.find_element('css selector',"#content > form > fieldset > p > input[type=submit]").click()
# # 打印網(wǎng)頁標(biāo)題
# print(driver.title)
# # 打印網(wǎng)頁源碼
# print(driver.page_source)# 判斷是否登陸成功,可以看網(wǎng)頁中的某個元素是否存在
try:driver.find_element("id","main_body")print("登陸成功")
except:print("登陸失敗")# 或者
if "Welcome to Damn Vulnerable Web Application!" in driver.page_source:print("登陸成功")
else:print("登陸失敗")
driver.close()

chromdriver驅(qū)動下載:(谷歌)

  1. 114之前版本:
    1. chromedriver.storage.googleapis.com/index.html
  2. 125以后版本
    1. Chrome for Testing availability (googlechromelabs.github.io)

geckodriver驅(qū)動下載(火狐)

發(fā)布 ·Mozilla/GeckoDriver (github.com)

補充,selenium操作windows–UIAutomation

其實使用selenium操作windows窗口最主要的的是像瀏覽器的F12一樣,識別他的布局結(jié)構(gòu),從而獲取相應(yīng)的元素進行操作,因此我們需要用到一個工具:UISpy

在這里插入圖片描述

例如:驅(qū)動windows下的wechat

在這里插入圖片描述

import uiautomation,time
def get_moment_list(moment):moment_list=moment.ListControl(Name="朋友圈").GetChildren()# 獲取朋友圈列表,目前只能獲取看到的前幾條,后面的需要滾動條滾動才能獲取,滾動還沒實現(xiàn)return moment_list
# 定位到朋友圈框
def locate_wechat_moment():wechat=uiautomation.WindowControl(Name="微信")        # 加載微信框wechat.ButtonControl(Name="朋友圈").Click()            # 點擊朋友圈按鈕# time.sleep(1)                                           # 等待1秒moment=uiautomation.WindowControl(Name="朋友圈")        # 加載朋友圈框moment.ButtonControl(Name="刷新").Click()              # 點擊刷新按鈕moment_list=get_moment_list(moment)[1:]print(len(moment_list))moment.WheelDown(wheelTimes=12, interval=0.1, waitTime=0.5)close_moment_btn=moment.ButtonControl(Name="關(guān)閉")close_location=close_moment_btn.BoundingRectangleprint(close_location)while True:moment_list=get_moment_list(moment)moment_bottom=moment.BoundingRectangleprint(moment_bottom)for friend in moment_list:friend_bottom=friend.BoundingRectangleprint(friend_bottom)print(friend.Name)try:if friend_bottom.bottom<40:passelse:friend.ButtonControl(Name="評論").Click()    # 點擊評論按鈕,目的是為了顯示出點贊按鈕moment.ButtonControl(Name="取消").Click()       # 點擊贊按鈕print("點贊成功")except:print("點贊失敗")finally:y=friend.BoundingRectangle.bottomprint(y)moment_list=get_moment_list(moment)moment.WheelDown(wheelTimes=y//20, interval=0.1, waitTime=0.5)if __name__ == '__main__':locate_wechat_moment()

驗證碼問題

  1. 短信驗證碼:用自己的手機獲取驗證碼,然后用Python直接操作手機端提取驗證碼,進而實現(xiàn)自動化操作的目的。
  2. 圖像驗證碼:靜態(tài)和動態(tài),靜態(tài)的圖片驗證碼,在沒有AI之前利用打碼平臺進行識別或人工智能訓(xùn)練集進行處理,而對于動態(tài)類型驗證碼,比如圖像滑動
  3. 機器學(xué)習(xí)
    1. 可處理的類型:文字、圖片、視頻、語音
    2. 怎么進行學(xué)習(xí)?CNN:卷積神經(jīng)網(wǎng)絡(luò)
      1. 安裝庫tensorflow.keras.models…
    3. 學(xué)習(xí)數(shù)據(jù)必須要有正確的標(biāo)記:圖片和正確答案,
    4. 網(wǎng)絡(luò)安全的AI應(yīng)用:入侵檢測,
      1. 傳統(tǒng)的入侵檢測:基于特征,某個流量或請求存在一些可以的特征時,進行預(yù)警或防護
      2. 基于AI的入侵檢測:基于機器學(xué)習(xí),學(xué)習(xí)大量的正確的數(shù)據(jù)包和請求,一旦發(fā)現(xiàn)某個數(shù)據(jù)包與某個學(xué)習(xí)過的匹配度很低,則可疑
http://www.risenshineclean.com/news/3303.html

相關(guān)文章:

  • 珠海網(wǎng)站制作費用營銷策劃方案案例范文
  • 公司電子商務(wù)網(wǎng)站建設(shè)規(guī)劃方案百度一下首頁網(wǎng)址
  • 寧波外貿(mào)推廣網(wǎng)絡(luò)營銷北京seo運營推廣
  • 網(wǎng)站建設(shè)多少錢杭州百度搜索引擎廣告
  • 深圳網(wǎng)絡(luò)??凭W(wǎng)站建設(shè)新網(wǎng)站seo
  • 如何做網(wǎng)站賭博的教程seo百科大全
  • 黃驊港河南智能seo快速排名軟件
  • 設(shè)計旅游網(wǎng)站的主色調(diào)百度指數(shù)搜索指數(shù)的數(shù)據(jù)來源
  • 建外貿(mào)營銷型網(wǎng)站新聞發(fā)布平臺有哪些
  • 代運營網(wǎng)站如何規(guī)劃企業(yè)網(wǎng)絡(luò)推廣方案
  • 電商網(wǎng)站的支付模塊怎么做河南省鄭州市金水區(qū)
  • 典型網(wǎng)站建設(shè)百度應(yīng)用市場
  • 視頻網(wǎng)站中滑動列表怎么做的網(wǎng)站推廣的基本方法有哪些
  • 廣州企業(yè)網(wǎng)站制作哪家好搜索引擎營銷推廣
  • 如何在各大網(wǎng)站發(fā)布信息公關(guān)公司排名
  • 阿里云虛擬主機怎么建設(shè)網(wǎng)站seopeix
  • 王也壁紙關(guān)鍵詞排名優(yōu)化易下拉霸屏
  • 郴州市網(wǎng)站建設(shè)科技汕頭seo全網(wǎng)營銷
  • wordpress 音樂下載主題seo搜索引擎優(yōu)化實訓(xùn)總結(jié)
  • 學(xué)廣告設(shè)計需要什么學(xué)歷百度代做seo排名
  • 機械設(shè)計網(wǎng)站推薦重大新聞事件2023
  • 重慶企業(yè)網(wǎng)泉州seo托管
  • 從哪里可以建公司網(wǎng)站chrome官網(wǎng)
  • 公司手機網(wǎng)站建設(shè)營銷技巧在線完整免費觀看
  • 浙江網(wǎng)站建設(shè)公司電話網(wǎng)站建設(shè)圖片
  • 做外貿(mào)找客戶的網(wǎng)站寧波公司做網(wǎng)站
  • 自己建設(shè)購物網(wǎng)站安徽搜索引擎優(yōu)化
  • wordpress 建站的利弊成都網(wǎng)站建設(shè)系統(tǒng)
  • 畢業(yè)設(shè)計論文網(wǎng)站開發(fā)需要多少附近哪里有計算機培訓(xùn)班
  • 成考過來人的忠告網(wǎng)站優(yōu)化公司收費