
Dork에서 Download까지: Playwright로 Google Dorks 자동화하기
Dorkwright는 Google 검색 결과에서 파일 링크 추출을 자동화하고 선택적으로 다운로드할 수 있는 강력한 Python 기반 Google dorking 유틸리티입니다. 브라우저 자동화를 위해 Playwright를 사용하며, CAPTCHA 처리, 진행률 표시기, 깔끔한 CLI 인터페이스를 포함합니다.
╔═══════════════════════════════════════════════════════════════════════════════╗
║ DORKWRIGHT - Google Dorker ║
║ Extract file links from Google search results and download them ║
╚═══════════════════════════════════════════════════════════════════════════════╝
options:
-h, --help show this help message and exit
-q, --query QUERY Google search query (e.g., "site:example.com filetype:doc")
-p, --pages N Maximum number of result pages to scrape (default: 10)
-d, --delay SECONDS Delay between page requests to avoid CAPTCHA (default: 3)
-o, --output FILE Output file for extracted links (default: file_links.txt)
--download Download files after extracting links
--download-dir DIR Directory to save downloaded files (default: downloads)
--input-file FILE Input file with URLs to download (skip search if provided)
--proxy URL Proxy server URL (e.g., http://127.0.0.1:8080)
--flaresolverr URL FlareSolverr endpoint for bypassing Cloudflare
dorkwright.py -q "site:example.com filetype:doc OR filetype:docx OR filetype:dot"
dorkwright.py -q "site:example.com filetype:pdf" -p 5 -o results.txt
dorkwright.py -q "site:example.com filetype:doc" --download --download-dir downloads
dorkwright.py --input-file file_links.txt --download-dir my_files
# Using HTTP proxy
dorkwright.py --input-file file_links.txt --proxy http://127.0.0.1:8080
# Using SOCKS5 proxy
dorkwright.py --input-file file_links.txt --proxy socks5://127.0.0.1:1080
# Download from existing file using FlareSolverr
dorkwright.py --input-file file_links.txt --flaresolverr http://localhost:8191
# Search and download with FlareSolverr
dorkwright.py -q "site:example.com filetype:pdf" --download --flaresolverr http://localhost:8191
git clone https://github.com/San-Tus/Dorkwright
cd Dorkwright
python -m venv .venv
가상 환경 활성화:
| OS | 명령어 |
|---|---|
| Windows | .venv\Scripts\activate |
| Linux/macOS | source .venv/bin/activate |
필요한 패키지 설치:
pip install -r requirements.txt
playwright install chromium
FlareSolverr는 Cloudflare 챌린지를 해결하는 프록시 서버로, Cloudflare로 보호되는 사이트에서 파일을 다운로드할 수 있게 해줍니다.
설치 및 설정 지침은 공식 문서를 참조하세요: https://github.com/FlareSolverr/FlareSolverr
python dorkwright.py -h
실제 사용 예시:
python dorkwright.py -q "site:gchq.gov.uk filetype:doc OR filetype:docx OR filetype:xls OR filetype:xlsx OR filetype:pdf" -p 10 --download --download-dir GCHQ
Searching Google for: site:gchq.gov.uk filetype:doc OR filetype:docx OR filetype:xls OR filetype:xlsx OR filetype:pdf
Max pages: 10
Delay between pages: 3s
Searching page 1...
============================================================
CAPTCHA DETECTED!
Please solve the CAPTCHA in the browser window.
Press ENTER here when done...
============================================================
발견된 링크는 다음과 같이 표시됩니다:
Found: https://www.gchq.gov.uk/files/CheltScienceFestivalTranscript.pdf
Found: https://www.gchq.gov.uk/files/NLCChallenge1_WT.pdf
...
============================================================
Found 77 unique file links:
============================================================
https://www.gchq.gov.uk/files/2020%20Christmas%20Card%20Solution.pdf
https://www.gchq.gov.uk/files/2020%20Christmas%20Card.pdf
https://www.gchq.gov.uk/files/2023%20GCHQ%20Christmas%20Challenge.pdf
https://www.gchq.gov.uk/files/2024%20Combined%20Pay%20Gap%20External%20-%20Updated.pdf
https://www.gchq.gov.uk/files/Answers.pdf
...
Saved 77 links to file_links.txt
--download 옵션이 활성화된 경우:
Starting downloads...
Found 77 URLs to download
Saving to directory: GCHQ
✓ 2020 Christmas Card Solution.pdf 3.30 MB
✓ 2020 Christmas Card.pdf 2.45 MB
✓ 2023 GCHQ Christmas Challenge.pdf 6.15 MB
✓ 2024 Combined Pay Gap External - Updated.pdf 489.67 KB
✓ Answers.pdf 1016.25 KB
...
================================================================================
DOWNLOAD STATISTICS
================================================================================
Total files processed: 77
Successfully downloaded: 77
Failed downloads: 0
Total size: 261.16 MB
Time elapsed: 35.15s
Average speed: 7.43 MB/s
File types downloaded:
.pdf : 77 files
================================================================================