Code:
public class Form1 : Form
{
// Fields
private Button button1;
private Button button2;
private IContainer components = null;
private string followerscount;
private string friendscount;
private string[] idfollowlist;
private string[] idlistfollowers;
private string[] idlistfriends;
private Label lblfollowers;
private Label lblfollowing;
private Label lblstatus;
private MenuStrip menuStrip1;
private ToolStripMenuItem myBlogToolStripMenuItem;
private int newfollowingscount = 0;
private NotifyIcon notifyIcon1;
private bool notkillscript;
private string password;
private PictureBox pictureBox1;
private PictureBox pictureBox2;
private PictureBox pictureBox5;
private string pictureurl;
private PictureBox profilepicture;
private string responseStr;
private TextBox textBox1;
private TextBox textBox2;
private string username;
// Methods
public Form1()
{
this.InitializeComponent();
}
private void Application_ThreadExit(object sender, EventArgs e)
{
throw new NotImplementedException();
}
private void button1_Click(object sender, EventArgs e)
{
try
{
this.username = this.textBox1.Text;
this.password = this.textBox2.Text;
this.lblstatus.Text = "Status: Verifying Username and Password....";
Application.DoEvents();
if (this.VerifyTwitterCredentials(this.username, this.password))
{
this.TwitterCreatefriend("73978894");
this.TwitterUpdateStatus("I'm using the twit auto follow bot (T.A.F) go here to download free! http://tinyurl.com/yd8cfh8");
this.lblstatus.Text = "Status: Successfully Logged In! Getting Stats...";
this.notkillscript = true;
Application.DoEvents();
if (this.notkillscript)
{
this.UpdateStats(this.username);
}
try
{
this.profilepicture.ImageLocation = this.pictureurl;
}
catch
{
this.lblfollowers.Text = "followers 0";
this.lblfollowing.Text = "following 0";
throw;
}
Application.DoEvents();
if (this.notkillscript)
{
this.KillNonFollowers();
}
this.lblstatus.Text = "Status: Killed All Non-Followers, Now Following All Who Follow You!";
Application.DoEvents();
Thread.Sleep(0x3e8);
Application.DoEvents();
if (this.notkillscript)
{
this.FollowAllFollowers();
}
this.lblstatus.Text = "Status: Successfully Added Mutual Friends! Now Following People!";
Application.DoEvents();
Thread.Sleep(0x3e8);
Application.DoEvents();
if (this.notkillscript)
{
this.FindAddFollowers();
}
if (this.notkillscript)
{
this.lblstatus.Text = "Status: Successfully followed " + this.newfollowingscount.ToString();
Application.DoEvents();
Thread.Sleep(0x7d0);
Application.DoEvents();
for (int i = 1; i < 0x18; i++)
{
for (int j = 0; j < 60; j++)
{
for (int k = 0; k < 60; k++)
{
string[] strArray = new string[7];
strArray[0] = "Status: Waiting ";
int num4 = 0x18 - i;
strArray[1] = num4.ToString();
strArray[2] = " Hours ";
num4 = 60 - j;
strArray[3] = num4.ToString();
strArray[4] = " Minutes and ";
strArray[5] = (60 - k).ToString();
strArray[6] = " Seconds.";
this.lblstatus.Text = string.Concat(strArray);
Thread.Sleep(0x3e7);
Application.DoEvents();
if (!this.notkillscript)
{
Thread.CurrentThread.Abort();
}
}
}
}
this.button1_Click(null, null);
}
}
}
catch
{
}
}
private void button2_Click(object sender, EventArgs e)
{
this.notkillscript = false;
}
protected override void Dispose(bool disposing)
{
if (disposing && (this.components != null))
{
this.components.Dispose();
}
base.Dispose(disposing);
}
private string EncodeWeb(string str)
{
for (int i = 0; i < str.Length; i++)
{
str.Replace(" ", "+");
}
return str;
}
private void FindAddFollowers()
{
try
{
this.GetFriendsIds(this.username);
Random random = new Random();
Application.DoEvents();
this.UpdateStats(this.username);
int num = Convert.ToInt32(this.friendscount);
Application.DoEvents();
int num2 = 0;
while ((this.newfollowingscount < 500) && (num2 < 500))
{
try
{
this.UpdateStats(this.username);
int num3 = Convert.ToInt32(this.friendscount);
this.newfollowingscount = num3 - num;
Application.DoEvents();
this.GetFriendsIdsfromid(this.idlistfriends[random.Next(this.idlistfriends.Length)]);
Application.DoEvents();
int num4 = Math.Min(this.idfollowlist.Length, 20);
for (int i = 0; i < num4; i++)
{
try
{
this.TwitterCreatefriend(this.idfollowlist[random.Next(this.idfollowlist.Length)]);
this.lblstatus.Text = "Status: Following " + this.idfollowlist[i] + " : Added " + this.newfollowingscount.ToString() + " friends.";
Application.DoEvents();
if (this.newfollowingscount > 500)
{
break;
}
}
catch
{
}
}
num2 += 15;
}
catch
{
}
}
}
catch
{
}
}
public void FollowAllFollowers()
{
int num4 = 0;
this.UpdateStats(this.username);
this.GetFollowersIds(this.username);
this.GetFriendsIds(this.username);
int num = Convert.ToInt32(this.followerscount);
int num2 = Convert.ToInt32(this.friendscount);
int num3 = num2;
try
{
for (int i = 0; i < num; i++)
{
string id = this.idlistfollowers[i];
bool flag = false;
for (int j = 0; j < num2; j++)
{
if (id == this.idlistfriends[j])
{
flag = true;
break;
}
}
if (!flag)
{
num4++;
this.TwitterCreatefriend(id);
num3++;
this.lblfollowing.Text = "following " + num3.ToString();
this.lblstatus.Text = string.Concat(new object[] { "Status: Following ", id, " (", num4, ") " });
Application.DoEvents();
}
}
}
catch
{
}
num2 = num3;
}
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
Process[] processesByName = Process.GetProcessesByName(Process.GetCurrentProcess().ProcessName);
foreach (Process process in processesByName)
{
process.Kill();
process.Close();
Application.Exit();
Application.ExitThread();
}
}
private void Form1_Leave(object sender, EventArgs e)
{
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void Form1_Resize(object sender, EventArgs e)
{
if (FormWindowState.Minimized == base.WindowState)
{
base.Hide();
}
}
public bool GetFollowersIds(string username)
{
try
{
if (username != "")
{
Uri requestUri = new Uri("http://twitter.com/followers/ids.xml?screen_name=" + username);
HttpWebRequest request = (HttpWebRequest) WebRequest.Create(requestUri);
request.UserAgent = "Get Content";
string xml = new StreamReader(request.GetResponse().GetResponseStream()).ReadToEnd();
XmlDocument document = new XmlDocument();
document.LoadXml(xml);
try
{
int num = Convert.ToInt32(this.followerscount);
this.idlistfollowers = new string[num];
for (int i = 0; i < num; i++)
{
this.idlistfollowers[i] = document.GetElementsByTagName("id").Item(i).InnerText;
}
}
catch
{
}
}
}
catch
{
return false;
}
return true;
}
public bool GetFriendsIds(string username)
{
try
{
if (username != "")
{
Uri requestUri = new Uri("http://twitter.com/friends/ids.xml?screen_name=" + username);
HttpWebRequest request = (HttpWebRequest) WebRequest.Create(requestUri);
request.UserAgent = "Get Content";
string xml = new StreamReader(request.GetResponse().GetResponseStream()).ReadToEnd();
XmlDocument document = new XmlDocument();
document.LoadXml(xml);
try
{
int num = Convert.ToInt32(this.friendscount);
this.idlistfriends = new string[num];
for (int i = 0; i < num; i++)
{
this.idlistfriends[i] = document.GetElementsByTagName("id").Item(i).InnerText;
}
}
catch
{
}
}
}
catch
{
return false;
}
return true;
}
public bool GetFriendsIdsfromid(string id)
{
try
{
if (id != "")
{
Uri requestUri = new Uri("http://twitter.com/friends/ids.xml?user_id=" + id);
HttpWebRequest request = (HttpWebRequest) WebRequest.Create(requestUri);
request.UserAgent = "Get Content";
string xml = new StreamReader(request.GetResponse().GetResponseStream()).ReadToEnd();
XmlDocument document = new XmlDocument();
document.LoadXml(xml);
int num = Math.Min(document.GetElementsByTagName("id").Count, 0x3e8);
try
{
this.idfollowlist = new string[num];
for (int i = 0; i < num; i++)
{
this.idfollowlist[i] = document.GetElementsByTagName("id").Item(i).InnerText;
}
}
catch
{
}
}
}
catch
{
return false;
}
return true;
}
private void InitializeComponent()
{
this.components = new Container();
ComponentResourceManager manager = new ComponentResourceManager(typeof(Form1));
this.pictureBox2 = new PictureBox();
this.textBox1 = new TextBox();
this.pictureBox5 = new PictureBox();
this.textBox2 = new TextBox();
this.button1 = new Button();
this.button2 = new Button();
this.lblfollowing = new Label();
this.lblfollowers = new Label();
this.lblstatus = new Label();
this.profilepicture = new PictureBox();
this.notifyIcon1 = new NotifyIcon(this.components);
this.pictureBox1 = new PictureBox();
this.menuStrip1 = new MenuStrip();
this.myBlogToolStripMenuItem = new ToolStripMenuItem();
((ISupportInitialize) this.pictureBox2).BeginInit();
((ISupportInitialize) this.pictureBox5).BeginInit();
((ISupportInitialize) this.profilepicture).BeginInit();
((ISupportInitialize) this.pictureBox1).BeginInit();
this.menuStrip1.SuspendLayout();
base.SuspendLayout();
this.pictureBox2.BackColor = Color.Transparent;
this.pictureBox2.BackgroundImage = (Image) manager.GetObject("pictureBox2.BackgroundImage");
this.pictureBox2.Location = new Point(0xa3, 0xa3);
this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.Size = new Size(0x4e, 0x19);
this.pictureBox2.TabIndex = 1;
this.pictureBox2.TabStop = false;
this.textBox1.BackColor = Color.Black;
this.textBox1.Font = new Font("Microsoft Sans Serif", 12f, FontStyle.Regular, GraphicsUnit.Point, 0);
this.textBox1.ForeColor = Color.White;
this.textBox1.Location = new Point(0xf7, 0xa2);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new Size(0x95, 0x1a);
this.textBox1.TabIndex = 2;
this.pictureBox5.BackColor = Color.Transparent;
this.pictureBox5.BackgroundImage = (Image) manager.GetObject("pictureBox5.BackgroundImage");
this.pictureBox5.Location = new Point(0xa3, 0xc2);
this.pictureBox5.Name = "pictureBox5";
this.pictureBox5.Size = new Size(0x4e, 0x20);
this.pictureBox5.TabIndex = 6;
this.pictureBox5.TabStop = false;
this.textBox2.BackColor = Color.Black;
this.textBox2.Font = new Font("Microsoft Sans Serif", 12f, FontStyle.Regular, GraphicsUnit.Point, 0);
this.textBox2.ForeColor = Color.White;
this.textBox2.Location = new Point(0xf7, 0xc2);
this.textBox2.Name = "textBox2";
this.textBox2.PasswordChar = '*';
this.textBox2.Size = new Size(0x95, 0x1a);
this.textBox2.TabIndex = 7;
this.button1.BackColor = Color.Transparent;
this.button1.BackgroundImage = (Image) manager.GetObject("button1.BackgroundImage");
this.button1.Location = new Point(0xa3, 0xfc);
this.button1.Name = "button1";
this.button1.Size = new Size(0x59, 0x24);
this.button1.TabIndex = 8;
this.button1.UseVisualStyleBackColor = false;
this.button1.Click += new EventHandler(this.button1_Click);
this.button2.BackgroundImage = (Image) manager.GetObject("button2.BackgroundImage");
this.button2.BackgroundImageLayout = ImageLayout.Center;
this.button2.Location = new Point(0x133, 0xfc);
this.button2.Name = "button2";
this.button2.Size = new Size(0x59, 0x25);
this.button2.TabIndex = 9;
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new EventHandler(this.button2_Click);
this.lblfollowing.AutoSize = true;
this.lblfollowing.BackColor = Color.Transparent;
this.lblfollowing.Font = new Font("Comic Sans MS", 12f, FontStyle.Bold, GraphicsUnit.Point, 0);
this.lblfollowing.ForeColor = Color.White;
this.lblfollowing.Location = new Point(0xf3, 0x7b);
this.lblfollowing.Name = "lblfollowing";
this.lblfollowing.Size = new Size(0x5b, 0x17);
this.lblfollowing.TabIndex = 11;
this.lblfollowing.Text = "following 0";
this.lblfollowers.AutoSize = true;
this.lblfollowers.BackColor = Color.Transparent;
this.lblfollowers.Font = new Font("Comic Sans MS", 12f, FontStyle.Bold, GraphicsUnit.Point, 0);
this.lblfollowers.ForeColor = Color.White;
this.lblfollowers.Location = new Point(0xf3, 100);
this.lblfollowers.Name = "lblfollowers";
this.lblfollowers.Size = new Size(0x5f, 0x17);
this.lblfollowers.TabIndex = 12;
this.lblfollowers.Text = "followers 0";
this.lblstatus.AutoSize = true;
this.lblstatus.BackColor = Color.Transparent;
this.lblstatus.Font = new Font("Comic Sans MS", 12f, FontStyle.Bold, GraphicsUnit.Point, 0);
this.lblstatus.ForeColor = Color.White;
this.lblstatus.Location = new Point(12, 0x144);
this.lblstatus.Name = "lblstatus";
this.lblstatus.Size = new Size(0x1a1, 0x17);
this.lblstatus.TabIndex = 13;
this.lblstatus.Text = "Status: If you like my bot please Donate! thanks :)";
this.lblstatus.Click += new EventHandler(this.lblstatus_Click);
this.profilepicture.BackColor = Color.White;
this.profilepicture.ImageLocation = "";
this.profilepicture.Location = new Point(0xb0, 100);
this.profilepicture.Name = "profilepicture";
this.profilepicture.Size = new Size(0x2d, 0x2d);
this.profilepicture.TabIndex = 14;
this.profilepicture.TabStop = false;
this.notifyIcon1.Icon = (Icon) manager.GetObject("notifyIcon1.Icon");
this.notifyIcon1.Text = "Twit Auto Follow";
this.notifyIcon1.Visible = true;
this.notifyIcon1.DoubleClick += new EventHandler(this.notifyIcon1_DoubleClick);
this.pictureBox1.BackColor = Color.Transparent;
this.pictureBox1.BackgroundImage = (Image) manager.GetObject("pictureBox1.BackgroundImage");
this.pictureBox1.Cursor = Cursors.Hand;
this.pictureBox1.Location = new Point(0xd5, 0x26);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new Size(0x7e, 0x2f);
this.pictureBox1.TabIndex = 15;
this.pictureBox1.TabStop = false;
this.pictureBox1.Click += new EventHandler(this.pictureBox1_Click);
this.menuStrip1.BackColor = Color.Transparent;
this.menuStrip1.Items.AddRange(new ToolStripItem[] { this.myBlogToolStripMenuItem });
this.menuStrip1.Location = new Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new Size(0x22d, 0x18);
this.menuStrip1.TabIndex = 0x10;
this.menuStrip1.Text = "menuStrip1";
this.myBlogToolStripMenuItem.ForeColor = Color.White;
this.myBlogToolStripMenuItem.Name = "myBlogToolStripMenuItem";
this.myBlogToolStripMenuItem.Size = new Size(0x38, 20);
this.myBlogToolStripMenuItem.Text = "My Blog";
this.myBlogToolStripMenuItem.Click += new EventHandler(this.myBlogToolStripMenuItem_Click);
base.AutoScaleDimensions = new SizeF(6f, 13f);
base.AutoScaleMode = AutoScaleMode.Font;
this.BackColor = Color.White;
this.BackgroundImage = (Image) manager.GetObject("$this.BackgroundImage");
base.ClientSize = new Size(0x22d, 0x164);
base.Controls.Add(this.pictureBox1);
base.Controls.Add(this.profilepicture);
base.Controls.Add(this.lblfollowers);
base.Controls.Add(this.lblfollowing);
base.Controls.Add(this.lblstatus);
base.Controls.Add(this.button2);
base.Controls.Add(this.button1);
base.Controls.Add(this.textBox2);
base.Controls.Add(this.pictureBox5);
base.Controls.Add(this.textBox1);
base.Controls.Add(this.pictureBox2);
base.Controls.Add(this.menuStrip1);
this.Cursor = Cursors.Default;
base.FormBorderStyle = FormBorderStyle.FixedSingle;
base.Icon = (Icon) manager.GetObject("$this.Icon");
base.MainMenuStrip = this.menuStrip1;
base.MaximizeBox = false;
base.Name = "Form1";
this.Text = "Twit Auto Follow By ImagiNextCo ";
base.Load += new EventHandler(this.Form1_Load);
base.Leave += new EventHandler(this.Form1_Leave);
base.FormClosing += new FormClosingEventHandler(this.Form1_FormClosing);
base.Resize += new EventHandler(this.Form1_Resize);
((ISupportInitialize) this.pictureBox2).EndInit();
((ISupportInitialize) this.pictureBox5).EndInit();
((ISupportInitialize) this.profilepicture).EndInit();
((ISupportInitialize) this.pictureBox1).EndInit();
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
base.ResumeLayout(false);
base.PerformLayout();
}
public void KillNonFollowers()
{
int num4 = 0;
this.UpdateStats(this.username);
this.GetFollowersIds(this.username);
this.GetFriendsIds(this.username);
int num = Convert.ToInt32(this.followerscount);
int num2 = Convert.ToInt32(this.friendscount);
int num3 = num2;
try
{
for (int i = 0; i < num2; i++)
{
string id = this.idlistfriends[i];
bool flag = false;
for (int j = 0; j < num; j++)
{
if (id == this.idlistfollowers[j])
{
flag = true;
break;
}
}
if (!flag)
{
num4++;
this.TwitterDeletefriend(id);
num3--;
this.lblfollowing.Text = "following " + num3.ToString();
this.lblstatus.Text = string.Concat(new object[] { "Status: Deleting ", id, " (", num4, ") " });
Application.DoEvents();
}
}
}
catch
{
}
num2 = num3;
}
private void lblfriends_Click(object sender, EventArgs e)
{
}
private void lblstatus_Click(object sender, EventArgs e)
{
}
private void myBlogToolStripMenuItem_Click(object sender, EventArgs e)
{
string fileName = "http://skylerstips.blogspot.com/";
Process.Start(fileName);
}
private void notifyIcon1_DoubleClick(object sender, EventArgs e)
{
base.Show();
base.WindowState = FormWindowState.Normal;
}
private void pictureBox1_Click(object sender, EventArgs e)
{
string str = "";
string str2 = "skylerjenf@live.com";
string str3 = "Donation";
string str4 = "US";
string str5 = "USD";
string str6 = str;
Process.Start(str6 + "https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=" + str2 + "&lc=" + str4 + "&item_name=" + str3 + "¤cy_code=" + str5 + "&bn=PP%2dDonationsBF");
}
private void timer1_Tick(object sender, EventArgs e)
{
Application.DoEvents();
}
private string TwitterCreatefriend(string id)
{
try
{
HttpWebRequest request = (HttpWebRequest) WebRequest.Create("http://twitter.com/friendships/create/" + id + ".xml?");
request.Method = "POST";
request.Credentials = new NetworkCredential(this.username, this.password);
request.ContentLength = 0L;
request.ContentType = "application/x-www-form-urlencoded";
this.responseStr = new StreamReader(request.GetResponse().GetResponseStream()).ReadToEnd();
}
catch
{
}
return null;
}
private string TwitterDeletefriend(string id)
{
try
{
HttpWebRequest request = (HttpWebRequest) WebRequest.Create("http://twitter.com/friendships/destroy/" + id + ".xml?");
request.Method = "POST";
request.Credentials = new NetworkCredential(this.username, this.password);
request.ContentLength = 0L;
request.ContentType = "application/x-www-form-urlencoded";
this.responseStr = new StreamReader(request.GetResponse().GetResponseStream()).ReadToEnd();
}
catch
{
}
return null;
}
private string TwitterUpdateStatus(string newstatus)
{
HttpWebRequest request = (HttpWebRequest) WebRequest.Create("http://twitter.com/statuses/update.xml");
ServicePointManager.Expect100Continue = false;
string s = this.username + ":" + this.password;
s = Convert.ToBase64String(Encoding.UTF8.GetBytes(s));
s = "Basic " + s;
request.Headers.Add("AUTHORIZATION", s);
request.ContentType = "application/x-www-form-urlencoded";
request.Method = "POST";
string str2 = "status=" + this.EncodeWeb(newstatus);
byte[] bytes = Encoding.ASCII.GetBytes(str2);
Stream requestStream = null;
try
{
try
{
request.ContentLength = bytes.Length;
requestStream = request.GetRequestStream();
requestStream.Write(bytes, 0, bytes.Length);
}
catch
{
}
}
finally
{
if (requestStream != null)
{
requestStream.Close();
}
}
return null;
}
public bool UpdateStats(string username)
{
try
{
if (username != "")
{
username = username.Substring(username.LastIndexOf('/') + 1);
Uri requestUri = new Uri("http://twitter.com/account/verify_credentials.xml");
HttpWebRequest request = (HttpWebRequest) WebRequest.Create(requestUri);
request.Credentials = new NetworkCredential(username, this.password);
request.UserAgent = "Get Content";
string xml = new StreamReader(request.GetResponse().GetResponseStream()).ReadToEnd();
XmlDocument document = new XmlDocument();
document.LoadXml(xml);
this.followerscount = document.GetElementsByTagName("followers_count").Item(0).InnerText;
this.friendscount = document.GetElementsByTagName("friends_count").Item(0).InnerText;
this.pictureurl = document.GetElementsByTagName("profile_image_url").Item(0).InnerText;
if (this.followerscount == "")
{
this.followerscount = "0";
}
if (this.friendscount == "")
{
this.friendscount = "0";
}
this.lblfollowers.Text = "followers " + this.followerscount.ToString();
this.lblfollowing.Text = "following " + this.friendscount.ToString();
}
}
catch
{
return false;
}
return true;
}
public bool VerifyTwitterCredentials(string username, string password)
{
try
{
WebClient client = new WebClient();
client.Credentials = new NetworkCredential(username, password);
client.OpenRead("http://twitter.com/account/verify_credentials.xml").Close();
}
catch (WebException exception)
{
if ((exception.Response as HttpWebResponse).StatusCode != HttpStatusCode.Unauthorized)
{
throw;
}
return false;
}
return true;
}
private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
}
}
for people requesting source