# README
Cortex bot
Simple telegram bot to check indicators' reputation based on Cortex analyzers that can be easily written for any third party feeds or your own API service.
It simply uses a password for authentication, which is probably will be changed in the future prior to a role based model.
Usage
Start bot from the source code (you can use compiled version too):
CORTEX_BOT_PASSWORD=PassphraseForAuth \
CORTEX_URL=https://your-cortex-instance \
CORTEX_API_KEY=YOUR-API-KEY \
TGBOT_API_TOKEN=TOKEN \
go run cmd/cortexbot/cortexbot.go
Work through SOCKS5 proxy
SOCKS5_URL=socks5://user:password@server:port \
CORTEX_BOT_PASSWORD=PassphraseForAuth \
CORTEX_URL=https://your-cortex-instance \
CORTEX_API_KEY=YOUR-API-KEY \
TGBOT_API_TOKEN=TOKEN \
go run cmd/cortexbot/cortexbot.go
Add bot to your contacts, enter the passphrase and here you go - submit data and wait for results.
Supported data types
By now the following data types are supported for lookup:
- Domain
- Hash
- IP
- URL
- File
PRs are welcome!
# Packages
No description provided by the author
# Functions
Debug sets debug mode for the Cortexbot.
IsDNSName is a modified version of function IsDNSName from https://github.com/asaskevich/govalidator/blob/master/patterns.go.
IsHash checks if a given string is a hash BUG(ilyaglow): not supported hashes are hashes shorter 32 letters and ssdeep.
New bootstraps cortexbot configuration.
NewClient bootstraps the Client struct from env variables.
NewFromEnv bootstraps Cortexbot from environment variables.
SetCortex sets a cortex.Client.
SetCortexTimeout will set the timeout that the client will wait for a response from Cortex at most.
SetDBPath sets a sqlitedb path.
SetPAP sets PAP as an option.
SetTLP sets TLP as an option.
SetupChatbot constructs a client to the messenger.
# Type aliases
Client defines bot's abilities to interact with services.