Compare commits

...

4 Commits

Author SHA1 Message Date
-LAN-
3875ab3c3d chore(*): Format code
Signed-off-by: -LAN- <laipz8200@outlook.com>
2024-12-01 21:41:38 +08:00
-LAN-
13ec3daa8a chore(*): Format code
Signed-off-by: -LAN- <laipz8200@outlook.com>
2024-12-01 21:39:18 +08:00
-LAN-
cf523c7305 chore(*): Reformat
Signed-off-by: -LAN- <laipz8200@outlook.com>
2024-12-01 21:38:53 +08:00
-LAN-
948f28f3a3 fix(word_extractor): Fix type error and remove stream in ssrf_proxy
Signed-off-by: -LAN- <laipz8200@outlook.com>
2024-12-01 21:20:58 +08:00
2 changed files with 1 additions and 3 deletions

View File

@@ -53,8 +53,6 @@ def make_request(method, url, max_retries=SSRF_DEFAULT_MAX_RETRIES, **kwargs):
response = client.request(method=method, url=url, **kwargs)
if response.status_code not in STATUS_FORCELIST:
if stream:
return response.iter_bytes()
return response
else:
logging.warning(f"Received status code {response.status_code} for URL {url} which is in the force list")

View File

@@ -86,7 +86,7 @@ class WordExtractor(BaseExtractor):
image_count += 1
if rel.is_external:
url = rel.reltype
response = ssrf_proxy.get(url, stream=True)
response = ssrf_proxy.get(url)
if response.status_code == 200:
image_ext = mimetypes.guess_extension(response.headers["Content-Type"])
file_uuid = str(uuid.uuid4())