TUT - Create a simple login 'BOT' + Add features to it in VB + Source!

03/20/2013 18:49 Joever11#1
Hello guys,

As a lot of you are asking about 'how can I create a bot' and those questions, I wanna share a little and very basic project made in visual studio using VB.net with you!
I made a simple login bot on darkorbit, and I'll tell you how you can make it better and give it more functions.

Don't expect anything Client related, this bot is just on hpptwebrequest.

So let's start,

You first need to add 2 Textboxes (for username and password), a button (to let the bot navigate to the website -> this is not really needed, but I'll add it), and ofcourse, a webbrowser. Which should look like this:
To start, go to Form1.vb under public class and type in this code:
Code:
Dim didWeNavigated? As Boolean = False                                                                  'This adds the feature 'didWeNavigated' to the source.
    Dim gottheserver? As Boolean = False                                                                    'This feature will be added later, auto select the server.
2nd, you'll need to double click on your 'Login button' and paste the following code:
Code:
WebBrowser1.Navigate("http://www.darkorbit.com")                                                    'This will navigate to the darkorbit website and fill in all the information.
        didWeNavigated = True                                                                               'If it is true, it will send instructions to the WebBrowser to fill in everything.
    End Sub
For the following step, we're abou to create the bot itself... Double click your webbrowser and use this code:

Code:
If didWeNavigated = False Then                                                                      'If we could not connect to darkorbit due no internet connection/darkorbit website is down, it will stop.
            Exit Sub
        End If
        If didWeNavigated = True Then didWeNavigated = False
        Dim username As String = TextBox1.Text                                                              'It will make it be able for the bot to fill in the username with the right values
        Dim password As String = TextBox2.Text                                                              'It will make it be able for the bot to fill in the password with the right values
        WebBrowser1.Document.GetElementById("loginForm_default_username").SetAttribute("Value", username)   'This will search for the Username box, and paste the username information into that text field.
        WebBrowser1.Document.GetElementById("loginForm_default_password").SetAttribute("Value", password)   'This will search for the Password box, and paste the password information into that text field.
        WebBrowser1.Document.GetElementById("loginForm_default_loginButton").Focus()                        'This one will Focus (search) on the page for the login button...
        WebBrowser1.Document.GetElementById("loginForm_default_loginButton").InvokeMember("click")          'This one will click the login button, when it has been found.
        Dim htmlel As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("input")
        Dim el1 As HtmlElement
    End Sub
So what this code does, it basicly searches for every button and text field we need... And after the bot found it, it will paste the information from the textboxes we've added to the website, and it will press the login button...

After that, we have our own very basic login bot, this one won't select the server yet, but you can add those features and even make a good working skylab/auto-bid bot!

Open the spoiler to know how to add more features to the bot:

The source code (Made in Visual studio 2010 Ultimate) Has been added in the attached files, please don't make it public on another site without my permission, it's like respect for my work...

I hope this guide helped a lot of people out with their bot making questions, and they can see even a httpwebrequest bot isn't that easy to create!

Bye,

Joever11

EDIT: VirusTotal: [Only registered and activated users can see links. Click Here To Register...]
03/20/2013 18:53 Requi#2
Oh my gosh. WebBrowser :facepalm:

Else.
Good work
03/20/2013 19:00 maximunkiller#3
Good Job
03/20/2013 19:03 Joever11#4
Quote:
Originally Posted by »AppleJack™ View Post
Oh my gosh. WebBrowser :facepalm:

Else.
Good work
I know, but it's to show people that they cannot have for example just an idea like I wanna create a packet bot in 1 day, it just can't... I wanna show people how to create their own basic project... Nothing more, I gave them the source code to experiment with it...

Hope you understand, anyway, thanks for your comment :)
03/20/2013 19:12 Vossik#5
Good job :)
03/20/2013 19:14 Requi#6
We can try it together :p
03/20/2013 19:21 NoCheatImPGM#7
Lol and you know how do it with httpwebrequest xP ?
03/20/2013 19:24 Joever11#8
Quote:
Originally Posted by »AppleJack™ View Post
We can try it together :p
I am creating a techcenter bot (also wanna add skylab but it is harder) based on this code, I have you on skype, if you want to, you can always send me a message to join :)
03/20/2013 19:27 NoCheatImPGM#9
I know how do it ^-^
But if you need help join me on skype :)
03/20/2013 19:38 daswoll56#10
Does somebody code this in c#? i dont understand httpwebrequest at google there are codes of 50 lines and some are only 20 :o
Im using webbrowser now, login works perefectly but i cant select a server i have to do that manually :o
03/20/2013 19:45 Requi#11
Quote:
Originally Posted by Joever11 View Post
I am creating a techcenter bot (also wanna add skylab but it is harder) based on this code, I have you on skype, if you want to, you can always send me a message to join :)
Skylab and harder?
Then Tech is very easy :D

I'll write you soon.
03/20/2013 20:25 Technostar#12
i can post the code in C++/C# ;) for those who don't learn VB.Net :D
03/20/2013 20:30 ZzEndayZz#13
Tech is extremley easy.. :rolleyes:
03/20/2013 20:33 NoCheatImPGM#14
build a Tech program is more dificult than a skylab bot ^^
03/20/2013 20:43 L1m4ro#15
Ye, this is nice, GJ on making it open-source... Just switch to httpwebrequest in order to improve the speed more than 10 times ;)