I'm writing a little code in python3 using the requests module. I send https requests to a server but i need to dump the exechanges beetwin the server and my client.
I know how dump the ssl key with firefox and use it to decrypt the data with whireshark but how can do the same with a python program ?
I need a thirth program like ssldump for exemple or i can do it in the python code ?
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': ''}
You will need to use a TLS proxy if you wanna decrypt HTTPS traffic from a client that cannot export an SSLKEYLOGFILE. We have a free tool called PolarProxy, which acts as a transparent proxy end dumps the decrypted traffic as plain HTTP to a PCAP file that you can open in Wireshark.