Home » Questions » Computers [ Ask a new question ]

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

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

I'm using Skype on Linux.

Asked by: Guest | Views: 269
Total answers/comments: 2
Guest [Entry]

"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"
Guest [Entry]

"This Skype forum thread is about avatars: http://forum.skype.com/index.php?showtopic=99471.

First, they discuss some commands that allow you saving avatars from Skype cache with it public interface through it doesn't apparently work on Linux. I don't know if they fixed that interface already, and that's not what your question is about.
Second, one Skype dev said that all images are stored in JPEG format and provide a header in hex (JFIF). grep'ing hexdump of all Skype files with the for i in *; do echo $i; hd $i | grep 'ff d8 ff e0'; done command revealed many occurences of this header in .Skype/userNNN.dbb files where NNN is some number. This files have some absolutely undocumented, proprietary format and are probably keeping all cached information about users; you can extract avatars themselves by scanning for header and then copying everything until end of file to other file. All image viewers will skip any data after the image itself (a technology RARJPG is based on), and if you want to remove junk out of them you can ""modify"" it without modifying e.g. with imagemagick and command convert file.jpg file_clean.jpg. ImageMagick behaves as described viewer: it reads image, skips anything that follow it and then writes only image itself."