Results 1 to 15 of 15

Thread: inet login

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2007
    Posts
    79

    Question inet login

    ive been tryin to login to a site using inet control and/or winsock and i just cant get it i understand u have to get the headers and send the packet, ad get the http header and cookie and stuff from using wireshark and other packet sniffers can someone plz make a indepth way to idk log into vbforums for exsample using inet control or winsock cuz i just cant understand it PLZ

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: inet login

    What code do you have that isn't working for you?

  3. #3
    Hyperactive Member Arachnid13's Avatar
    Join Date
    Jan 2003
    Location
    England
    Posts
    327

    Re: inet login

    Look into using the Microsoft Internet Controls, this way you can embed a browser into your project and detect when the user navigates to your site (lets say VBF) and once the page is loaded, automatically populate the username & password fields, and press the submit button
    Do you wake up in the morning feeling sleepy and grumpy? Then you must be Snow White

  4. #4
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: inet login

    I don't think using Inet or Winsock is a good choise to use to login to vbForums. Like Arachnid suggested you would be alot better off if you use the WebBrowser control for this

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Feb 2007
    Posts
    79

    Re: inet login

    nah webbrowser is to slow and so easy i get how to do it mad easy

  6. #6
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: inet login

    Well then I guess you are stuck using Inet or Winsock. Using Winsock is very complex and you won't get the visual graphics of vbForum. I don't know how to do it using Inet but it too will not give you any graphicals .

    This bring up a question however. You say you want to login to vbForum so what exactly do you want to do once you are logged in?

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Feb 2007
    Posts
    79

    Re: inet login

    nah i want to just log into any site just so i understand the idea of sending the http headers and ect vbforums was just a site so ppl dont think im tryin to spam or something crazy like that cuz in the past ppl havent answered my questions cuz of retarted reason like that

  8. #8
    Hyperactive Member Arachnid13's Avatar
    Join Date
    Jan 2003
    Location
    England
    Posts
    327

    Re: inet login

    It really does depend on the site as different sites will use different methods to log in. Can you post a link to the site you want to use this for?
    Do you wake up in the morning feeling sleepy and grumpy? Then you must be Snow White

  9. #9

    Thread Starter
    Lively Member
    Join Date
    Feb 2007
    Posts
    79

    Re: inet login

    ...... theres a varity of sites the idea isnt to make a program but to understand how somthing works and how to accomplish it so as i said we will just use vbforums.com as a exsample + is all the same method u sjust send the http headers which are diffrent but u get them from the same place and excet i jsut dont understand how to set them up and stuff

  10. #10
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: inet login

    Well one way is by using Winsock you can take the information you see by using a packet sniffer and copy the text part that IE sends and then in your VB program you send the same text back to the server. I'm not going to show you exactly what that text information is but I will tell you that once you establish a connection with, ley's say, www.vbforum.com using Winsock is that the first thing that will happen is that your Winsock_Connect event will be entered and it is here that you do the sending of the header records back to the server. The header records are what you copy from a packet sniffer's output and it will begin with either a GET or a POST command. It is different for different sites but the principal is the same.
    Code:
      '
      '
    Private Sub Connect To Server()
     Winsock1.Close
     Winsock1.Connect "www.vbforum.com",80
    End Sub
    
    Private Sub Winsock1_Connect()
     Dim s As String
    
     '
     ' You must fill in the data that you get from copying the output
     ' of a packet sniffer 
     '
     s = "POST ........................." & vbcrlf
    
     '
     ' Once you send the header back to the server your DataArrival event 
     ' will be entered with the server sending you some data
     '
     Winsock1.SendData s
    End Sub
    
    Private Winsock1_DataArrival(.............)
     Dim s As String
    
     '
     ' Here the server returns a response to the header info you sent in the 
     ' _Connect event
     '
     Winsock1.GetData s
    End Sub
    This is just to get you started. Once you have something or you have made a connection and you have some header info that you copied from a packet sniffer and you get a server response then we can deal with specifics at that time.

  11. #11

    Thread Starter
    Lively Member
    Join Date
    Feb 2007
    Posts
    79

    Re: inet login

    damn so like the password is encrypted in the cookie ?

  12. #12
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: inet login

    As a rule they are. I suppose there could be a few that the passwords are not encrypted but I doubt it. So unless you know and understand how passwords are encrypted or know how to deal with cookies (IE knows this) you are going to have some very rough spots to get around.

  13. #13
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: inet login

    Wuh, can you post the code for doing this using the webbrowser control... Please... I dont know how to login to a website using vb & webbrowser control...

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  14. #14
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: inet login

    All it will do is just bring up vbForums just like you get when using your default browser.

  15. #15
    Hyperactive Member
    Join Date
    Aug 2008
    Posts
    353

    Re: inet login

    I posted the code in delhpi...working one.

    Im changing the code now to vb.

    You need to login and then post the data required...u'll need to know the variables

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width