From d4d284ba4e50019b0934461a6a847f58283425cd Mon Sep 17 00:00:00 2001 From: radioman Date: Wed, 31 Aug 2016 02:04:34 +0300 Subject: [PATCH] GMap.NET.Core: UserAgent fix --- GMap.NET.Core/GMap.NET.MapProviders/GMapProvider.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/GMap.NET.Core/GMap.NET.MapProviders/GMapProvider.cs b/GMap.NET.Core/GMap.NET.MapProviders/GMapProvider.cs index 3ad72d24..ea6a02ec 100644 --- a/GMap.NET.Core/GMap.NET.MapProviders/GMapProvider.cs +++ b/GMap.NET.Core/GMap.NET.MapProviders/GMapProvider.cs @@ -323,8 +323,11 @@ public virtual void OnInitialized() /// /// Gets or sets the value of the User-agent HTTP header. /// It's pseudo-randomized to avoid blockages... - /// - public static string UserAgent = string.Format("Mozilla/5.0 (Windows NT 6.1; WOW64; rv:{0}.0) Gecko/{2}{3:00}{4:00} Firefox/{0}.0.{1}", Stuff.random.Next(3, 14), Stuff.random.Next(1, 10), Stuff.random.Next(DateTime.Today.Year - 4, DateTime.Today.Year), Stuff.random.Next(12), Stuff.random.Next(30)); + /// + public static string UserAgent = string.Format("Mozilla/5.0 (Windows NT {1}.0; {2}rv:{0}.0) Gecko/20100101 Firefox/{0}.0", + Stuff.random.Next(DateTime.Today.Year - 1969 - 5, DateTime.Today.Year - 1969), + Stuff.random.Next(0, 10) % 2 == 0 ? 10 : 6, + Stuff.random.Next(0, 10) % 2 == 1 ? string.Empty : "WOW64; "); /// /// timeout for provider connections