728x90
경로추적 취약/양호 결과를 사용자에게 제공할때 스크린샷을 제시해야해서, dvwa화면을 스크린샷하는 코드를 짜보고자 한다.
pip install Selenium-Screenshot
from Screenshot import Screenshot_Clipping
from selenium import webdriver
ob=Screenshot_Clipping.Screenshot()
driver = webdriver.Chrome()
url = "https://github.com/sam4u3/Selenium_Screenshot/tree/master/test"
driver.get(url)
img_url=ob.full_Screenshot(driver, save_path=r'.', image_name='Myimage.png')
print(img_url)
driver.close()
driver.quit()
전체화면 캡쳐
요런식으루 드라이버 화면이 캡쳐되고 저장됨
결과
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
<title>Vulnerability: File Inclusion :: Damn Vulnerable Web Application (DVWA) v1.10 *Development*</title>
<link href="../../dvwa/css/main.css" rel="stylesheet" type="text/css"/>
<link href="../../favicon.ico" rel="icon" type="\image/ico"/>
<script src="../../dvwa/js/dvwaPage.js" type="text/javascript"></script>
<div id="container">
<div id="header">
<img alt="Damn Vulnerable Web Application" src="../../dvwa/images/logo.png"/>
</div>
<div id="main_menu">
<div id="main_menu_padded">
<ul class="menuBlocks"><li class=""><a href="../../.">Home</a></li>
<li class=""><a href="../../instructions.php">Instructions</a></li>
<li class=""><a href="../../setup.php">Setup / Reset DB</a></li>
</ul><ul class="menuBlocks"><li class=""><a href="../../vulnerabilities/brute/">Brute Force</a></li>
<li class=""><a href="../../vulnerabilities/exec/">Command Injection</a></li>
<li class=""><a href="../../vulnerabilities/csrf/">CSRF</a></li>
<li class="selected"><a href="../../vulnerabilities/fi/.?page=include.php">File Inclusion</a></li>
<li class=""><a href="../../vulnerabilities/upload/">File Upload</a></li>
<li class=""><a href="../../vulnerabilities/captcha/">Insecure CAPTCHA</a></li>
<li class=""><a href="../../vulnerabilities/sqli/">SQL Injection</a></li>
<li class=""><a href="../../vulnerabilities/sqli_blind/">SQL Injection (Blind)</a></li>
<li class=""><a href="../../vulnerabilities/weak_id/">Weak Session IDs</a></li>
<li class=""><a href="../../vulnerabilities/xss_d/">XSS (DOM)</a></li>
<li class=""><a href="../../vulnerabilities/xss_r/">XSS (Reflected)</a></li>
<li class=""><a href="../../vulnerabilities/xss_s/">XSS (Stored)</a></li>
<li class=""><a href="../../vulnerabilities/csp/">CSP Bypass</a></li>
<li class=""><a href="../../vulnerabilities/javascript/">JavaScript</a></li>
</ul><ul class="menuBlocks"><li class=""><a href="../../security.php">DVWA Security</a></li>
<li class=""><a href="../../phpinfo.php">PHP Info</a></li>
<li class=""><a href="../../about.php">About</a></li>
</ul><ul class="menuBlocks"><li class=""><a href="../../logout.php">Logout</a></li>
</ul>
</div>
</div>
<div id="main_body">
<br/><br/>
</div>
<div class="clear">
</div>
<div id="system_info">
<input )"="" class="popup_button" data-help-url="../../vulnerabilities/view_help.php?id=fi&security=low" id="help_button" type="button" value="View Help"/> <input )"="" class="popup_button" data-source-url="../../vulnerabilities/view_source.php?id=fi&security=low" id="source_button" type="button" value="View Source"/> <div align="left"><em>Username:</em> admin<br/><em>Security Level:</em> low<br/><em>PHPIDS:</em> disabled</div>
</div>
<div id="footer">
<p>Damn Vulnerable Web Application (DVWA) v1.10 *Development*</p>
<script src="../..//dvwa/js/add_event_listeners.js"></script>
</div>
</div>
</body></html>
51
취약
스크린샷 저장 경로: C:\Users\dlgot\Downloads\Myimage2.png
728x90
'✍2021,2022 > web보안' 카테고리의 다른 글
약한문자열 강도 중간점검(2) - 문제점 해결 (0) | 2021.08.06 |
---|---|
약한문자열강도 중간점검 (0) | 2021.08.04 |
python 새롭게 알게된것(1) (0) | 2021.08.04 |
중간 점검 (0) | 2021.07.22 |
약한문자열, 정보누출 (0) | 2021.07.07 |