Futbin Proxy

mail@pastecode.io avatar
unknown
csharp
2 years ago
1.2 kB
3
Indexable
Never
public Futbin(string sPlatform, string sProxyAddress, string sProxyUser)
{
    if (sPlatform.ToLower().Contains("xbox"))
        this.sPlatform = "xone";
    else if (sPlatform.ToLower().Contains("ps4"))
        this.sPlatform = "ps";
    else if (sPlatform.ToLower().Contains("pc"))
        this.sPlatform = "pc";

    this.sPlatformFilter = this.sPlatform == "xone" ? "xbox" : this.sPlatform;
    this.sPlatformFilterPrp = this.sPlatform == "xone" ? "xb" : this.sPlatform;

    client = new WebClient();
    if (!String.IsNullOrEmpty(sProxyAddress))
    {
        WebProxy p = new WebProxy(sProxyAddress.Split(':')[0], Convert.ToInt32(sProxyAddress.Split(':')[1]));
        if (!String.IsNullOrEmpty(sProxyUser) && sProxyUser.Contains(":"))
            p.Credentials = new NetworkCredential(sProxyUser.Split(':')[0], sProxyUser.Split(':')[1]);
        client.Proxy = p;
    }
    client.Headers.Add(HttpRequestHeader.Cookie, "platform_type=" + (this.sPlatform == "pc" ? "pc" : "console") + ";platform=" + this.sPlatform);
    client.Encoding = ASCIIEncoding.UTF8;

    try
    {
        string a = client.DownloadString("https://www.whatismyip-address.com/");
    }
    catch(Exception c) { }
}