- Debian 9.6 x64
Updated - 2019-07-17wget https://github.com/xeals/signal-back/releases/download/v0.1.7-alpha.2/signal-back_linux_amd64 -O signal-back_linux_amd64
chmod +x signal-back_linux_amd64
./signal-back_linux_amd64 format -f XML -o output.xml signal-2019-07-02-07-31-08.backup
cat /root/2019-07-02-Texts-2/output.xml | /root/node_modules/xml2json/bin/xml2json > /root/2019-07-02-Texts-2/output.json
cat output.json | jq '.smses.count'
cat output.json | jq '.smses.sms[1800].readable_date'
for i in {1984..2200}; do cat output.json | jq ".smses.sms[$i].address, .smses.sms[$i].type, .smses.sms[$i].readable_date, .smses.sms[$i].body" >> signal-sms.txt; echo "" >> signal-sms.txt; echo "$i" ; done
for i in {100..150}; do cat output.json | jq ".smses.mms[$i].address, .smses.mms[$i].readable_date" >> signal-mms.txt; echo "" >> signal-mms.txt; echo "$i" ; done
The below commands:
- Adds NodeSource's repo to your aptitude repository
- Refreshes the aptitude repository
- Installs the apps below:
- NodeJS - for npm
- xml2json - to convert the signal-back XML to JSON
- jq - to process the JSON array
- Downloads signal-back (0.1.7 Alpha, latest as of 08Dec2018)
- Marks the file executable
apt-get install -y nodejs jq curl build-essential
curl -sL https://deb.nodesource.com/setup_11.x | bash -
apt-get update
apt-get install -y nodejs jq curl
npm install xml2json
wget -O signal-back_linux_amd64 https://github.com/xeals/signal-back/releases/download/v0.1.7-alpha.2/signal-back_linux_amd64
chmod +x signal-back_linux_amd64
cat /root/2019-06-07/signal/signal.xml | /root/node_modules/xml2json/bin/xml2json > /root/2019-06-07/signal/signal.json cat signal.json | jq '.smses.count' for i in {0..2069}; do cat signal.json | jq ".smses.sms[$i].address, .smses.sms[$i].type, .smses.sms[$i].readable_date, .smses.sms[$i].body" >> export.txt; echo "" >> export.txt; echo "$i" ; done
Sources:
- https://github.com/xeals/signal-back
- https://github.com/Inist-CNRS/node-xml2json-command
- https://github.com/nodesource/distributions
Signal's possible commands, the CSV format has epoc/UNIX time. It was easier for me to iterate through the XML using jq to get the readable_date field.
- ./signal-back_linux_amd64 format -f CSV -o backup.csv signal-[Date-Time].backup
- ./signal-back_linux_amd64 format -f XML -o signal.xml signal-[Date-Time].backup
Use this to get how many arrays / rows you have: cat signal.json | jq '.smses.count'
Use the below to iterate through the JSON file and get the address, type (2 is sent, 1 is received), body, and date:
for i in {0..3750}; do cat signal.json | jq ".smses.sms[$i].address, .smses.sms[$i].type, .smses.sms[$i].body, .smses.sms[$i].readable_date" >> export.txt; echo "" >> export.txt; echo "$i" ; done
for i in {0..91}; do cat signal.json | jq ".smses.mms[$i].address, .smses.mms[$i].readable_date" >> mms.txt; echo "" >> sms.txt; echo "$i" ; done
Snapchat: Have to edit the JSON to be "From" and "Sent". And "= a2 - (6/24)" for timezone conversion.
for i in {0..1205}; do cat chat_history.json | jq ".Sent[$i].To,.Sent[$i].MediaType,.Sent[$i].Created" >> snap_sent.txt; echo "" >> snap_sent.txt; echo "$i"; done
for i in {0..1096}; do cat chat_history.json | jq ".Received[$i].From,.Received[$i].MediaType,.Received[$i].Created" >> snap_received.txt; echo "" >> snap_received.txt; echo "$i"; done
For the Snapchats themselves:
for i in {0..1102}; do cat snap_history.json | jq ".Received[$i].From,.Received[$i].MediaType,.Received[$i].Created" >> snap_history_received.txt; echo "" >> snap_history_received.txt; echo "$i"; done
for i in {0..1634}; do cat snap_history.json | jq ".Sent[$i].To,.Sent[$i].MediaType,.Sent[$i].Created" >> snap_history_sent.txt; echo "" >> snap_history_sent.txt; echo "$i"; done
The below is old information
signal-back_windows_amd64.exe format -f XML signal-XXX.backup > backup.xml
- Take that XML output to https://www.browserling.com/tools/xml-to-json
- I threw the JSON into NotePad++, found all columns in this document, and copied to a spreadsheet
- "Text to Columns" as needed
I'm sure there is a way to parse the JSON with "jq" but I couldn't figure it out. I needed to do this versus CSV, because the repo doesn't have the real date, but has "uint64."
Update 06August2018:
Install xml2json from GitHub, then run the command below:
cat backup.xml | xml2json > backup.json
Run these JQ Commands (updated 02Sep2018):
for i in {0..1690}; do cat backup.json | jq ".smses.sms[$i]._address, .smses.sms[$i]._type, .smses.sms[$i]._readable_date" >> export.txt ; echo "" >> export.txt; done; echo "done"
cat backup.json | jq '.smses.sms | length'
for i in {0..2450}; do cat backup.json | jq ".smses.sms[$i].\"@address\", .smses.sms[$i].\"@type\", .smses.sms[$i].\"@readable_date\"" >> export.txt; echo "" >> export.txt; done
More Updates as sometimes the above doesn't work; 1 is received:
cat backup.json | jq '.smses.sms' | grep 'status' | wc for i in {0..2873}; do cat backup.json | jq ".smses.sms[$i].address, .smses.sms[$i].type, .smses.sms[$i].readable_date" >> export.txt; echo "" >> export.txt; done
Convert from UTC in Excel:
=B3 + (10 / 24)
Sources: