Add tlsgrab and a certification command to annna. - annna - Annna the nice frie… | |
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
--- | |
commit 1261390ec57fc92b5e0a3ea774ed591cb748a083 | |
parent 164a0d250d87b3d9db9cd2c0ab97a3f560556003 | |
Author: Annna Robert-Houdin <[email protected]> | |
Date: Fri, 16 Aug 2024 21:12:07 +0200 | |
Add tlsgrab and a certification command to annna. | |
Diffstat: | |
M annna-message-common | 12 ++++++++++++ | |
A tlsgrab | 17 +++++++++++++++++ | |
2 files changed, 29 insertions(+), 0 deletions(-) | |
--- | |
diff --git a/annna-message-common b/annna-message-common | |
@@ -1286,6 +1286,18 @@ case "${text}" in | |
fi | |
} & | |
;; | |
+"${ircuser}, can "*" certify itself?") | |
+ q="${text#* can }" | |
+ q="${q% certify*}" | |
+ { | |
+ # host:port is needed for tlsgrab | |
+ curi="$(tlsgrab "${q}")" | |
+ if [ -n "${curi}" ]; | |
+ then | |
+ annna-say -s "${server}" -c "${channel}" "${user}, let… | |
+ fi | |
+ } & | |
+ ;; | |
"${ircuser}, please mine "*" bitreichcoin"*) | |
q="${text#* please mine }" | |
q="${q% bitreichcoin*}" | |
diff --git a/tlsgrab b/tlsgrab | |
@@ -0,0 +1,17 @@ | |
+#!/bin/sh | |
+ | |
+export PATH="$PATH:/home/annna/bin" | |
+ | |
+if [ $# -lt 1 ]; | |
+then | |
+ printf "usage: %s host:port\n" "$(basename "$0")" >&2 | |
+ exit 1 | |
+fi | |
+ | |
+host="$1" | |
+openssl s_client \ | |
+ -connect "${host}" \ | |
+ -showcerts </dev/null \ | |
+ 2>&1 \ | |
+ | /br/bin/bitreich-paste | |
+ |