Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > .NET Languages
You last visited: Today at 07:44

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[vb.net] Good or not

Discussion on [vb.net] Good or not within the .NET Languages forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 7
Join Date: Jun 2012
Posts: 168
Received Thanks: 95
[vb.net] Good or not

Something better?

Code:
Imports System.Net
Imports System.Text
Imports System.IO

Public Class Form1

    Dim logincookie As CookieContainer

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        Dim postData As String = "loginForm_default_username=" & TextBox1.Text & "&loginForm_default_password=" & TextBox2.Text & "&loginForm_default_login_submit=Entrar"
        Dim tempCookies As New CookieContainer
        Dim encoding As New UTF8Encoding
        Dim byteData As Byte() = encoding.GetBytes(postData)

        Dim postReq As HttpWebRequest = DirectCast(WebRequest.Create("http://www.darkorbit.com/"), HttpWebRequest)
        postReq.Method = "POST"
        postReq.KeepAlive = True
        postReq.CookieContainer = tempCookies
        postReq.ContentType = "application/x-www-form-urlencoded"
        postReq.Referer = "http://www.darkorbit.com/"

        postReq.UserAgent = "Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2.3) Gecko/20100401 Firefox/4.0 (.NET CLR 3.5.30729)"
        postReq.ContentLength = byteData.Length

        Dim postreqstream As Stream = postReq.GetRequestStream()
        postreqstream.Write(byteData, 0, byteData.Length)
        postreqstream.Close()
        Dim postresponse As HttpWebResponse

        postresponse = DirectCast(postReq.GetResponse(), HttpWebResponse)
        tempCookies.Add(postresponse.Cookies)
        logincookie = tempCookies
        Dim postreqreader As New StreamReader(postresponse.GetResponseStream())

        Dim thepage As String = postreqreader.ReadToEnd

        RichTextBox1.Text = thepage
        WebBrowser1.DocumentText = RichTextBox1.Text
    End Sub


    Private Sub Button2_Click(ByVal sender As Object, ByVal e As EventArgs)
        WebBrowser1.DocumentText = RichTextBox1.Text
    End Sub

    Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
        WebBrowser1.ScriptErrorsSuppressed = True
    End Sub

    Private Sub Button2_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs)
        
    End Sub
End Class
ЙôČhěάŧĪмPĞM-hacked is offline  
Thanks
1 User
Old 07/05/2012, 19:02   #2
 
elite*gold: 7
Join Date: Jun 2012
Posts: 168
Received Thanks: 95
Good or not ?
ЙôČhěάŧĪмPĞM-hacked is offline  
Thanks
1 User
Old 07/05/2012, 21:14   #3

 
boxxiebabee's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 1,222
Received Thanks: 500
Bad.
boxxiebabee is offline  
Old 07/05/2012, 21:43   #4
 
Kraizy​'s Avatar
 
elite*gold: 0
The Black Market: 471/0/0
Join Date: Apr 2010
Posts: 9,696
Received Thanks: 1,811
hmm..webrequests and webbrowser..hmm
Kraizy​ is offline  
Old 07/06/2012, 22:00   #5
 
elite*gold: 0
Join Date: Jan 2011
Posts: 426
Received Thanks: 112
@Kraizy er gibt ja nur den sagen wir mal Result aus warum auch immer in einer webbrowser . . . Hätte mit textbox auch gereicht.

I Can´t test it because i don´t develop with vb. But i think it works.
Then by the next way you need to spit the URL to the interface to which server.
Then you need to order them.

Spitt them and make a webrequest.

The Code must look like thus

Quote:
C# Code
Quote:
string strlink = richTextBox1.Lines[438]; //Find the URL in Line 438
string[] arrResult = strlink.Split (new Char[] {'(', ')'}); //Spitt the line
this.richTextBox2.Text = arrResult[1];//The Result.
Then you need to make a Webrequest with that URL
deathline4ever is offline  
Old 07/07/2012, 01:59   #6
 
elite*gold: 7
Join Date: Jun 2012
Posts: 168
Received Thanks: 95
How do better in vb.net ??
ЙôČhěάŧĪмPĞM-hacked is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
WTS: Sorc-Spec-Level 145-155 Eternia Games EP2, Fully Maxed, Good Armour, Good Items
07/12/2011 - Last Chaos Trading - 0 Replies
Selling EP2 Eternia Games, Sorcerer Specialist, has good b5 eva/g5eva armour..all plussed 10 (mainly 13) or higher. Weapon is g5 plus 13 level 145, with level 4 good sockets. All armour has sockets good jewels level 4/5 jewls used on them. Charecter has full skills maxed, and 1k sp left. Still 70+ expbs, spbs, level 26 or 27 pet left etc.. Theres much more, ill write later but if anyone interested please post!. Selling cheap btw^^, but theres much much seriously much more..Ill write more...



All times are GMT +1. The time now is 07:46.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.