Sending packets

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Polyhymnia
    New Member
    • Aug 2010
    • 2

    #1

    Sending packets

    Hello,

    I get AccesViolationE xception with a code when I try to send a packet back to a server. I tried another way with my packet sniffer dll, there I get a SEHexception.

    Here is my code I used where I get the AccesViolationE xception:
    Code:
        Public Declare Auto Function vpSendPacket Lib "VBPCAP.DLL" (ByRef packet() As Byte) As System.Int32
    
    Public Sub sendpacket()
            Dim str As Object
            str = "00000000 02 3D 00 36 00"
            Dim bb() As Byte
            bb = StrToByteArray(str)
            vpSendPacket(bb)
    End Sub
    Public Shared Function StrToByteArray(ByVal str As String) As Byte()
            Dim encoding As New System.Text.UTF8Encoding()
            Return encoding.GetBytes(str)
    End Function 'StrToByteArray
    This is the code from my packet sniffer:
    Code:
    Public Sub sendpacket()
            Dim str As Object
            str = "00000000 02 3D 00 36 00"
            AxPacketXCtrl1.Adapter.SendPacket(str)
    End Sub
    I think the program I'm trying to send to is protected. Does anyone know a work around or a good method to make it work?

    All help appreciated, Thanks=D

    Greetings,
    Polyhymnia
  • Polyhymnia
    New Member
    • Aug 2010
    • 2

    #2
    Sorry wrong forum. Could a moderator move this?

    Comment

    Working...