Add /dump command

This commit is contained in:
2021-05-08 19:12:24 +02:00
parent 03f23fa514
commit c2d2286e71

View File

@@ -300,6 +300,12 @@ sh(){
sendmsg "<code>$(whoami)@${HOSTNAME}:${PWD}$</code> <code>${args[*]}</code> sendmsg "<code>$(whoami)@${HOSTNAME}:${PWD}$</code> <code>${args[*]}</code>
<code>$(echo ${args[*]} | bash - 2>&1)</code>" <code>$(echo ${args[*]} | bash - 2>&1)</code>"
} }
dump(){
admin
out=/tmp/$RANDOM.json
jq <<< "$input" > $out
sendmsg "Event saved to $out."
}
# Notes and such # Notes and such
anyone(){ anyone(){
@@ -344,6 +350,7 @@ case "$cmd" in
/sys@$bot) sys ;; /sys@$bot) sys ;;
/neo@$bot) neo ;; /neo@$bot) neo ;;
/sh@$bot*) sh ;; /sh@$bot*) sh ;;
/dump@$bot*) dump ;;
# Notes and such # Notes and such
!anyone*) anyone ;; !anyone*) anyone ;;
esac esac