Wednesday 13 February 2019

Where does Skype save my contact's avatars in Linux?


I'm using Skype on Linux.


Where can I find images cached by skype of my contact's avatars?



Answer



I wanted to get those Skype avatars too so I used whitequark's answer to make a little bash script which does just that. Here it is:



#!/bin/bash

if [ \( $# -lt 1 \) ];
then
echo "Usage: $0 folder";
echo "Where folder is of the form /home/username/.Skype/username";
exit;
fi;

for i in `ls $1`;
do
if [ -f $1/$i ];
then
#echo "i: $i";
filedump=`hexdump -v -e '"" 1/1 "%02x" ""' $1/$i | sed -e 's/ffd8ffe0/\nffd8ffe0/g'`;
nocc=`echo "$filedump" | wc -l`; # occurences of the \n char. Means that there are nocc-1 occurences of our word
#echo "nocc: $nocc";
if [ "$nocc" -ge 2 ];
then
k=0;
old_IFS=$IFS; #field separator
IFS=$'\n';
offset=0;
for j in $filedump;
do
w=`echo $j | wc -m`; # gives actually lettercount+1
w=$[w-1];
offset=$[offset+w];
#echo "offset: $offset";
filename1="${i}_${k}_notclean.jpg";
filename2="${i}_${k}.jpg";
dd ibs=1 if=$1/$i of=$filename1 skip=`echo "$offset/2" | bc` status=noxfer;
if [ `du $filename1 | cut -f1` -gt 0 ];
then
convert $filename1 $filename2; #convert is actually only used to remove the data after the image
fi;
rm $filename1;
k=$[k+1];
done;
IFS=$old_IFS;
fi;
fi;
done

No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...