We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5222726 + 3e810bb commit 817e778Copy full SHA for 817e778
1 file changed
lib/downloaders/malwarebazaar.py
@@ -8,6 +8,10 @@
8
9
integrations_cfg = Config("integrations")
10
11
+AUTH_HEADER_KEY = "Auth-Key"
12
+USER_AGENT_HEADER_KEY = "User-Agent"
13
+USER_AGENT_VALUE = "CAPE Sandbox"
14
+
15
log = logging.getLogger(__name__)
16
17
_bazaar_map = {
@@ -54,7 +58,7 @@ def download(hash: str, apikey: str = "") -> bytes:
54
58
data = requests.post(
55
59
"https://mb-api.abuse.ch/api/v1/",
56
60
data={"query": "get_file", _bazaar_map[len(hash)]: hash},
57
- headers={"API-KEY": integrations_cfg.abusech.apikey or apikey, "User-Agent": "CAPE Sandbox"},
61
+ headers={AUTH_HEADER_KEY: integrations_cfg.abusech.apikey or apikey, USER_AGENT_HEADER_KEY: USER_AGENT_VALUE},
62
)
63
if data.ok:
64
try:
0 commit comments