#506 upgrade to v 1.2. Use HEAD instead of GET request

This commit is contained in:
Jérôme Leonard 2019-06-29 06:16:02 +02:00
parent 9600eed011
commit 59966589d6
No known key found for this signature in database
GPG Key ID: 3FED68E684770DDB
4 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{
"name": "UnshortenLink",
"version": "1.1",
"version": "1.2",
"author": "Remi Pointel, CERT-BDF",
"url": "https://github.com/TheHive-Project/Cortex-Analyzers",
"license": "AGPL-V3",

View File

@ -67,7 +67,7 @@ class UnshortenlinkAnalyzer(Analyzer):
result = {'found': False, 'url': None}
try:
response = requests.get(url, proxies=proxies,
response = requests.head(url, proxies=proxies,
allow_redirects=False)
if (response.status_code == 301) or (response.status_code == 302):