Skip to content

Commit eb2e118

Browse files
committed
fix: 400-client-error
1 parent f43a13a commit eb2e118

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

your_daily_dose_malware/backends/malshare.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def scrap_malshare():
1616
with Progress() as progress:
1717
api_key = os.getenv("MALSHARE_API_KEY")
1818
if api_key == "":
19-
rich.print("[green]Skipping Malshare not api key")
19+
rich.print("[red]Please set MALSHARE_API_KEY ")
2020
return None
2121
try:
2222
response = requests.post(
@@ -28,11 +28,11 @@ def scrap_malshare():
2828
hashes = response.json()
2929
except requests.RequestException as err:
3030
rich.print(f"[red] An error occurred: {err}")
31-
31+
return None
3232
rich.print(f"[green] - Malshare: {len(hashes)} Samples")
3333
sha256_ids = [hashe["sha256"] for hashe in hashes]
3434
task = progress.add_task(
35-
" - [green]Downloading Malware Files...", total=len(sha256_ids)
35+
"-[green]Downloading Malware Files...", total=len(sha256_ids)
3636
)
3737
Path("Downloaded-Malwares").mkdir(exist_ok=True)
3838
downloaded_malwares_path = Path("Downloaded-Malwares").absolute()

your_daily_dose_malware/backends/malware_bazaar.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def all_most_recent(headers_info):
116116

117117
def scrap_malware_bazaar(hundred_recent):
118118
if os.getenv("MALWARE_BAZAAR_API_KEY") == "":
119-
rich.print("[green] Skipping Malware Bazaar not api key")
119+
rich.print("[red]Please set MALWARE_BAZAAR_API_KEY")
120120
return None
121121
headers = {"API-KEY": os.getenv("MALWARE_BAZAAR_API_KEY")}
122122
if hundred_recent:

0 commit comments

Comments
 (0)