Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 400-client-error #19

Merged
merged 3 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions your_daily_dose_malware/backends/malshare.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def scrap_malshare():
with Progress() as progress:
api_key = os.getenv("MALSHARE_API_KEY")
if api_key == "":
rich.print("[green]Skipping Malshare not api key")
rich.print("[red]Please set MALSHARE_API_KEY ")
return None
try:
response = requests.post(
Expand All @@ -28,11 +28,11 @@ def scrap_malshare():
hashes = response.json()
except requests.RequestException as err:
rich.print(f"[red] An error occurred: {err}")

return None
rich.print(f"[green] - Malshare: {len(hashes)} Samples")
sha256_ids = [hashe["sha256"] for hashe in hashes]
task = progress.add_task(
" - [green]Downloading Malware Files...", total=len(sha256_ids)
"-[green]Downloading Malware Files...", total=len(sha256_ids)
)
Path("Downloaded-Malwares").mkdir(exist_ok=True)
downloaded_malwares_path = Path("Downloaded-Malwares").absolute()
Expand Down
2 changes: 1 addition & 1 deletion your_daily_dose_malware/backends/malware_bazaar.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def all_most_recent(headers_info):

def scrap_malware_bazaar(hundred_recent):
if os.getenv("MALWARE_BAZAAR_API_KEY") == "":
rich.print("[green] Skipping Malware Bazaar not api key")
rich.print("[red]Please set MALWARE_BAZAAR_API_KEY")
return None
headers = {"API-KEY": os.getenv("MALWARE_BAZAAR_API_KEY")}
rothoma2 marked this conversation as resolved.
Show resolved Hide resolved
if hundred_recent:
Expand Down