실습> get.html
http://192.168.108.101/get.php?userid=boankorea&userpw=111111
-- get.html --
<!doctype html>
<html>
<head>
<meta charset=utf-8>
<title> ::: get.html ::: </title>
</head>
<body>
<form method=get action=get.php>
<table align=center bgcolor=#000000 border=0
cellpadding=4 cellspacing=1 width=300 >
<tr bgcolor=#ffffff>
<td align=center width=100> 이름 </td>
<td width=240> <input type=text name=userid > </td>
</tr>
<tr bgcolor=#ffffff>
<td align=center width=60> 비밀번호 </td>
<td width=240> <input type=password name=userpw > </td>
</tr>
<tr bgcolor=#ffffff>
<td align=center colspan=2>
<input type=submit value='저장'> </td>
</tr>
</table>
</form>
</body>
</html>
-- get.html --
-- get.php --
<?
print_r($_GET);
?>
-- get.php --
-- requests02.py --
"""
파일명 : requests02.py
프로그램 설명 : GET 방식으로 파라미터에 값을 전송하는 예제
"""
import requests
# geturl = 'http://192.168.108.101/get.php?userid=boankorea&userpw=111111'
# res = requests.get(geturl)
# parameter를 dict로 자료형으로 전달한 경우
geturl = 'http://192.168.108.101/get.php'
paramData = { 'userid':'boankorea', 'userpw':'111111' }
res = requests.get(geturl, params=paramData)
print(res.text)
-- requests02.py --
'Linux > 모의해킹' 카테고리의 다른 글
| Apache 웹서버 로그 분석 (0) | 2022.01.26 |
|---|---|
| UNION 공격코드 작성하기 (Python) (0) | 2022.01.26 |
| Python 을 이용한 자동화 툴 만들기 (0) | 2022.01.26 |
| UNION 을 이용한 데이터 추출 (0) | 2022.01.26 |
| 관리자로 로그인하기 (0) | 2022.01.26 |