File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -45,17 +45,19 @@ func (f *Fingerprinter) getSuperCookies() string {
45
45
}
46
46
47
47
func (f * Fingerprinter ) getEntropy () string {
48
- // Idk what's that is supposed to do exactly, in this place useragent is already hashed, so it doesn't really check anything.
48
+ mobile := [] string { "iPad" , "iPhone" , "iPod" }
49
49
50
- // mobile := []string{"iPad", "iPhone", "iPod"}
51
- // if slices.Contains(mobile, f.userAgent) {
52
- // return "20"
53
- // }
50
+ for _ , mobileString := range mobile {
51
+ if strings .Contains (strings .ToLower (f .UserAgentString ), strings .ToLower (mobileString )) {
52
+ return "20"
53
+ }
54
+ }
54
55
55
56
return "40"
56
57
}
57
58
58
59
func (f * Fingerprinter ) GenerateFingerPrint () string {
60
+ entropy := f .getEntropy ()
59
61
plugins := f .calculateMd5 (f .PluginsString , f .Plugins )
60
62
nrOfPlugins := f .padString (fmt .Sprint (f .PluginCount ), f .NrOfPlugins )
61
63
fonts := f .padString ("" , f .Fonts )
@@ -72,7 +74,6 @@ func (f *Fingerprinter) GenerateFingerPrint() string {
72
74
doNotTrack := f .calculateMd5 (f .DoNotTrackString , f .DoNotTrack )
73
75
jsFonts := "iZCqnI4lsk"
74
76
webglFp := "fKkhnraRhX"
75
- entropy := f .getEntropy ()
76
77
77
78
if f .Verbose {
78
79
fmt .Printf ("plugins: %v\n " , plugins )
You can’t perform that action at this time.
0 commit comments