0w0

[primalsecurity] 0x5 – Web Requests 본문

Primalsecurity/Primalsecurity_Python-tutorials

[primalsecurity] 0x5 – Web Requests

0w0 2019. 12. 24. 13:07
728x90
반응형

요청/응답에 대한 분석 모듈(httplib, Mechanize, Beautiful Soup, and urllib/urllib2) 사용

 

Making a Web Request ( 웹 요청 생성 )

 

요청 전송/응답 확인                                                              Python SimpleHTTPServer

 

Parsing HTML ( HTML 파싱 )

 

웹 요청에 대한 응답 페이지 html 코드를 파싱

BeautifulSoup 모듈을 사용해서 HTML 태그를 기반으로 보기 좋게 재정렬

 

 

파싱한 html 코드를 태그별로 출력 및 분석 가능

parsed.title - 페이지 title 태그 출력, This is a Title!

parsed.body - 페이지 body 태그 출력

parsed.iframe - 페이지 iframe 태그 출력

parsed - 응답받은 html 코드 (파싱된 html 코드)

 

Practical Application ( 연습 )

http://iplist.net/

 

728x90
반응형
Comments