I have a program by me written in C# and I want to be able to see what it is sending/receiving to its home website in the background upon loading and possibly block its Data packets to it's main website. Is this possible?
Read C# TCP connection details?
Started by itsjinx, Oct 19 2008 07:08 PM
3 replies to this topic
#1
Posted 19 October 2008 - 07:08 PM
|
|
|
#2
Posted 20 October 2008 - 04:17 AM
To connect to a server you need to
1. Using directives
using System.Net;
using System.Net.Security;
using System.Net.Sockets;
using System.Net.Mail;
2. Create a tcp client object
TcpClient Client;
3. Instantiation
Client = new TcpClient();
4. Establish / open a Connection
Client.Connect("SERVERNAME", Port# );
5. Log on to server, to do this we need a method for transmitting data over the open connection to the server. We will use Stream Readers / Writers for this.
5.a Create Data Transport Stream object
NetworkStream stream = Client.GetStream();
5.b Create Data Transport objects
StreamReader reader;
5.c Attach Transport objects to stream
reader = new StreamReader(stream);
5.d Use transport objects to log in
1. Using directives
using System.Net;
using System.Net.Security;
using System.Net.Sockets;
using System.Net.Mail;
2. Create a tcp client object
TcpClient Client;
3. Instantiation
Client = new TcpClient();
4. Establish / open a Connection
Client.Connect("SERVERNAME", Port# );
5. Log on to server, to do this we need a method for transmitting data over the open connection to the server. We will use Stream Readers / Writers for this.
5.a Create Data Transport Stream object
NetworkStream stream = Client.GetStream();
5.b Create Data Transport objects
StreamReader reader;
5.c Attach Transport objects to stream
reader = new StreamReader(stream);
5.d Use transport objects to log in
#3
Posted 20 October 2008 - 08:48 AM
#4
Posted 21 October 2008 - 08:52 AM
no you completely misunderstood the question. there is a 3rd party program( i have no access to source code) and I want to block it's access to the internet and read what data packets it is sending to the internet. please advise!


Sign In
Create Account

Back to top









