Esempio n. 1
0
    // Token: 0x06000FC1 RID: 4033 RVA: 0x00048A04 File Offset: 0x00046C04
    public Interface6 imethod_5(Interface6 interface6_0)
    {
        Class174 @class = (Class174)interface6_0;

        this.xmlNode_0.AppendChild(@class.xmlNode_0);
        this.list_0 = null;
        this.list_1 = null;
        return(interface6_0);
    }
Esempio n. 2
0
    // Token: 0x06000FBE RID: 4030 RVA: 0x000489C8 File Offset: 0x00046BC8
    public Interface6 imethod_4()
    {
        XmlAttribute xmlAttribute;
        XmlNode      xmlNode = ((xmlAttribute = (this.xmlNode_0 as XmlAttribute)) != null) ? xmlAttribute.OwnerElement : this.xmlNode_0.ParentNode;

        if (xmlNode == null)
        {
            return(null);
        }
        return(Class174.smethod_0(xmlNode));
    }
Esempio n. 3
0
    // Token: 0x06000096 RID: 150 RVA: 0x00009944 File Offset: 0x00007B44
    public Class14(string string_0 = null, string string_1 = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36", int int_0 = 10, bool bool_1 = false, bool bool_2 = false, JObject jobject_0 = null)
    {
        this.bool_0            = bool_1;
        this.cookieContainer_0 = new CookieContainer();
        WebRequestHandler webRequestHandler = new WebRequestHandler
        {
            UseCookies               = true,
            CookieContainer          = this.cookieContainer_0,
            AllowAutoRedirect        = false,
            Proxy                    = Class14.smethod_0(string_0),
            PreAuthenticate          = true,
            AutomaticDecompression   = (DecompressionMethods.GZip | DecompressionMethods.Deflate),
            ClientCertificateOptions = ClientCertificateOption.Manual
        };

        if (!bool_2)
        {
            webRequestHandler.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(this.method_0);
        }
        Class174 innerHandler = new Class174
        {
            InnerHandler = webRequestHandler
        };
        ClearanceHandler handler = new ClearanceHandler
        {
            InnerHandler = innerHandler,
            MaxRetries   = 3
        };

        this.httpClient_0 = new HttpClient(handler)
        {
            Timeout = TimeSpan.FromSeconds((double)int_0)
        };
        this.httpClient_0.DefaultRequestHeaders.TryAddWithoutValidation("User-Agent", string_1);
        this.httpClient_0.DefaultRequestHeaders.TryAddWithoutValidation("Accept-Encoding", "gzip, deflate");
        this.httpClient_0.DefaultRequestHeaders.TryAddWithoutValidation("Upgrade-Insecure-Requests", "1");
        this.httpClient_0.DefaultRequestHeaders.TryAddWithoutValidation("Accept-Language", "en-GB,en-US;q=0.9,en;q=0.8");
        this.httpClient_0.DefaultRequestHeaders.TryAddWithoutValidation("Connection", "keep-alive");
        if (jobject_0 != null)
        {
            foreach (KeyValuePair <string, JToken> keyValuePair in jobject_0)
            {
                this.httpClient_0.DefaultRequestHeaders.TryAddWithoutValidation(keyValuePair.Key, (string)keyValuePair.Value);
            }
        }
    }
Esempio n. 4
0
 // Token: 0x06000FBC RID: 4028 RVA: 0x000488E4 File Offset: 0x00046AE4
 public List <Interface6> imethod_3()
 {
     if (this.list_1 == null)
     {
         if (!this.method_0())
         {
             this.list_1 = XmlNodeConverter.list_0;
         }
         else
         {
             this.list_1 = new List <Interface6>(this.xmlNode_0.Attributes.Count);
             foreach (object obj in this.xmlNode_0.Attributes)
             {
                 XmlAttribute object_ = (XmlAttribute)obj;
                 this.list_1.Add(Class174.smethod_0(object_));
             }
         }
     }
     return(this.list_1);
 }
Esempio n. 5
0
 // Token: 0x06000FB9 RID: 4025 RVA: 0x000487E8 File Offset: 0x000469E8
 public List <Interface6> imethod_2()
 {
     if (this.list_0 == null)
     {
         if (!this.xmlNode_0.HasChildNodes)
         {
             this.list_0 = XmlNodeConverter.list_0;
         }
         else
         {
             this.list_0 = new List <Interface6>(this.xmlNode_0.ChildNodes.Count);
             foreach (object obj in this.xmlNode_0.ChildNodes)
             {
                 XmlNode object_ = (XmlNode)obj;
                 this.list_0.Add(Class174.smethod_0(object_));
             }
         }
     }
     return(this.list_0);
 }
Esempio n. 6
0
 // Token: 0x06000140 RID: 320 RVA: 0x0000F3D4 File Offset: 0x0000D5D4
 public void imethod_1(int int_0, out byte byte_0)
 {
     if (int_0 >= 0 && int_0 < this.imethod_0())
     {
         IntPtr intPtr = IntPtr.Zero;
         char   char_  = '\0';
         try
         {
             intPtr = Marshal.SecureStringToGlobalAllocUnicode(this.secureString_0);
             char_  = (char)Marshal.ReadInt16(intPtr, int_0 * 2);
             byte_0 = Class26.smethod_1(char_, int_0);
             return;
         }
         finally
         {
             Class174.smethod_3(ref char_);
             if (intPtr != IntPtr.Zero)
             {
                 Marshal.ZeroFreeGlobalAllocUnicode(intPtr);
             }
         }
     }
     throw new ArgumentOutOfRangeException();
 }
Esempio n. 7
0
        // Token: 0x060007FA RID: 2042 RVA: 0x000467A4 File Offset: 0x000449A4
        void IAsyncStateMachine.MoveNext()
        {
            int                 num2;
            int                 num    = num2;
            Class174            @class = this;
            HttpResponseMessage result2;

            try
            {
                TaskAwaiter <HttpResponseMessage> taskAwaiter5;
                TaskAwaiter <Uri> taskAwaiter6;
                switch (num)
                {
                case 0:
                    taskAwaiter5 = taskAwaiter2;
                    taskAwaiter2 = default(TaskAwaiter <HttpResponseMessage>);
                    num2         = -1;
                    goto IL_DB;

                case 1:
                    taskAwaiter6 = taskAwaiter4;
                    taskAwaiter4 = default(TaskAwaiter <Uri>);
                    num2         = -1;
                    goto IL_159;

                case 2:
                    taskAwaiter5 = taskAwaiter2;
                    taskAwaiter2 = default(TaskAwaiter <HttpResponseMessage>);
                    num2         = -1;
                    goto IL_22F;
                }
IL_AB:
                @class.method_0(request);
                taskAwaiter5 = @class.method_2(request, cancellationToken).GetAwaiter();
                if (!taskAwaiter5.IsCompleted)
                {
                    num2         = 0;
                    taskAwaiter2 = taskAwaiter5;
                    this.asyncTaskMethodBuilder_0.AwaitUnsafeOnCompleted <TaskAwaiter <HttpResponseMessage>, Class174.Struct145>(ref taskAwaiter5, ref this);
                    return;
                }
IL_DB:
                HttpResponseMessage result = taskAwaiter5.GetResult();
                if (!result.Headers.Contains("cf-chl-bypass"))
                {
                    result2 = result;
                    goto IL_2D3;
                }
                method             = request.Method;
                requestUri         = request.RequestUri;
                request.Method     = HttpMethod.Get;
                httpRequestMessage = request;
                taskAwaiter6       = @class.method_1(result, cancellationToken).GetAwaiter();
                if (!taskAwaiter6.IsCompleted)
                {
                    num2         = 1;
                    taskAwaiter4 = taskAwaiter6;
                    this.asyncTaskMethodBuilder_0.AwaitUnsafeOnCompleted <TaskAwaiter <Uri>, Class174.Struct145>(ref taskAwaiter6, ref this);
                    return;
                }
IL_159:
                Uri result3 = taskAwaiter6.GetResult();
                httpRequestMessage.RequestUri = result3;
                httpRequestMessage            = null;
                request.Headers.TryAddWithoutValidation("referer", requestUri.ToString());
                taskAwaiter5 = @class.method_2(request, cancellationToken).GetAwaiter();
                if (!taskAwaiter5.IsCompleted)
                {
                    num2         = 2;
                    taskAwaiter2 = taskAwaiter5;
                    this.asyncTaskMethodBuilder_0.AwaitUnsafeOnCompleted <TaskAwaiter <HttpResponseMessage>, Class174.Struct145>(ref taskAwaiter5, ref this);
                    return;
                }
IL_22F:
                HttpResponseMessage result4 = taskAwaiter5.GetResult();
                if (result4.Headers.Contains("Set-Cookie"))
                {
                    foreach (string text in (string[])result4.Headers.GetValues("Set-Cookie"))
                    {
                        if (text.Contains("cf_clearance"))
                        {
                            Class48.string_7 = text.Replace("cf_clearance=", string.Empty).Split(new char[]
                            {
                                ';'
                            })[0];
                            Console.WriteLine(Class48.string_7);
                        }
                    }
                }
                request.Method     = method;
                request.RequestUri = requestUri;
                goto IL_AB;
            }
            catch (Exception exception)
            {
                num2 = -2;
                this.asyncTaskMethodBuilder_0.SetException(exception);
                return;
            }
IL_2D3:
            num2 = -2;
            this.asyncTaskMethodBuilder_0.SetResult(result2);
        }
 public abstract void Visit(Class174 c);
 public override void Visit(Class174 c) { }
Esempio n. 10
0
    // Token: 0x06000FA6 RID: 4006 RVA: 0x000487BC File Offset: 0x000469BC
    public void imethod_7(Interface6 interface6_0)
    {
        Class174 @class = (Class174)interface6_0;

        this.object_0.SetAttributeNode((XmlAttribute)@class.imjghrpgVE());
    }