成人免费xxxxx在线视频软件_久久精品久久久_亚洲国产精品久久久_天天色天天色_亚洲人成一区_欧美一级欧美三级在线观看

命令行版 HTTP 工具集,自動化檢查網站狀態

系統 Linux 自動化
自動化檢測,離不開自動化的工具,今天來為大家分享一款命令行版的 HTTP 工具集 httpx 。

如果我們有幾十萬個網站需要檢測,該如何實現?手工檢測嗎?當然不行,這是非常不現實的,只有自動化才是正確的選擇,那么如何自動化實現?

對于幾十個網站的目標,如果要對所有網站進行掃描,每一個網站的掃描都需要比較長的時間,而且,其中難免有很多無效網站,如果我們可以將無效網站排除,那么我們就可以節省掃描的時間,從而提升檢測效率。

自動化檢測,離不開自動化的工具,今天來為大家分享一款命令行版的 HTTP 工具集 httpx,項目地址:

https://github.com/projectdiscovery/httpx

該工具使用 go 語言編寫,安裝方式也比較簡單,需要提前安裝 go 環境,安裝完成之后需要換成國內的代理,否則安裝的時候,會出現連接超時的問題,安裝命令如下: 

  1. go get -v github.com/projectdiscovery/httpx/cmd/httpx 

Windows 下安裝時報錯,然后執行下面的命令之后,再進行安裝就可以了:

  1. go env -w GOSUMDB=off 

