与tcpdump转储ssl客户端/服务器交换

问题描述 投票:2回答:1

我正在使用requests模块在python3中编写一些代码。我将https请求发送到服务器,但是我需要转储服务器和我的客户端之间的交换。

我知道如何使用firefox转储ssl密钥,并使用whireshark对其进行解密,但是如何使用python程序进行相同操作?

例如,我需要一个像ssldump这样的thirth程序,或者我可以在python代码中完成它?

def get_city_id(city_name):
  result = requests.get(url+'/json/ac-geo', params='q=' + city_name, headers=header)
  return(result)

def search_annonce(criteres):
  result = requests.post(url+'/annonce', headers=header, data=criteres)
print(get_city_id('draveil').json())



city_id = get_city_id('versailles').json()

criteres = {'produit': 'vente', 'geo_objets_ids': city_id[0]['id'], 'typesbien[]': 'appartement', 'surface[min]': 40, 'prix[max]': '', 'nb_pieces[list][]': 2, 'recherche': 1, 'reference_courte': ''}
ssl python-requests tcpdump
1个回答
1
投票

如果要从无法导出SSLKEYLOGFILE的客户端解密HTTPS通信,则需要使用TLS代理。我们有一个名为PolarProxy的免费工具,它充当透明代理端,将解密后的流量作为普通HTTP转储到可以在Wireshark中打开的PCAP文件中。

© www.soinside.com 2019 - 2024. All rights reserved.