BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Parallel program to on-line program

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> comp.lang.pascal.delphi.misc
View previous topic :: View next topic  
Author Message
Bob Richardson
Guest





PostPosted: Fri Jan 21, 2005 1:04 am    Post subject: Parallel program to on-line program Reply with quote



I'd like to write a program that runs at the same time as an on-line
program. It should be able to read the messages that are sent to the on-line
program. By on-line program I mean one that receives input from a web
connection. I suppose I'd have to discover what port was being used, by
trial and error, but I have no idea how to go about the job. Any ideas?


Back to top
Michael Brown
Guest





PostPosted: Fri Jan 21, 2005 11:45 am    Post subject: Re: Parallel program to on-line program Reply with quote



Bob Richardson wrote:
Quote:
I'd like to write a program that runs at the same time as an on-line
program. It should be able to read the messages that are sent to the
on-line program. By on-line program I mean one that receives input
from a web connection. I suppose I'd have to discover what port was
being used, by trial and error, but I have no idea how to go about
the job. Any ideas?

There's three approaches.

The first is to use winpcap or similar to log all packets, then grab the
ones you want to process them. The second is to use code injection
techniques to hook calls to the winsock DLL. The third is to get a SOCKS
server, let Sockscap32 do the hooking and write a SOCKS passthrough that
sits between the two and does the processing. The third is probably the
easiest, though #2 is not too difficult either if you know assembly. #1 is
kind of the sledgehammer-onna-nut approach, but would do the job (and be
quite educational about packet formats as well).

--
Michael Brown
www.emboss.co.nz : OOS/RSI software and more Smile
Add michael@ to emboss.co.nz ---+--- My inbox is always open



Back to top
Bob Richardson
Guest





PostPosted: Fri Jan 21, 2005 4:59 pm    Post subject: Re: Parallel program to on-line program Reply with quote




"Michael Brown" <see (AT) signature (DOT) below> wrote

Quote:
Bob Richardson wrote:
I'd like to write a program that runs at the same time as an on-line
program. It should be able to read the messages that are sent to the
on-line program. By on-line program I mean one that receives input
from a web connection. I suppose I'd have to discover what port was
being used, by trial and error, but I have no idea how to go about
the job. Any ideas?

There's three approaches.

The first is to use winpcap or similar to log all packets, then grab the
ones you want to process them. The second is to use code injection
techniques to hook calls to the winsock DLL. The third is to get a SOCKS
server, let Sockscap32 do the hooking and write a SOCKS passthrough that
sits between the two and does the processing. The third is probably the
easiest, though #2 is not too difficult either if you know assembly. #1 is
kind of the sledgehammer-onna-nut approach, but would do the job (and be
quite educational about packet formats as well).

Can you point me to an example of Sockscap32 in a Delphi program. As this is
a new field to me, an easy start would be best. TIA



Back to top
Michael Brown
Guest





PostPosted: Fri Jan 21, 2005 10:26 pm    Post subject: Re: Parallel program to on-line program Reply with quote

Bob Richardson wrote:
Quote:
"Michael Brown" <see (AT) signature (DOT) below> wrote in message
news:41f0ebba$1 (AT) clarion (DOT) carno.net.au...
Bob Richardson wrote:
I'd like to write a program that runs at the same time as an on-line
program. It should be able to read the messages that are sent to the
on-line program.
[...]
There's three approaches.
[...]
The third is
to get a SOCKS server, let Sockscap32 do the hooking and write a
SOCKS passthrough that sits between the two and does the processing.
[...]

Can you point me to an example of Sockscap32 in a Delphi program. As
this is a new field to me, an easy start would be best. TIA

Sockscap32 is an application from NEC (google is your friend Smile ). NEC also
has the SOCKS5 protocol spec on their site. It's pretty simple to implement.

Essentially what you'd do is use an TIdTCPServer that processes each
incoming SOCKS connection (from Sockscap32), and the processing thread would
create a TIdTCPClient that connects to the real SOCKS server. Then, it's
just a matter of shoveling the data between the two connections and
processing it in-between.

--
Michael Brown
www.emboss.co.nz : OOS/RSI software and more Smile
Add michael@ to emboss.co.nz ---+--- My inbox is always open



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> comp.lang.pascal.delphi.misc All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.