安裝完成之后,查看幫助信息: 

  1. [root@vultrguest ~]# httpx -h  
  2. Usage of httpx:  
  3.   -H value                # 自定義 header,比如 UA、cookie 等 
  4.       Custom Header      
  5.    -allow value            
  6.       Allowlist ip/cidr 
  7.   -body string       
  8.        Content to send in body with HTTP request 
  9.    -cdn                   # 根據頁面返回 header,判斷是否存在 cdn 
  10.       Check if domain's ip belongs to known CDN (akamai, cloudflare, ..) 
  11.    -cname  
  12.       Output first cname  
  13.   -content-length         # 輸出返回包的長度  
  14.       Extracts content length  
  15.   -content-type           # 輸出網站的內容類型  
  16.       Extracts content-type  
  17.   -csp-probe  
  18.       Send HTTP probes on the extracted CSP domains  
  19.   -debug  
  20.       Debug mode  
  21.   -deny value  
  22.       Denylist ip/cidr  
  23.   -exclude-cdn  
  24.       Skip full port scans for CDNs (only checks for 80,443)  
  25.   -extract-regex string  
  26.       Extract Regex  
  27.   -fc string              # 過濾掉某些狀態碼的網站,比如 404、500 等  
  28.       Filter status code  
  29.   -filter-regex string  
  30.       Filter Regex  
  31.   -filter-string string  
  32.       Filter String  
  33.   -fl string  
  34.       Filter content length  
  35.   -follow-host-redirects  
  36.       Only follow redirects on the same host  
  37.   -follow-redirects  
  38.       Follow Redirects  
  39.   -http-proxy string      # 設置請求代理  
  40.       HTTP Proxy, eg http://127.0.0.1:8080  
  41.   -http2  
  42.       HTTP2 probe  
  43.   -include-chain  
  44.       Show Raw HTTP Chain In Output (-json only)  
  45.   -include-response  
  46.       Show Raw HTTP Response In Output (-json only)  
  47.   -ip                     # 輸出域名對應的 IP  
  48.       Output target ip  
  49.   -json  
  50.       JSON Output  
  51.   -l string  
  52.       File containing domains  
  53.   -location  
  54.       Extracts location header  
  55.   -match-regex string  
  56.       Match Regex  
  57.   -match-string string  
  58.       Match string  
  59.   -mc string  
  60.       Match status code  
  61.   -method  
  62.       Display request method  
  63.   -ml string  
  64.       Match content length  
  65.   -no-color  
  66.       No Color  
  67.   -no-fallback  
  68.       If HTTPS on port 443 is successful on default configuration, probes also port 80 for HTTP  
  69.   -no-fallback-scheme  
  70.       The tool will respect and attempt the scheme specified in the url (if HTTPS is specified no HTTP is attempted)  
  71.   -o string  
  72.       File to write output to (optional)  
  73.   -path string  
  74.       Request path/file (example '/api')  
  75.   -paths string  
  76.       Command separated paths or file containing one path per line (example '/api/v1,/apiv2')  
  77.   -pipeline  
  78.       HTTP1.1 Pipeline 
  79.    -ports value  
  80.       ports range (nmap syntax: eg 1,2-10,11)  
  81.   -probe  
  82.       Display probe status  
  83.   -random-agent  
  84.       Use randomly selected HTTP User-Agent header value (default true)  
  85.   -rate-limit int  
  86.       Maximum requests to send per second (default 150)  
  87.   -request string  
  88.       File containing raw request  
  89.   -response-in-json  
  90.       Show Raw HTTP Response In Output (-json only) (deprecated)  
  91.   -response-size-to-read int  
  92.       Max response size to read in bytes (default - unlimited) (default 2147483647)  
  93.   -response-size-to-save int  
  94.       Max response size to save in bytes (default - unlimited) (default 2147483647)  
  95.   -response-time  
  96.       Output the response time  
  97.   -resume  
  98.       Resume scan using resume.cfg  
  99.   -retries int  
  100.       Number of retries  
  101.   -silent  
  102.       Silent mode  
  103.   -sr  
  104.       Save response to file (default 'output')  
  105.   -srd string  
  106.       Save response directory (default "output")  
  107.   -stats  
  108.       Enable statistic on keypress (terminal may become unresponsive till the end)  
  109.   -status-code  
  110.       Extracts status code  
  111.   -store-chain  
  112.       Save chain to file (default 'output')  
  113.   -tech-detect  
  114.       Perform wappalyzer based technology detection  
  115.   -threads int  
  116.       Number of threads (default 50)  
  117.   -timeout int  
  118.       Timeout in seconds (default 5)  
  119.   -title  
  120.       Extracts title  
  121.   -tls-grab  
  122.       Perform TLS data grabbing  
  123.   -tls-probe  
  124.       Send HTTP probes on the extracted TLS domains  
  125.   -unsafe  
  126.       Send raw requests skipping golang normalization  
  127.   -verbose  
  128.       Verbose Mode  
  129.   -version  
  130.       Show version of httpx  
  131.   -vhost  
  132.       Check for VHOSTs  
  133.   -vhost-input  
  134.       Get a list of vhosts as input  
  135.   -web-server  
  136.       Extracts server header  
  137.   -websocket  
  138.       Prints out if the server exposes a websocket  
  139.   -x string  
  140.       Request Methods, use ALL to check all verbs () 

使用場景一:檢查網站是否存活

將網站列表保存為一個文本,比如:

最簡單的命令,無需加任何參數:

  1. type domain.txt | httpx (windows)/ cat domain.txt | httpx (Linux) 

或者

  1. httpx -l domain.txt  

無法訪問的網站,在結果中未進行顯示:

這個工具在 linux 下使用顯示會比較好看,如果我們想要顯示連接失敗的網站,可以使用命令:

  1. httpx -l domain.txt -silent -probe 

使用場景二:獲取網站 Title 、狀態碼等

通過獲取網站的 Title 和狀態碼,可以排除大量非正常網站,比如 404、500 等狀態碼,還有很多域名指向同一個網站,然后通過網站標題可以去掉大量重復的網站域名,從而提升檢測的效率。

  1. httpx -l domain.txt -title -tech-detect -status-code 

對于有大量無法訪問網站的情況,默認的超時時間是 5 秒,想要提升速度,可以將超時時間,比如:

  1. httpx -l domain.txt -title -tech-detect -status-code -timeout 2 

