- Регистрация
- 25.01.2012
- Сообщения
- 1 058
- Благодарностей
- 244
- Баллы
- 63
I use the following C# snippet for randomly hiding fonts and change font fingerprint:
The code works well if I e.g. just got to browserleaks.com/fonts execute the C# snippet and re-check on browserleaks.com the font fingerprint has changed. BUT if I load a profile (that I have generated and saved before) before the C# snippet nothing changes. I can execute the snippet several times and also delete cookies and cache before going to browserleak again but the font fingerprint is not changing anymore and stays always the same.
What am I doing wrong? Please help. Thank you
C#:
var fonts = instance.GetFonts();
project.SendInfoToLog("Starting nr of fonts: " + fonts.Count(), true);
if (fonts != null)
{
Random rnd = new Random();
var fontList = fonts.ToList();
for (int i = 0; i < fontList.Count; i++) {
int random = rnd.Next(0,5);
if (random == 3) {
instance.HideFont(fontList[i]);
}
}
}
var fontsNew = instance.GetFonts();
project.SendInfoToLog("Nr of fonts after code completion: " + fontsNew.Count(), true);
What am I doing wrong? Please help. Thank you