Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ngerakines/sslhound-matrix
A Matrix bot that checks SSL certificates.
https://github.com/ngerakines/sslhound-matrix
bot matrix
Last synced: about 1 month ago
JSON representation
A Matrix bot that checks SSL certificates.
- Host: GitHub
- URL: https://github.com/ngerakines/sslhound-matrix
- Owner: ngerakines
- License: mit
- Created: 2021-05-04T15:03:00.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-05-04T17:08:32.000Z (over 3 years ago)
- Last Synced: 2024-06-20T22:19:31.451Z (6 months ago)
- Topics: bot, matrix
- Language: Go
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sslhound-matrix
This is just a proof of concept Matrix bot that can run SSL checks.
# Build
There are only a couple of key dependencies:
* [github.com/matrix-org/gomatrix](github.com/matrix-org/gomatrix) - The matrix client library used
* [github.com/miekg/dns](github.com/miekg/dns) - For external DNS resolution if configured
* [golang.org/x/crypto/ocsp](golang.org/x/crypto/ocsp) - For OCSP verificationThe `github.com/ngerakines/sslhound-matrix/cmd` package contains the main file and entry point.
# Configuration
A configuration file (`config.json`) is required. It must contain the user id, access token, and matrix server to connect to.
```json
{
"user_id": "@sslhound:your.matrix.host",
"access_token": "redacted",
"home_server": "https://your.matrix.host/"
}
```# Quick Start
1. Create the sslhound user on your matrix server:
register_new_matrix_user -c path/to/homeserver.yaml https://localhost:8008/2. Login and get credentials:
$ curl --data '{"identifier": {"type": "m.id.user", "user": "sslhound" }, "password": "yourpassword", "type": "m.login.password", "device_id": "sslhoundbot", "initial_device_display_name": "sslhound"}' https://your.matrix.host/_matrix/client/r0/login3. Create a configuration file using the information above. Be sure to set the full matrix URL.
4. Run the bot
$ go run ./cmd/main.go --config ./path/to/config5. Invite the bot to a channel:
`/invite @sslhound:your.matrix.host`
6. Request a check:
`!check your.matrix.host:443`## Docker
1. Build
$ docker build -t sslhound-matrix .
2. Run
$ docker run -v C:\path\to\sslhound-matrix\config.json:/app/config.json sslhound-matrix -- --config=/app/config.json
3. Use
`!check heroku.com:443`
# License
MIT License
Copyright (c) 2021 Nick Gerakines