Results 1 to 6 of 6

Thread: [Resolved] winsock packet

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2006
    Posts
    11

    Resolved [Resolved] winsock packet

    Hello , i have a question about visual basic 6 , i´ve written a programm wich makes a mmorpg connects through it , as like a proxy. But i want it to display the packets as like winsock packet sniffer or editor do ( google: "winsock packet editor" ) .
    Can any1 tell me how i could do that?
    I already tried to display every data as string , but if i do that the proxy doesnt work anymore and it doesnt display it right ( wpe displays it as some hex values oO )
    Last edited by dddmaster; Jan 19th, 2006 at 02:00 PM.

  2. #2
    PowerPoster
    Join Date
    Dec 2003
    Posts
    4,787

    Re: [help] winsock packet

    Welcome to the forums!

    Interesting, I have tried looking into monitoring my network traffic in the past with out much succes, Packet Sniffing doenst allways work too well because the data you will pick up will be encrypted, hex or un-readable.

    What is it you are trying to achieve?

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2006
    Posts
    11

    Re: [help] winsock packet

    im working togehter with some friends on a ragnarok online private server and i want to create some automatics for the client , like auto item usage and such stuff , i also have a list of wich packet is wich and i have tried with wpe and such stuff... now i want it to do automaticaly with vb6 but i cant make it >< ( at least showing the packets while i recieve them would help )

    The basic Code of the proxy:
    VB Code:
    1. Private Sub Form_Load()
    2. Winsock1.LocalPort = 6900
    3. Winsock1.Listen
    4. Winsock2.RemotePort = 6901
    5. Winsock2.RemoteHostIP = "127.0.0.1" 'for testing , the server runs at my own pc
    6. End Sub
    7.  
    8. Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long)
    9. Winsock1.Close
    10. Winsock1.Accept requestID
    11. Winsock2.Connect
    12. End Sub
    13.  
    14. Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
    15. Winsock1.GetData Data
    16. 'somewhere here i have to get the packet ,
    17. 'but if i set the variable-type of data to something ,
    18. 'the proxy doesnt work anymore
    19. Winsock2.SendData Data
    20. End Sub
    21.  
    22. Private Sub Winsock2_DataArrival(ByVal bytesTotal As Long)
    23. Winsock2.GetData Data
    24. 'same as above
    25. Winsock1.SendData Data
    26. End Sub

  4. #4
    PowerPoster
    Join Date
    Dec 2003
    Posts
    4,787

    Re: [help] winsock packet

    I'm not 100% with this stuff, but i'll try and get in touch with somone who will know more about the proxys etc

    Pino

  5. #5

    Thread Starter
    New Member
    Join Date
    Jan 2006
    Posts
    11

    Re: [help] winsock packet

    uhm did u find out anything what could me help yet?

  6. #6

    Thread Starter
    New Member
    Join Date
    Jan 2006
    Posts
    11

    Re: [help] winsock packet

    sry 4 double post , but i made it :P
    if any1 cares , here my code
    VB Code:
    1. Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
    2. While Not connected ' boolean variable , is true if winsock2 is connected
    3. DoEvents
    4. Wend
    5. Dim data() As Byte
    6. Winsock1.GetData data ' get the data as Byte into data array
    7. Dim x As Integer
    8. x = 0
    9. While x < bytesTotal
    10. List1.AddItem "send " & x & ":" & Hex(data(x)) & "/" & data(x) ' go trough the array and add every element to list as decimal and hex
    11. x = x + 1
    12. Wend
    13. Winsock2.SendData data ' send data through winsock2 , its a proxy :P
    14. End Sub


    The same thing goes with winsock2 data arrival...
    With that u can also edit the data . Ragnarok connects to a login server and gets the ip of the character server from it , i managed to change the "packet" and made it connect to my localhost through another poxy :P

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