Post 전달되는 data 찾아내기

IOVEIT·2023년 9월 15일
0

1. See a proxy packet in Burp suite

2. Check a host, a request type, a request uri, a content type, and the data.

  post header and data by burp suite
  
  😀 POST /selectBasSerPageList.do HTTP/1.1
  😀 Host: www.k-pis.go.kr
  Cookie: _xm_webid_1_=-815745050; PEPMSSessionID=9Dhkd5m6ZmTdD0YzeCIj7vsOmg7a8bESMJ9s2qTzVfqPlRnccOxaCyHf4K47XN.UEVQTVNfRE9NQUlOL1BFUE1TX00yMg==; _xm_tid_1_=7153322562027609656
  Content-Length: 99
  Sec-Ch-Ua: "Not:A-Brand";v="99", "Chromium";v="112"
  Accept: text/html, */*; q=0.01
  😀 Content-Type: application/x-www-form-urlencoded; charset=UTF-8
  X-Requested-With: XMLHttpRequest
  Sec-Ch-Ua-Mobile: ?0
  User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.5615.50 Safari/537.36
  Sec-Ch-Ua-Platform: "Windows"
  Origin: https://www.k-pis.go.kr
  Sec-Fetch-Site: same-origin
  Sec-Fetch-Mode: cors
  Sec-Fetch-Dest: empty
  Referer: https://www.k-pis.go.kr/selectBasSerList.do
  Accept-Encoding: gzip, deflate
  Accept-Language: ko-KR,ko;q=0.9,en-US;q=0.8,en;q=0.7
  Connection: close

  😀 pageNo=1&pnuCode=4121010100104900002&serKnd=pnsq&ctprvnCode=41&bogColcCd=&regstrQyMin=&regstrQyMax=

3. write your code. (This example is for python)

def post_by_pnu(url: str, pnu: str):

    sido_code = pnu[0:2]

    # (X) application/json     
    headers = {"Content-type": "application/x-www-form-urlencoded"}

    data = {
        "pageNo": 1,
        "pnuCode": pnu,
        "serKnd": "pnsq",
        "ctprvnCode": sido_code, 
        "bogColcCd": "",
        "regstrQyMin": "",
        "regstrQyMax": ""
    }

      return requests.post(url=url, headers=headers, data=data)

< No Reference >

profile
EnCoCookLand

0개의 댓글

관련 채용 정보