Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as C# by ItsAciD ( 16 years ago )
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Net;

namespace Sample_Bot
{

    public partial class Form1 : Form
    {
        int iEntryCount = 0;
        int AddressTrick = 0;



        public Form1()
        {
            InitializeComponent();

            Boolean answer = Authorize(1, 0);
            if (!answer)
            {
                MessageBox.Show("You do no meet the requirements");
                Environment.Exit(0);
            }

        }

        



        private Boolean Authorize(int groupReq, int postReq)
        {

            try
            {
                // Create a request to an URL
                WebRequest request = WebRequest.Create("http://exploitn.com/authorize.php");
                // Set the method to GET
                request.Method = "GET";
                // Get the response
                WebResponse response = request.GetResponse();
                // Get response stream
                Stream dataStream = response.GetResponseStream();
                // Create a streamreader to read the response stream
                StreamReader reader = new StreamReader(dataStream);
                // Read the response into a String
                string responseFromServer = reader.ReadToEnd();
                // Clean up streams
                reader.Close();
                dataStream.Close();
                response.Close();
                // Split response into an array
                String[] info = responseFromServer.Split(new String[] { "<br />" }, StringSplitOptions.None);
                // Assign the information received to local variables
                String username = info[0].Replace("Username: ", "");
                int posts;
                // Try to parse the post count as an int
                // If this errors set the post count to 0
                try
                {
                    posts = int.Parse(info[1].Replace("Posts: ", ""));
                }
                catch
                {
                    posts = 0;
                }
                // Assign info to local variable
                String usergroup = info[3].Replace("Usergroup: ", "");

                // Make sure server returned a user
                if (username == "")
                {
                    MessageBox.Show("Exploitn couldn't authorize you, have you recently made a post there?");
                    Environment.Exit(0);
                }
                else
                {
                    // Check which members are allowed
                    if (groupReq == 0)
                    {
                        //Check if the user has enough posts
                        if (posts >= postReq)
                        {
                            return true;
                        }
                        else
                        {
                            return false;
                        }
                    }
                    else
                    {
                        // Make sure user doesn't belong to the wrong groups
                        if (usergroup != "Registered Users" && usergroup != "Banned")
                        {
                            //Check post count
                            if (posts >= postReq)
                            {
                                return true;
                            }
                            else
                            {
                                return false;
                            }
                        }
                        else
                        {
                            return false;
                        }
                    }
                }
            }
            catch
            {
                // Couldn't connect to server
                MessageBox.Show("ExploitN couldn't be reached, please try again");
                Environment.Exit(0);
                return false;
            }
        }

 

Revise this Paste

Your Name: Code Language: