Giriş yap
En iyi yollayıcılar
Hello EMO | ||||
EMO | ||||
eMoStyLe | ||||
BesimBICER | ||||
GameKinG | ||||
Crysis | ||||
~>!.DεvιLρяιεsт.!<~ | ||||
MeTaL | ||||
TrueCrime | ||||
djhayal3t |
Istatistikler
Toplam 203 kayıtlı kullanıcımız varSon kaydolan kullanıcımız: crayzboy76
Kullanıcılarımız toplam 1186 mesaj attılar bunda 862 konu
Arama
Sosyal yer imi
Sosyal bookmarking sitesinde Emo, Emo nedir, Emo resimleri, Emo Kıyafetleri, Emo Sözleri, Emo Oyunları, EmoTurkey, Emo Nickler, Emo Avatarları, Punk, Punk Resimleri, Punk Avatarları, Rock, Rock Resimleri, Rock Avatarları, Msn Nickleri, Msn Avatarları, Müzik adresi saklayın ve paylaşın
Sosyal bookmarking sitesinde EMO Style ForumPro - Hos Geldiniz adresi saklayın ve paylaşın
Kimler hatta?
Toplam 1 kullanıcı online :: 0 Kayıtlı, 0 Gizli ve 1 Misafir Yok
Sitede bugüne kadar en çok 217 kişi C.tesi Tem. 29, 2017 1:46 am tarihinde online oldu.
En son konular
Reklam
[Tutorial]Botting using Webrequest C#
1 sayfadaki 1 sayfası
[Tutorial]Botting using Webrequest C#
I'm going to teach you how to open a connection, post the data, and loop it using WebRequest in C#.
Note: I'm not gonna do a actually site, just gonna do an example.
Ok say if the site is http://rasputin.com/contest/register.php/
We have 3 text boxes, and a submit button.
First Name
Last Name
Email
OK we are going to need something called Http Headers for firefox: Makes things alot easier. We are looking for the POST data in it.
Say if we already found it:
Ok see how the link changed? submit.php actually submits the data instead of the main link. And the data, firstname=Rasputin this is similar using a webbrowser in C#. submit=1, most of the time for radio buttons and buttons it will equal 1 or something else. And we have to do http url encoding, which is %40 and all that
Remember to http url encode
Ok make a new form project in Visual Studio C#.
Drag:
3 Text Boxes
1 Button
1 label (This is gonna tell how much times you entered)
Arrange the shit
Name them:
txtFirst
txtLast
txtGmail
btnGo
Double click your form or button (whatever)
First off, we need to make 3 new using statement.
This is so we can start coding in WebRequest and use threading
And lets do a global varible
so thread = Thread (theres a difference)
We are now going to make a new void.
It should look like this:
ok this is where we are going to code in, we need this for threading.
Ok, to start off lets do this:
now "url" equals that link.
now lets:
this is dimming the phrase count equal 0.
now we are gonna "try" to post the data and catch the error so:
so everything in "try" will try post this data and "catch" the exception (a.k.a error)
so we are gonna open a request in try so:
So we are traveling to "url" that we dimmed.
Now lets call the Method, which is POST
I prefer this way but you can do whatever
We need to "Post" this data by sending postdata to bytes and calling the form type
We need to open a stream which posts the data but closes it too.
See how datastream equal the stream of the request? That's what we need to get the response from server
So we need to get the response from the server:
Ok responseFromServer, this is the url page, so its like saying webBrowser1.DocumentText
Now this is where that label come into play.
this just insures for each time entered, label1.text goes up and we close the stream
Ok we just made a sucessful connection
but what if you want to bot?
we will add something like this to the code:
Now to start threading to prevent crashing
Double click your button on your form and write:
So we are doing for everything in code() basically telling the bot to not crash k?
It switches to "Stop" when "Start" is activated (clicked) then goes back to "Start" when "Stop" is true.
Here is a example code, copy and you gay :fuckyea:
:coolface: .
Note: I'm not gonna do a actually site, just gonna do an example.
Ok say if the site is http://rasputin.com/contest/register.php/
We have 3 text boxes, and a submit button.
First Name
Last Name
OK we are going to need something called Http Headers for firefox: Makes things alot easier. We are looking for the POST data in it.
Say if we already found it:
- Kod:
/POST http://rasputin.com/contest/submit.php
firstname=Rasputin&lastname=Tj&email=mydickishard%40gmail.com&submit=1
Ok see how the link changed? submit.php actually submits the data instead of the main link. And the data, firstname=Rasputin this is similar using a webbrowser in C#. submit=1, most of the time for radio buttons and buttons it will equal 1 or something else. And we have to do http url encoding, which is %40 and all that
Remember to http url encode
Ok make a new form project in Visual Studio C#.
Drag:
3 Text Boxes
1 Button
1 label (This is gonna tell how much times you entered)
Arrange the shit
Name them:
txtFirst
txtLast
txtGmail
btnGo
Double click your form or button (whatever)
First off, we need to make 3 new using statement.
- Kod:
using System.Net;
using System.IO;
using System.Threading;
This is so we can start coding in WebRequest and use threading
And lets do a global varible
- Kod:
public partial class Form1 : Form
{
[COLOR="red"] private Thread thread;[/COLOR]
public Form1()
{
InitializeComponent();
}
so thread = Thread (theres a difference)
We are now going to make a new void.
It should look like this:
- Kod:
private void code()
{
}
ok this is where we are going to code in, we need this for threading.
Ok, to start off lets do this:
- Kod:
string url = "http://rasputin.com/contest/submitentry.php/";
now "url" equals that link.
now lets:
- Kod:
int count = 0;
this is dimming the phrase count equal 0.
now we are gonna "try" to post the data and catch the error so:
- Kod:
try
{
}
catch (Exception)
{
}
so everything in "try" will try post this data and "catch" the exception (a.k.a error)
so we are gonna open a request in try so:
- Kod:
WebRequest request = WebRequest.Create(url);
So we are traveling to "url" that we dimmed.
Now lets call the Method, which is POST
- Kod:
request.Method = "POST";
I prefer this way but you can do whatever
- Kod:
string firstname = "firstname=" + txtFirst.Text;
string lastname = "&lastname=" + txtLast.Text;
string gmail = "&email=" + txtGmail.Text + "%2B" + count + "%40gmail.com";
string submit = "1";
string postdata = firstname + lastname + gmail + submit;
We need to "Post" this data by sending postdata to bytes and calling the form type
- Kod:
byte[] byteArray = Encoding.UTF8.GetBytes(postdata);
request.ContentType = "application/x-www-form-urlencoded";
request.ContentLength = byteArray.Length;
We need to open a stream which posts the data but closes it too.
- Kod:
Stream datastream = request.GetRequestStream();
datastream.Write(byteArray, 0, byteArray.Length);
datastream.Close();
See how datastream equal the stream of the request? That's what we need to get the response from server
So we need to get the response from the server:
- Kod:
WebResponse response = request.GetResponse();
datastream = response.GetResponseStream();
StreamReader reader = new StreamReader(datastream);
string responseFromSever = reader.ReadToEnd();
Ok responseFromServer, this is the url page, so its like saying webBrowser1.DocumentText
Now this is where that label come into play.
- Kod:
if (responseFromSever.Contains("Thank you for your submission."))
{
label1.text = count.ToString();
}
count++;
reader.Close();
datastream.Close();
response.Close();
this just insures for each time entered, label1.text goes up and we close the stream
Ok we just made a sucessful connection
but what if you want to bot?
we will add something like this to the code:
- Kod:
while (true)
{
try
{
//your bot code
}
catch
{
}
}
}
Now to start threading to prevent crashing
Double click your button on your form and write:
- Kod:
if (btnGo.Text == "Start")
{
btnGo.Test = "Stop";
thread = new Thread(code);
thread.Start();
}
else
{
btnGo.Text = "Start";
thread.Abort();
}
So we are doing for everything in code() basically telling the bot to not crash k?
It switches to "Stop" when "Start" is activated (clicked) then goes back to "Start" when "Stop" is true.
Here is a example code, copy and you gay :fuckyea:
- Kod:
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.Net;
using System.IO;
using System.Threading;
namespace First_WebRequest_Bot
{
public partial class Form1 : Form
{
private Thread thread;
public Form1()
{
InitializeComponent();
}
private void code()
{
int count = 0;
Random random = new Random();
string url = "http://www.tjandcurtporn.com/php/submitEntry.php";
string phone = "";
tP.Text = "3" + "0" + "1" + random.Next(0, 8) + random.Next(0, 8) + random.Next(0, 8) + random.Next(0, 8) + random.Next(0, 8) + random.Next(0, 8) + random.Next(0, 8);
phone = tP.Text;
while (true)
{
try
{
WebRequest request = WebRequest.Create(url);
request.Method = "POST";
string firstname = "first_name=" + tF.Text;
string lastname = "&last_name=" + tL.Text;
string gmail = "&email=" + tG.Text;
string confirmgmail = "&c_email=" + tG.Text + "%2B" + count + "%40gmail.com";
string phonenumber = "&phone=" + phone;
string agree = "&agree=" + "1";
string submit = "&entry_form_submit=Submit";
string postdata = firstname + lastname + gmail + confirmgmail + phonenumber + agree + submit;
byte[] byteArray = Encoding.UTF8.GetBytes(postdata);
request.ContentType = "application/x-www-form-urlencoded";
request.ContentLength = byteArray.Length;
Stream datastream = request.GetRequestStream();
datastream.Write(byteArray, 0, byteArray.Length);
datastream.Close();
WebResponse response = request.GetResponse();
datastream = response.GetResponseStream();
StreamReader reader = new StreamReader(datastream);
string responseFromSever = reader.ReadToEnd();
if (responseFromSever.Contains("Thank you for your submission."))
{
toolEntries.Text = count.ToString();
}
count++;
reader.Close();
datastream.Close();
response.Close();
}
catch (Exception)
{
}
}
}
private void btnGo_Click(object sender, EventArgs e)
{
if (btnGo.Text == "Start")
{
thread = new Thread(code);
thread.Start();
}
else
{
thread.Abort();
}
}
}
}
:coolface: .
1 sayfadaki 1 sayfası
Bu forumun müsaadesi var:
Bu forumdaki mesajlara cevap veremezsiniz
Cuma Ağus. 29, 2014 8:33 am tarafından Hello EMO
» goldenchase.net maden yaparak para kazanma
Cuma Ağus. 29, 2014 8:18 am tarafından Hello EMO
» etichal hacker görsel egitim seti
Çarş. Ağus. 06, 2014 4:57 am tarafından Hello EMO
» KO TBL Source C#
Ptsi Ara. 09, 2013 6:36 am tarafından Hello EMO
» x86 Registers
C.tesi Ağus. 24, 2013 5:02 am tarafından Hello EMO
» [Tutorial] Pegando Address, Pointers de WYD
Çarş. Tem. 10, 2013 7:25 am tarafından Hello EMO
» [Tutorial] Pegando Address, Pointers de CS Metodo²
Çarş. Tem. 10, 2013 7:23 am tarafından Hello EMO
» [Tutorial] Aprendendo basico deASM OLLYDBG
Çarş. Tem. 10, 2013 7:22 am tarafından Hello EMO
» Basic C# DLL injector
Ptsi Tem. 08, 2013 7:48 am tarafından Hello EMO