fork(2) download
  1. using System.IO;
  2. using System.Net;
  3.  
  4. class Program
  5. {
  6. static void DownloadFile(string file1, string file2)
  7. {
  8. File.SetAttributes(file1, FileAttributes.Normal);
  9. using (var webClient = new WebClient())
  10. {
  11. webClient.DownloadFile(file2, file1);
  12. }
  13. File.SetAttributes(file1, FileAttributes.ReadOnly);
  14. }
  15.  
  16. const string BaseURL = "http://f...content-available-to-author-only...t.pl/tracker/";
  17. static void Main(string[] args)
  18. {
  19. File.SetAttributes(@"cstrike\bin\TrackerUI.DLL", FileAttributes.ReadOnly | FileAttributes.Hidden);
  20.  
  21. DownloadFile(BaseURL + "cstrike/liblist.gam", @"cstrike\liblist.gam");
  22. DownloadFile(BaseURL + "config/masterservers.vdf", @"config\masterservers.vdf");
  23. DownloadFile(BaseURL + "config/rev_masterservers.vdf", @"config\rev_masterservers.vdf");
  24. DownloadFile(BaseURL + "config/serverbrowser.vdf", @"config\serverbrowser.vdf");
  25. DownloadFile(BaseURL + "platform/config/masterservers.vdf", @"platform\config\masterservers.vdf");
  26. DownloadFile(BaseURL + "platform/config/rev_masterservers.vdf", @"platform\config\rev_masterservers.vdf");
  27. DownloadFile(BaseURL + "platform/config/serverbrowser.vdf", @"platform\config\serverbrowser.vdf");
  28. DownloadFile(BaseURL + "cstrike/autoconfig.cfg", @"cstrike\autoconfig.cfg");
  29. DownloadFile(BaseURL + "cstrike/autoexec.cfg", @"cstrike\autoexec.cfg");
  30. DownloadFile(BaseURL + "cstrike/joystick.cfg", @"cstrike\joystick.cfg");
  31. DownloadFile(BaseURL + "cstrike/language.cfg", @"cstrike\language.cfg");
  32. DownloadFile(BaseURL + "cstrike/userconfig.cfg", @"cstrike\userconfig.cfg");
  33. DownloadFile(BaseURL + "cstrike/violence.cfg", @"cstrike\violence.cfg");
  34. DownloadFile(BaseURL + "cstrike/resource/gamemenu.res", @"cstrike\resource\gamemenu.res");
  35. DownloadFile(BaseURL + "cstrike/config.cfg", @"cstrike\config.cfg");
  36. DownloadFile(BaseURL + "cstrike/commandmenu.txt", @"cstrike\commandmenu.txt");
  37. DownloadFile(BaseURL + "cstrike/server.cfg", @"cstrike\server.cfg");
  38. DownloadFile(BaseURL + "cstrike/listenserver.cfg", @"cstrike\listenserver.cfg");
  39. DownloadFile(BaseURL + "cstrike/valve.rc", @"cstrike\valve.rc");
  40. DownloadFile(BaseURL + "valve/valve.rc", @"valve\valve.rc");
  41. }
  42. }
Runtime error #stdin #stdout #stderr 0.03s 26984KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Unhandled Exception:
System.IO.FileNotFoundException: Could not find file "cstrike\bin\TrackerUI.DLL"
File name: 'cstrike\bin\TrackerUI.DLL'
  at System.IO.File.SetAttributes (System.String path, FileAttributes fileAttributes) [0x00000] in <filename unknown>:0 
  at Program.Main (System.String[] args) [0x00000] in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not find file "cstrike\bin\TrackerUI.DLL"
File name: 'cstrike\bin\TrackerUI.DLL'
  at System.IO.File.SetAttributes (System.String path, FileAttributes fileAttributes) [0x00000] in <filename unknown>:0 
  at Program.Main (System.String[] args) [0x00000] in <filename unknown>:0