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

Tool Breaking on Download Samples #15

Open
rothoma2 opened this issue Sep 6, 2024 · 14 comments
Open

Tool Breaking on Download Samples #15

rothoma2 opened this issue Sep 6, 2024 · 14 comments
Assignees

Comments

@rothoma2
Copy link
Contributor

rothoma2 commented Sep 6, 2024

When trying to run the tool it breaks for me.

Screenshot_from_2024-08-31_19-34-20

I suspect it requires some API Key that is not created on my environment.Which highlights a few issues:

  • We need to validate for API keys to exist in ENV, before using a backend.
  • Probably need to return earlier, is theres an error with the backend, or expand the try except.
  • We need to add a config option, to show people steps on how to get their API keys and set them up.
@poneoneo
Copy link
Contributor

do we have the same api key value ??

@poneoneo
Copy link
Contributor

poneoneo commented Sep 11, 2024

We need to validate for API keys to exist in ENV, before using a backend.
catched

it's was already did i means this case is already catch.

@poneoneo
Copy link
Contributor

should i track my api-keys to ensure that everyone will have the same ?

@rothoma2
Copy link
Contributor Author

Im not sure, I follow your last comment. Each person should create and set their own unique API keys locally.

@poneoneo
Copy link
Contributor

poneoneo commented Sep 17, 2024

oh it's real... btw i found the source of the bug is due to fact that even when we run scrapper to get only malware bazaar files, the script will try to run malshare too . and if api keys for malshare isnt there this cause this errors. cause they are both in the same function

def run_scrapper(args):
    malware_bazaar.scrap_malware_bazaar(args.hundred_recent)
    malshare.scrap_malshare()

@poneoneo
Copy link
Contributor

maybe we should thinking about creating a command to run especially each backend individually and another to run all at once

@poneoneo
Copy link
Contributor

cause when you provide --MwBz_100 you didnt expect to get files from malshare

@rothoma2
Copy link
Contributor Author

Yeah maybe the logic should be,

  1. Default, check all env variables, for each env present trigger the backend. For Env missing do not trigger it. print a warning at the end of backends with no env keys.
  2. have an option, where you can add comma separated the names of the backends, and you can select which ones to dowload.

@poneoneo
Copy link
Contributor

i will push another commit that fix this and made another pr to integrate typer and then integrate theses logic.. what do you think about...

@poneoneo
Copy link
Contributor

cause im also want to set a command that will be run without need to run python each time but typer should be install first... then i will add a path to pyproject.toml file to tell with wihich file have a main groups of subcommands. i learn too much on typer while i was building my own package.

@rothoma2
Copy link
Contributor Author

You can also do this with poetry, you can add entry pointd, to create a cli entry into your application.

@poneoneo
Copy link
Contributor

yes ofcourse typer is not poetry replacement ... but a library to create cli app

@poneoneo
Copy link
Contributor

poneoneo commented Sep 17, 2024

is a argparse replacement. is just a library that i will add on top of existing dependencies to build commands

@rothoma2
Copy link
Contributor Author

This seem to be fixed with the Rewrite, I still need to create more API Keys to Test this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants