GithubHelp home page GithubHelp logo

urlscan Issues about mihari HOT 8 CLOSED

ninoseki avatar ninoseki commented on July 30, 2024
urlscan Issues

from mihari.

Comments (8)

ninoseki avatar ninoseki commented on July 30, 2024

I just checked mihari urlscan command and it worked without the error.

As the error says, you have to set URLSCAN_API_KEY to use the command.

from mihari.

ninoseki avatar ninoseki commented on July 30, 2024

Sorry I overlooked this line.

The API key has been set correctly,

A possible cause is a typo.
Please make sure to set your urlscan.io API key as URLSCAN_API_KEY.
(ref. https://github.com/ninoseki/mihari/blob/master/lib/mihari/config.rb#L33)

from mihari.

ssnkhan avatar ssnkhan commented on July 30, 2024

The key has been set correctly, as it will return results if typed directly in bash. But always fails when invoked with a cronjob (though all other queries work without issue).

from mihari.

ssnkhan avatar ssnkhan commented on July 30, 2024

This must be a environmental issue - the cronjob works locally, but not in production.

from mihari.

Canon5616 avatar Canon5616 commented on July 30, 2024

This must be a environmental issue - the cronjob works locally, but not in production.

did you ever resolve this issue, i am having the same results. Runs with no issues when run manually but i get the following error when run via cron job:

023-06-16 00:10:06.073119 �[31mE�[0m [1725259:7440 error_notification.rb:12] �[31mMihari�[0m -- Exception: �[31mMihari::ConfigurationError: Urlscan is not configured correctly�[0m
/var/lib/gems/2.7.0/gems/mihari-5.2.3/lib/mihari/analyzers/rule.rb:197:in block in analyzers' /var/lib/gems/2.7.0/gems/mihari-5.2.3/lib/mihari/analyzers/rule.rb:183:in map'
/var/lib/gems/2.7.0/gems/mihari-5.2.3/lib/mihari/analyzers/rule.rb:183:in analyzers' /var/lib/gems/2.7.0/gems/mihari-5.2.3/lib/mihari/analyzers/rule.rb:244:in validate_analyzer_configurations'
/var/lib/gems/2.7.0/gems/mihari-5.2.3/lib/mihari/analyzers/rule.rb:53:in initialize' /var/lib/gems/2.7.0/gems/mihari-5.2.3/lib/mihari/structs/rule.rb:165:in new'
/var/lib/gems/2.7.0/gems/mihari-5.2.3/lib/mihari/structs/rule.rb:165:in analyzer' /var/lib/gems/2.7.0/gems/mihari-5.2.3/lib/mihari/commands/search.rb:41:in block in run'
/var/lib/gems/2.7.0/gems/mihari-5.2.3/lib/mihari/mixins/error_notification.rb:10:in with_error_notification' /var/lib/gems/2.7.0/gems/mihari-5.2.3/lib/mihari/commands/search.rb:40:in run'
/var/lib/gems/2.7.0/gems/mihari-5.2.3/lib/mihari/commands/search.rb:80:in block in search' /var/lib/gems/2.7.0/gems/mihari-5.2.3/lib/mihari/database.rb:170:in with_db_connection'
/var/lib/gems/2.7.0/gems/mihari-5.2.3/lib/mihari/commands/search.rb:62:in search' /var/lib/gems/2.7.0/gems/thor-1.2.2/lib/thor/command.rb:27:in run'
/var/lib/gems/2.7.0/gems/thor-1.2.2/lib/thor/invocation.rb:127:in invoke_command' /var/lib/gems/2.7.0/gems/thor-1.2.2/lib/thor.rb:392:in dispatch'
/var/lib/gems/2.7.0/gems/thor-1.2.2/lib/thor/base.rb:485:in start' /var/lib/gems/2.7.0/gems/mihari-5.2.3/exe/mihari:8:in <top (required)>'
/usr/local/bin/mihari:23:in load' /usr/local/bin/mihari:23:in

'

from mihari.

ssnkhan avatar ssnkhan commented on July 30, 2024

@Canon5616 Sorry, I never got it to work.

from mihari.

ninoseki avatar ninoseki commented on July 30, 2024

There are two ways to set urlscan.io API key.

The first one is set it via URLSCAN_API_KEY environment variable. (You may not set it properly in cron)
The second one set it via api_key in a rule.

analyzer: urlscan
query: ...
api_key: your_api_key_goes_here

from mihari.

Canon5616 avatar Canon5616 commented on July 30, 2024

There are two ways to set urlscan.io API key.

The first one is set it via URLSCAN_API_KEY environment variable. (You may not set it properly in cron) The second one set it via api_key in a rule.

analyzer: urlscan
query: ...
api_key: your_api_key_goes_here

Thanks Ninoseki , adding in the api key to the yml file worked. Not sure why my cron job doesnt like the URLscan environment variable but is fine with the rest.

Thanks again!

from mihari.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.