Author Topic: [JAVA] Datagram Hook  (Read 3926 times)

0 Members and 1 Guest are viewing this topic.

Offline Lance

  • Full Member
  • ***
  • Posts: 129
    • View Profile
[JAVA] Datagram Hook
« on: June 25, 2010, 09:35:46 pm »
I want to receive the outgoing UDP datagrams from a C++ program, and spoof the sender address of incoming datagrams; nothing more and nothing less. Is this possible with Java, or is the language too limited?

I am using Fedora by the way.

Thanks :)

EDIT: The C++ program is open source so I have full access to it's API.

EDIT 2: Fixed some bad wording.
« Last Edit: June 25, 2010, 09:57:01 pm by Lance »
Quote from: Joe
[23:55:31] [william@enterprise ~/Documents/Programming/javaop2]$ svn commit -m 'Tried to fix StayConnected. Again.'
Committed revision 63.
StayConnected strikes back!

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: [JAVA] Datagram Hook
« Reply #1 on: June 25, 2010, 09:47:24 pm »
Receiving the outgoing should be possible win WinPcap, but I don't know how to spoof incoming unless you find the address of the receiving function and call it from your program. None of this can be done from Java, as far as I know. Your best bet would probably be C#, since it's pretty similar.
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline Lance

  • Full Member
  • ***
  • Posts: 129
    • View Profile
Re: [JAVA] Datagram Hook
« Reply #2 on: June 25, 2010, 09:49:27 pm »
What about Jpcap? I happened to run into this by chance a few months ago but never knew what it really was. Can this accomplish what I need it to?

EDIT: Jpcap seems to be what I am looking for, I am going to try some of the samples out! :D
« Last Edit: June 25, 2010, 10:00:49 pm by Lance »
Quote from: Joe
[23:55:31] [william@enterprise ~/Documents/Programming/javaop2]$ svn commit -m 'Tried to fix StayConnected. Again.'
Committed revision 63.
StayConnected strikes back!