import requests
import re

url = 'https://www.exploit-db.com/exploits/49754'
header = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36'}

result = requests.get(url,headers=header)
print("le code de retour est : " + str(result.status_code))


data = result.text

parseHtml = re.compile('<code (.*)>(.*?)</code>', re.DOTALL).findall(data)


#print(parseHtml[0][1])


file = open("exploit.txt","w")
file.write(parseHtml[0][1])
file.close()
