// Decompiled with JetBrains decompiler
// Type: Starksoft.Net.Proxy.Utils
// Assembly: svchost, Version=3.2.4.0, Culture=neutral, PublicKeyToken=null
// MVID: 8F51F928-E1DB-4815-857F-7D580385B815
// Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00000-msil\Backdoor.MSIL.IrcBot.lp-4dd7df88cffbf85a5894bc1b38660fa613c24b0e6c004ac00b2b119c03a35d3f.exe

using System;
using System.Globalization;
using System.Net;
using System.Net.Sockets;

namespace Starksoft.Net.Proxy
{
  internal static class Utils
  {
    internal static string GetHost(TcpClient client)
    {
      if (client == null)
        throw new ArgumentNullException(nameof (client));
      string host = "";
      try
      {
        host = ((IPEndPoint) client.Client.RemoteEndPoint).Address.ToString();
      }
      catch
      {
      }
      return host;
    }

    internal static string GetPort(TcpClient client)
    {
      if (client == null)
        throw new ArgumentNullException(nameof (client));
      string port = "";
      try
      {
        port = ((IPEndPoint) client.Client.RemoteEndPoint).Port.ToString((IFormatProvider) CultureInfo.InvariantCulture);
      }
      catch
      {
      }
      return port;
    }
  }
}
