1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[VB.NET] Mysticals Wrapper

Discussion in 'Code Snippets and Tutorials' started by expon, Jul 23, 2007.

  1. expon

    expon Administrator
    Staff Member

    Joined:
    Oct 30, 2006
    Messages:
    1,393
    Likes Received:
    56
    Location:
    UK
    This wrapper was made by Mystical (who is currently inactive).

    Add a new class in your VB.NET program.
    Call it tcpwrapper.vb and paste this code (in the attached txt file) into it.

    Examples of the usage of the request function in your program would be:

    Code (vb.net):
    1. <div class="vbnet" id="{CB}" style="font-family: monospace;"><ol><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0600FF;">Dim</span> HTML <span style="color: #FF8000;">as</span> <span style="color: #FF8000;">String</span> = Wrapper.<span style="color: #0000FF;">Request</span><span style="color: #000000;">(</span><span style="color: #808080;">"GET"</span>, site, referrer<span style="color: #000000;">)</span> </li></ol></div>
    or

    Code (vb.net):
    1. <div class="vbnet" id="{CB}" style="font-family: monospace;"><ol><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"> <span style="color: #0600FF;">Dim</span> HTML <span style="color: #FF8000;">as</span> <span style="color: #FF8000;">String</span> = Wrapper.<span style="color: #0000FF;">Request</span><span style="color: #000000;">(</span><span style="color: #808080;">"POST"</span>, site <span style="color: #0600FF;">with</span> postdata, referrer<span style="color: #000000;">)</span> </li></ol></div>
    an example of putting a site with post data would be http://www.neofriends.net/ucp.php?mode=login&username= etc


    Other functions are:

    ClearCookies()

    Pause(seconds)

    NeoLogin(username, password, loginboolean)
     

    Attached Files:

  2. Smelly

    Smelly Level IV

    Joined:
    Dec 1, 2006
    Messages:
    2,197
    Likes Received:
    8
    Location:
    England
    In order to use this, do you have to include all of the items on the form?
    e.g cmdLogin, txtUsername etc

    If so, I've done that but am still getting on error because I'm not sure what to include on the form.

    'Login' is not a member of 'WindowsApplication1.frmMain'.

    What component is 'Login'?
     
  3. Skyle

    Skyle Level II

    Joined:
    Aug 13, 2007
    Messages:
    212
    Likes Received:
    7
    If you wanted to use the login function do something like:

    Code (Text):
    1. <div class="text" id="{CB}" style="font-family: monospace;"><ol><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">'In the declarations</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">Dim wrapper as TCPWrapper = New TCPWrapper</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp;</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">Private Sub cmdLogin()</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">strHTML = Wrapper.NeoLogin(txtUsername.text, txtPassword.text)</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp;</li></ol></div>
    I'm entirely sure if thats what you want lol.
     
  4. chelsea1

    chelsea1 Level IV

    Joined:
    Nov 26, 2006
    Messages:
    2,538
    Likes Received:
    31
    Location:
    London
    does this wrapper still work entirely or are there a few fixes needed?

    many thanks in advance
     
  5. tharoux

    tharoux Level IV

    Joined:
    Dec 30, 2006
    Messages:
    2,733
    Likes Received:
    126
    Location:
    In front of my PC, Montreal
    I'm still using it. I just can't remember if I made some modifications to it.
    See there code-snippets-tutorials-f15/nf-authorization-t21013.html
    The wrapper is include and working.
     
    chelsea1 likes this.
  6. FancyDress

    FancyDress Newbie

    Joined:
    May 7, 2013
    Messages:
    1
    Likes Received:
    0
    I'm not sure what to include on the form.