Comments (8)
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.
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.
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.
This must be a environmental issue - the cronjob works locally, but not in production.
from mihari.
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.
@Canon5616 Sorry, I never got it to work.
from mihari.
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.
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 viaapi_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)
- Attribute-Level Tagging for MISP Integration HOT 5
- MISP not configured correctly HOT 1
- [BUG] Mihari ThreatFox webhook is not working HOT 7
- [Feature Request] Consider Adding Hudson Rock Cybercrime Intelligence Integration HOT 2
- [BUG] ghcr.io Repository Is Unreachable - Docker HOT 2
- Results are not being publish to database HOT 2
- [Support] Ruby Selector Assistance HOT 1
- [Feature Request] Support for fetching custom json fileds available in `Censys`/`Shodan` HOT 2
- [Feature Request] Obfuscate or hide API keys in the Config page of the Web App HOT 3
- [Feature Request] Creating an emitter to MS Teams HOT 3
- [BUG] Censys `KeyError` HOT 2
- [BUG] - alert.rule_id issues after upgrade from 4.9.0 to 5.2.3 HOT 3
- [BUG] Censys queries hanging within Docker Mihari HOT 2
- [BUG] Exception: TypeError: can't convert NilClass into time interval HOT 5
- [BUG] Issue with Censys rules HOT 2
- PDF in README yields 404 HOT 2
- [BUG] Shodan API Error - 401 HOT 3
- SQLite error[BUG] HOT 1
- no implicit conversion of Mihari::Models::Rule into Hash (TypeError)
- FOFA rule returns null HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mihari.