逆向14-采招网

采招网搜索页面
image
结果是需要解密的

1. 请求-完成响应

image

2. 响应逆向

2.1 使用关键字搜索

image

2.2 根据定住的位置分析

定住
image
看代码-悬浮进去
image
看key和iv
image
算key和iv
image

3 python代码解密

import requests
from hashlib import md5
import base64
from Crypto.Cipher import AES
from Crypto.Util.Padding import unpad

url = "https://interface.bidcenter.com.cn/search/GetSearchProHandler.ashx"

payload = "from=6137&guid=2ff8aece-c779-4bb1-951b-a2b8b99dab83&location=6138&token=&next_token=&keywords=%25E6%259C%258D%25E5%258A%25A1%25E5%2599%25A8&mod=0&page=3"
headers = {
  'accept': 'text/plain, */*; q=0.01',
  'accept-language': 'zh-CN,zh;q=0.9,en;q=0.8,zh-TW;q=0.7',
  'cache-control': 'no-cache',
  'content-type': 'application/x-www-form-urlencoded; charset=UTF-8',
  'origin': 'https://search.bidcenter.com.cn',
  'pragma': 'no-cache',
  'priority': 'u=1, i',
  'referer': 'https://search.bidcenter.com.cn/',
  'sec-ch-ua': '"Not/A)Brand";v="8", "Chromium";v="126", "Google Chrome";v="126"',
  'sec-ch-ua-mobile': '?0',
  'sec-ch-ua-platform': '"macOS"',
  'sec-fetch-dest': 'empty',
  'sec-fetch-mode': 'cors',
  'sec-fetch-site': 'same-site',
  'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36'
}

response = requests.request("POST", url, headers=headers, data=payload)



# 解密数据
base64_encrypt_date = response.text


# (1)base64解码
encrypt_date = base64.b64decode(base64_encrypt_date)

# (2)解密

# 2.1 确认好解密的参数
key = "3zKzyf6eEfuDjAG3".encode() 
iv = "fyUANZ0qSNZhhNCV".encode() 
# 2.2 创建AES对象
aes = AES.new(key, AES.MODE_CBC, iv) # key 模式 iv

# 2.3 对数据进行解密
data = aes.decrypt(encrypt_date)

print(data.decode()) 

image

posted @ 2024-08-08 16:35  流年中渲染了微笑  阅读(5)  评论(0)    收藏  举报