Results 1 to 12 of 12

Thread: PacketX

  1. #1

    Thread Starter
    Member
    Join Date
    Apr 2006
    Posts
    48

    PacketX

    Hi, i am trying to use PacketX to send/recive packets i have the reciving part working alright but can someone please tell me how to send packets, i think its something like PacketXCtrl1.Adapter.SendPacket (oPacket) but how do i set the destination ip address and port. any help would be great thanks

  2. #2
    Member
    Join Date
    Sep 2005
    Location
    Netherlands, The
    Posts
    41

    Re: PacketX

    wut is PacketX

  3. #3

    Thread Starter
    Member
    Join Date
    Apr 2006
    Posts
    48

    Re: PacketX

    PacketX is an Active X component that integrates WINPcap packet capture functionality . copied it from there site

  4. #4
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,692

    Re: PacketX

    This is VB Script, but you should be able to read it. There are a few different examples of how to use the control in C, C# and VBS here.

  5. #5

    Thread Starter
    Member
    Join Date
    Apr 2006
    Posts
    48

    Re: PacketX

    Thanks but i actually saw that and i cant read it

  6. #6
    Member
    Join Date
    Sep 2005
    Location
    Netherlands, The
    Posts
    41

    Re: PacketX

    seeing the code. i suggest you loop trough the adapters to get the adaptar with the ip you want, since you hijack a connection you dont make one yourselve. if the adaptars ip match with the ip you want to hijack then its the adapter you want

  7. #7

    Thread Starter
    Member
    Join Date
    Apr 2006
    Posts
    48

    Re: PacketX

    i mean for sending packets, i must have a destination ip?

  8. #8
    Member
    Join Date
    Sep 2005
    Location
    Netherlands, The
    Posts
    41

    Re: PacketX

    Quote Originally Posted by Mitsukai
    seeing the code. i suggest you loop trough the adapters to get the adaptar with the ip you want, since you hijack a connection you dont make one yourselve. if the adaptars ip match with the ip you want to hijack then its the adapter you want
    after that you can send packets with the adapter

  9. #9

    Thread Starter
    Member
    Join Date
    Apr 2006
    Posts
    48

    Re: PacketX

    But i have selected the adapter i need, but what i need to know is where i can input the destantion ip address and port

  10. #10
    Member
    Join Date
    Sep 2005
    Location
    Netherlands, The
    Posts
    41

    Re: PacketX

    thats this piece of code, i think the adapter will connect with the request, but right now i have no idea what im talking about :P, im not really into hardware programming
    VB Code:
    1. '// Send ARP request for this IP address
    2. sIPReso = "11.12.13.14"
    3. aIPReso=Split(sIPReso, ".", -1, 1)
    4. aIPAddr=Split(sIPAddr, ".", -1, 1)
    5.  
    6. '// You can use the following syntax to call the Adapter.SendPacket method
    7. '//
    8. '// 1. Send packet by reference (VT_BYREF|VT_VARIANT) as array of variants
    9. '// oPktX.Adapter.SendPacket oPacket, 1
    10. '//
    11. '// 2. Send packet by value (VT_BYREF|VT_VARIANT|VT_ARRAY) as array of variants
    12. '// oPktX.Adapter.SendPacket(oPacket)
    13. '//
    14. '// 3. Send packet directly (VT_VARIANT|VT_ARRAY) as array of variants
    15. '// oPktX.Adapter.SendPacket Array(1,2,...,n)
    16.  
    17. '// Send 100 ARP requests
    18. oPktX.Adapter.SendPacket Array(&hFF, &hFF, &hFF, &hFF, &hFF, &hFF,_
    19.       CByte(HexToDec(Mid(sHWAddr,1,2))),_
    20.       CByte(HexToDec(Mid(sHWAddr,3,2))),_
    21.       CByte(HexToDec(Mid(sHWAddr,5,2))),_
    22.       CByte(HexToDec(Mid(sHWAddr,7,2))),_
    23.       CByte(HexToDec(Mid(sHWAddr,9,2))),_
    24.       CByte(HexToDec(Mid(sHWAddr,11,2))),_
    25.       &h08, &h06, &h00, &h01, _
    26.       &h08, &h00, &h06, &h04, &h00, &h01,_
    27.       CByte(HexToDec(Mid(sHWAddr,1,2))),_
    28.       CByte(HexToDec(Mid(sHWAddr,3,2))),_
    29.       CByte(HexToDec(Mid(sHWAddr,5,2))),_
    30.       CByte(HexToDec(Mid(sHWAddr,7,2))),_
    31.       CByte(HexToDec(Mid(sHWAddr,9,2))),_
    32.       CByte(HexToDec(Mid(sHWAddr,11,2))),_
    33.       CByte(aIPAddr(0)),_
    34.       CByte(aIPAddr(1)),_
    35.       CByte(aIPAddr(2)),_
    36.       CByte(aIPAddr(3)),_
    37.       &h00, &h00, &h00, &h00, &h00, &h00,_
    38.       CByte(aIPReso(0)),_
    39.       CByte(aIPReso(1)),_
    40.       CByte(aIPReso(2)),_
    41.       CByte(aIPReso(3)),_
    42.       &h00, &h00, &h00, &h00, &h00, &h00,_
    43.       &h00, &h00, &h00, &h00, &h00, &h00,_
    44.       &h00, &h00, &h00, &h00, &h00, &h00), 100

  11. #11

    Thread Starter
    Member
    Join Date
    Apr 2006
    Posts
    48

    Re: PacketX

    hi thanks for the relpy i tried that in vb but the code turned red as if there was something wrong with it, i just assumed it was because it was for vbscript

  12. #12
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,692

    Re: PacketX

    Well ...

    You do need the HexToDec() function and oPktX.Adapter.SendPacket(). But CByte and Mid are native VB.

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