diff --git a/EZPPClient Installer/DownloadUtil.cs b/EZPPClient Installer/DownloadUtil.cs index 592a59f..0fe8491 100644 --- a/EZPPClient Installer/DownloadUtil.cs +++ b/EZPPClient Installer/DownloadUtil.cs @@ -24,6 +24,7 @@ namespace EZPPClient_Installer using (WebClient wc = new WebClient()) { + wc.Headers.Add("user-agent", "EZPPClientInstaller"); var data = wc.DownloadString("https://new.ez-pp.farm/ezppclient?list"); string[] dataList = data.Split('\n'); foreach (string datastring in dataList) @@ -109,6 +110,7 @@ namespace EZPPClient_Installer { using (WebClient wc = new WebClient()) { + wc.Headers.Add("user-agent", "EZPPClientInstaller"); wc.DownloadProgressChanged += (sender, value) => MainWindow.updateProgress(filename + " - " + value.ProgressPercentage + "% - " + Math.Round((value.BytesReceived / 1024000D), 2) + "MB/" + Math.Round((value.TotalBytesToReceive / 1024000D), 2) + "MB", value.ProgressPercentage); await wc.DownloadFileTaskAsync(@"https://new.ez-pp.farm/ezppclient?file=" + filename, path + @"\" + filename); } diff --git a/EZPPClient Installer/MainWindow.xaml.cs b/EZPPClient Installer/MainWindow.xaml.cs index 78afe7a..d1286d9 100644 --- a/EZPPClient Installer/MainWindow.xaml.cs +++ b/EZPPClient Installer/MainWindow.xaml.cs @@ -110,6 +110,7 @@ namespace EZPPClient_Installer { using (WebClient client = new WebClient()) { + client.Headers.Add("user-agent", "EZPPClientInstaller"); string newVersionString = client.DownloadString("https://new.ez-pp.farm/ezppclient?version"); double ver = 0; try