目標多的情況下,可以結合多線程技術,使用參數 -threads:

  1. httpx -l domain.txt -title -tech-detect -status-code -timeout 2 -threads 30 

如果還想獲取目標網的服務器信息,可以使用 -web-server 參數:

  1. httpx -l domain2.txt -title -tech-detect -status-code -threads 30 -web-server 

使用場景三:使用域名作為目標,獲取網站信息

當我們收集了很多域名,并沒有生成網站的鏈接,httpx 通用可以檢測域名上搭建的網站信息,比如下面的域名:

通用使用獲取 title 的命令:

  1. httpx -l domain2.txt -title -tech-detect -status-code -timeout 2 -threads 30 

總結

本文對 httpx 做了一個簡單的使用,工具好壞主要與使用者面臨的問題和需求決定,當你需要時,它是一個提效的好幫手,當你不需要時,他不過就是個工具而已,對于大量目標的狀態檢測和信息收集,httpx 是個不錯的幫手,在這幾天的實戰訓練營中,這個工具也是可以使用的,當然,如果自己有編碼基礎,寫腳本來實現自己的目標,更高效且高度自定義化,滿足自己的各種需求,公開的工具多少是有缺陷的,作者不可能把所有狀況都考慮到,而且在使用的時候,目標過多的情況下,會出現各種各樣的 bug,參與訓練營的小伙伴,多少都體驗多了。 

責任編輯:龐桂玉 來源: 黑客技術與網絡安全
相關推薦

2021-04-01 13:25:46

Node命令工具

2020-12-10 16:16:08

工具代碼開發

2020-12-11 06:44:16

命令行工具開發

2023-06-09 07:45:29

Kuberneteskubectl

2022-02-21 11:24:14

代碼工具開發

2010-11-24 17:12:17

MySQL命令行

2013-12-09 14:29:13

OpenStack命令行工具API

2011-01-18 19:11:26

Postfix命令行

2022-04-09 10:02:59

HTTPLInux開源

2022-02-17 18:21:47

工具HTTPie客戶端

2013-11-15 09:43:15

JDK工具

2018-05-04 09:15:35

PythonPlumbum命令行

2019-08-27 10:32:01

Linux操作系統Windows

2013-05-21 14:58:08

系統監視glances開源

2020-09-18 14:27:26

GitHub代碼開發者

2023-03-14 07:39:13

返回值編寫命令行工具

2016-08-12 14:18:49

Javascriptnode命令行

2017-09-01 15:00:49

LinuxMac網站備份

2017-06-15 10:32:56

OracleDBV命令行工具

2014-08-25 16:23:24

點贊
收藏

51CTO技術棧公眾號

主站蜘蛛池模板: 日韩伦理一区二区 | 日本一本在线 | 精品成人av | 日本不卡一区 | 一区二区三区欧美在线 | 在线观看www | 亚洲高清在线观看 | 日韩视频免费在线 | 三级成人在线观看 | 国产亚洲成av人在线观看导航 | 中文在线视频观看 | 黄色av网站在线观看 | 91精品国产高清一区二区三区 | 久久天堂 | 中文字幕日韩一区二区 | av香港经典三级级 在线 | 欧美成人精品一区二区男人看 | 国产精品18毛片一区二区 | 9久久婷婷国产综合精品性色 | 亚洲日本免费 | 成人在线视 | 久久国产精品一区二区三区 | 色综合久久久 | 黄色网址在线免费观看 | 毛片毛片毛片毛片毛片 | 中文字幕亚洲一区二区三区 | 国产精品久久久久久久久久 | 欧美精品二区 | 亚洲国产精品第一区二区 | 亚洲在线一区 | 国产一区二区视频在线观看 | 一区二区日韩 | 特黄色一级毛片 | 国产你懂的在线观看 | 亚洲精品视频三区 | 91精品一区| 久久九九99 | 一区二区久久电影 | 欧美日韩高清一区二区三区 | 久久久精品视 | 香蕉视频91 |