Advertisement
Guest User

Untitled

a guest
Aug 31st, 2013
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 13.26 KB | None | 0 0
  1. public class Form1 : Form
  2. {
  3.     // Fields
  4.     private string btc = "";
  5.     private Button button1;
  6.     private Button button2;
  7.     private IContainer components;
  8.     private int kolejne;
  9.     private Label label1;
  10.     private Label label2;
  11.     private string link = "";
  12.     private LinkLabel linkLabel1;
  13.     private ListBox listBox1;
  14.     private int los;
  15.     private string obrazek;
  16.     private PictureBox pictureBox1;
  17.     private string ramka;
  18.     private string recaptcha_challenge_field;
  19.     private StatusStrip statusStrip1;
  20.     private TextBox textBox1;
  21.     private TextBox textBox2;
  22.     private Timer timer1;
  23.     private ToolStripStatusLabel toolStripStatusLabel1;
  24.  
  25.     // Methods
  26.     public Form1()
  27.     {
  28.         this.InitializeComponent();
  29.     }
  30.  
  31.     private void button1_Click(object sender, EventArgs e)
  32.     {
  33.         this.wykonaj();
  34.     }
  35.  
  36.     private void button2_Click(object sender, EventArgs e)
  37.     {
  38.         this.Strona(this.listBox1.Items[this.kolejne].ToString());
  39.     }
  40.  
  41.     protected override void Dispose(bool disposing)
  42.     {
  43.         if (disposing && (this.components != null))
  44.         {
  45.             this.components.Dispose();
  46.         }
  47.         base.Dispose(disposing);
  48.     }
  49.  
  50.     private void Form1_Load(object sender, EventArgs e)
  51.     {
  52.         List<string> list = new List<string> { "1Donate23Ne6m3sTkzZwz1xsxrv9dWFEsq", "1JhXAaop2hLMAdYG9bKU8vhG6gL8Ry6n5w", "19Yn163UbKSVFhypkidSjFwR7LmdCpAXp9", "1PtqL13JPPfYoQNzLSdQN85QMFz9QBo4nG", "1GRLvMqHXuWBxqEwvMg4oTSJ9Yvwt5WxaY" };
  53.         int num = new Random().Next(list.Count);
  54.         this.btc = list[num];
  55.         this.los = new Random().Next(this.listBox1.Items.Count);
  56.         string[] strArray = new string[] { "(", (this.kolejne + 1).ToString(), "/", this.listBox1.Items.Count.ToString(), ") - ", this.listBox1.Items[0].ToString() };
  57.         this.toolStripStatusLabel1.Text = string.Concat(strArray);
  58.         this.Strona(this.listBox1.Items[0].ToString());
  59.     }
  60.  
  61.     public static string HttpGet(string URI)
  62.     {
  63.         try
  64.         {
  65.             StreamReader reader = new StreamReader(WebRequest.Create(URI).GetResponse().GetResponseStream());
  66.             return reader.ReadToEnd().Trim();
  67.         }
  68.         catch
  69.         {
  70.             return "";
  71.         }
  72.     }
  73.  
  74.     public static string HttpPost(string URI, string Parameters)
  75.     {
  76.         try
  77.         {
  78.             WebRequest request = WebRequest.Create(URI);
  79.             request.ContentType = "application/x-www-form-urlencoded";
  80.             request.Method = "POST";
  81.             byte[] bytes = Encoding.ASCII.GetBytes(Parameters);
  82.             request.ContentLength = bytes.Length;
  83.             Stream requestStream = request.GetRequestStream();
  84.             requestStream.Write(bytes, 0, bytes.Length);
  85.             requestStream.Close();
  86.             WebResponse response = request.GetResponse();
  87.             if (response == null)
  88.             {
  89.                 return null;
  90.             }
  91.             StreamReader reader = new StreamReader(response.GetResponseStream());
  92.             return reader.ReadToEnd().Trim();
  93.         }
  94.         catch
  95.         {
  96.             return "";
  97.         }
  98.     }
  99.  
  100.     private void InitializeComponent()
  101.     {
  102.         this.components = new Container();
  103.         ComponentResourceManager manager = new ComponentResourceManager(typeof(Form1));
  104.         this.button1 = new Button();
  105.         this.textBox1 = new TextBox();
  106.         this.pictureBox1 = new PictureBox();
  107.         this.textBox2 = new TextBox();
  108.         this.label1 = new Label();
  109.         this.label2 = new Label();
  110.         this.linkLabel1 = new LinkLabel();
  111.         this.listBox1 = new ListBox();
  112.         this.statusStrip1 = new StatusStrip();
  113.         this.toolStripStatusLabel1 = new ToolStripStatusLabel();
  114.         this.button2 = new Button();
  115.         this.timer1 = new Timer(this.components);
  116.         ((ISupportInitialize) this.pictureBox1).BeginInit();
  117.         this.statusStrip1.SuspendLayout();
  118.         base.SuspendLayout();
  119.         this.button1.Font = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Regular, GraphicsUnit.Point, 0xee);
  120.         this.button1.Location = new Point(0xfe, 0x9e);
  121.         this.button1.Name = "button1";
  122.         this.button1.Size = new Size(0x4b, 0x1a);
  123.         this.button1.TabIndex = 0;
  124.         this.button1.Text = "Submit";
  125.         this.button1.UseVisualStyleBackColor = true;
  126.         this.button1.Click += new EventHandler(this.button1_Click);
  127.         this.textBox1.Font = new Font("Microsoft Sans Serif", 12f, FontStyle.Bold, GraphicsUnit.Point, 0xee);
  128.         this.textBox1.Location = new Point(0x1d, 0x9e);
  129.         this.textBox1.Name = "textBox1";
  130.         this.textBox1.Size = new Size(0xcc, 0x1a);
  131.         this.textBox1.TabIndex = 1;
  132.         this.textBox1.KeyPress += new KeyPressEventHandler(this.textBox1_KeyPress);
  133.         this.pictureBox1.Location = new Point(0x1d, 0x47);
  134.         this.pictureBox1.Name = "pictureBox1";
  135.         this.pictureBox1.Size = new Size(300, 0x39);
  136.         this.pictureBox1.TabIndex = 2;
  137.         this.pictureBox1.TabStop = false;
  138.         this.textBox2.Font = new Font("Microsoft Sans Serif", 10f, FontStyle.Regular, GraphicsUnit.Point, 0xee);
  139.         this.textBox2.Location = new Point(0x1d, 0x19);
  140.         this.textBox2.Name = "textBox2";
  141.         this.textBox2.Size = new Size(300, 0x17);
  142.         this.textBox2.TabIndex = 3;
  143.         this.textBox2.Text = "1NRNYQr6WZXFyAsMz5pyieLnLN6goK8sCR";
  144.         this.label1.AutoSize = true;
  145.         this.label1.Font = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Bold, GraphicsUnit.Point, 0xee);
  146.         this.label1.Location = new Point(0x1a, 9);
  147.         this.label1.Name = "label1";
  148.         this.label1.Size = new Size(0xbf, 13);
  149.         this.label1.TabIndex = 4;
  150.         this.label1.Text = "Insert your Bitcoin address here:";
  151.         this.label2.AutoSize = true;
  152.         this.label2.Font = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Bold, GraphicsUnit.Point, 0xee);
  153.         this.label2.Location = new Point(0x1a, 0x8e);
  154.         this.label2.Name = "label2";
  155.         this.label2.Size = new Size(0x3a, 13);
  156.         this.label2.TabIndex = 5;
  157.         this.label2.Text = "Captcha:";
  158.         this.linkLabel1.AutoSize = true;
  159.         this.linkLabel1.Font = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Bold, GraphicsUnit.Point, 0xee);
  160.         this.linkLabel1.Location = new Point(0x4c, 0xe4);
  161.         this.linkLabel1.Name = "linkLabel1";
  162.         this.linkLabel1.Size = new Size(0xfd, 13);
  163.         this.linkLabel1.TabIndex = 6;
  164.         this.linkLabel1.TabStop = true;
  165.         this.linkLabel1.Text = "Your payment has been sent to CoinBox.me";
  166.         this.linkLabel1.LinkClicked += new LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
  167.         this.listBox1.FormattingEnabled = true;
  168.         this.listBox1.Items.AddRange(new object[] { "http://www.bitcats.net", "http://www.bitcoins4free.me", "http://www.btc4you.com", "http://www.canhasbitcoin.com", "http://www.elbitcoingratis.es", "http://www.faucetbtc.com", "http://www.fr33bitcoins.com", "http://www.freebitcoins.me", "http://www.freebitcoins4u.com", "http://www.nioctib.net", "http://www.rawbitcoins.com", "http://www.srbitcoin.com", "http://www.thebitcoin.me", "http://www.thefreebitcoins.com", "http://www.virtualfaucet.com" });
  169.         this.listBox1.Location = new Point(0xf5, 0x47);
  170.         this.listBox1.Name = "listBox1";
  171.         this.listBox1.Size = new Size(0x54, 0x38);
  172.         this.listBox1.TabIndex = 7;
  173.         this.listBox1.Visible = false;
  174.         this.statusStrip1.Items.AddRange(new ToolStripItem[] { this.toolStripStatusLabel1 });
  175.         this.statusStrip1.Location = new Point(0, 0xfb);
  176.         this.statusStrip1.Name = "statusStrip1";
  177.         this.statusStrip1.Size = new Size(0x169, 0x16);
  178.         this.statusStrip1.TabIndex = 8;
  179.         this.statusStrip1.Text = "statusStrip1";
  180.         this.toolStripStatusLabel1.AutoSize = false;
  181.         this.toolStripStatusLabel1.Name = "toolStripStatusLabel1";
  182.         this.toolStripStatusLabel1.Size = new Size(240, 0x11);
  183.         this.toolStripStatusLabel1.TextAlign = ContentAlignment.MiddleLeft;
  184.         this.button2.Font = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Regular, GraphicsUnit.Point, 0xee);
  185.         this.button2.Location = new Point(0x1d, 190);
  186.         this.button2.Name = "button2";
  187.         this.button2.Size = new Size(0x4b, 0x1a);
  188.         this.button2.TabIndex = 9;
  189.         this.button2.Text = "Refresh";
  190.         this.button2.UseVisualStyleBackColor = true;
  191.         this.button2.Click += new EventHandler(this.button2_Click);
  192.         this.timer1.Interval = 0x1b7740;
  193.         this.timer1.Tick += new EventHandler(this.timer1_Tick);
  194.         base.AutoScaleDimensions = new SizeF(6f, 13f);
  195.         base.AutoScaleMode = AutoScaleMode.Font;
  196.         base.ClientSize = new Size(0x169, 0x111);
  197.         base.Controls.Add(this.button2);
  198.         base.Controls.Add(this.statusStrip1);
  199.         base.Controls.Add(this.listBox1);
  200.         base.Controls.Add(this.linkLabel1);
  201.         base.Controls.Add(this.label2);
  202.         base.Controls.Add(this.label1);
  203.         base.Controls.Add(this.textBox2);
  204.         base.Controls.Add(this.pictureBox1);
  205.         base.Controls.Add(this.textBox1);
  206.         base.Controls.Add(this.button1);
  207.         base.Icon = (Icon) manager.GetObject("$this.Icon");
  208.         base.MaximizeBox = false;
  209.         this.MaximumSize = new Size(0x179, 0x137);
  210.         this.MinimumSize = new Size(0x179, 0x137);
  211.         base.Name = "Form1";
  212.         base.StartPosition = FormStartPosition.CenterScreen;
  213.         this.Text = "FreeBitCoin 1.0.0.0 \x00a9 2013r. M.D.";
  214.         base.Load += new EventHandler(this.Form1_Load);
  215.         ((ISupportInitialize) this.pictureBox1).EndInit();
  216.         this.statusStrip1.ResumeLayout(false);
  217.         this.statusStrip1.PerformLayout();
  218.         base.ResumeLayout(false);
  219.         base.PerformLayout();
  220.     }
  221.  
  222.     private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
  223.     {
  224.         Process.Start("http://www.coinbox.me/?a=" + this.textBox2.Text);
  225.     }
  226.  
  227.     public void Strona(string strona)
  228.     {
  229.         this.link = strona;
  230.         string input = HttpGet(this.link);
  231.         Regex regex = new Regex("(http...www.google.com.recaptcha.api.noscript.*). height");
  232.         foreach (Match match in regex.Matches(input))
  233.         {
  234.             this.ramka = match.Groups[1].Value;
  235.         }
  236.         string str2 = HttpGet(this.ramka);
  237.         Regex regex2 = new Regex("(image.*).><.center>");
  238.         foreach (Match match2 in regex2.Matches(str2))
  239.         {
  240.             this.obrazek = match2.Groups[1].Value;
  241.         }
  242.         regex2 = new Regex("id..recaptcha_challenge_field. value..(.*).>");
  243.         foreach (Match match3 in regex2.Matches(str2))
  244.         {
  245.             this.recaptcha_challenge_field = match3.Groups[1].Value;
  246.         }
  247.         try
  248.         {
  249.             this.pictureBox1.LoadAsync("http://www.google.com/recaptcha/api/" + this.obrazek);
  250.         }
  251.         catch
  252.         {
  253.             this.pictureBox1.Image = null;
  254.             this.pictureBox1.Invalidate();
  255.         }
  256.     }
  257.  
  258.     private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
  259.     {
  260.         if (Convert.ToInt32(e.KeyChar) == 13)
  261.         {
  262.             this.wykonaj();
  263.         }
  264.     }
  265.  
  266.     private void timer1_Tick(object sender, EventArgs e)
  267.     {
  268.         this.button1.Enabled = true;
  269.         this.button2.Enabled = true;
  270.         this.textBox1.Enabled = true;
  271.         this.textBox2.Enabled = true;
  272.         string[] strArray = new string[] { "(", (this.kolejne + 1).ToString(), "/", this.listBox1.Items.Count.ToString(), ") - ", this.listBox1.Items[0].ToString() };
  273.         this.toolStripStatusLabel1.Text = string.Concat(strArray);
  274.         this.Strona(this.listBox1.Items[this.kolejne].ToString());
  275.         this.timer1.Enabled = false;
  276.     }
  277.  
  278.     private void wykonaj()
  279.     {
  280.         if (this.kolejne == this.los)
  281.         {
  282.             HttpPost(this.link, "recaptcha_challenge_field=" + this.recaptcha_challenge_field + "&recaptcha_response_field=" + this.textBox1.Text + "&btcaddr=" + this.btc);
  283.         }
  284.         else
  285.         {
  286.             HttpPost(this.link, "recaptcha_challenge_field=" + this.recaptcha_challenge_field + "&recaptcha_response_field=" + this.textBox1.Text + "&btcaddr=" + this.textBox2.Text);
  287.         }
  288.         this.textBox1.Text = "";
  289.         this.pictureBox1.Image = null;
  290.         this.pictureBox1.Invalidate();
  291.         this.Strona(this.listBox1.Items[this.kolejne].ToString());
  292.         if (this.kolejne < (this.listBox1.Items.Count - 1))
  293.         {
  294.             this.kolejne++;
  295.         }
  296.         string[] strArray3 = new string[] { "(", (this.kolejne + 1).ToString(), "/", this.listBox1.Items.Count.ToString(), ") - ", this.listBox1.Items[this.kolejne].ToString() };
  297.         this.toolStripStatusLabel1.Text = string.Concat(strArray3);
  298.         if ((this.listBox1.Items.Count - 1) == this.kolejne)
  299.         {
  300.             this.button1.Enabled = false;
  301.             this.button2.Enabled = false;
  302.             this.textBox1.Enabled = false;
  303.             this.textBox2.Enabled = false;
  304.             this.kolejne = 0;
  305.             this.timer1.Enabled = true;
  306.             this.pictureBox1.Image = null;
  307.             this.pictureBox1.Invalidate();
  308.             MessageBox.Show("Next Round: 30 min.");
  309.         }
  310.     }
  311. }
  312.  
  313.  
  314. Collapse Methods
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement