TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
duane allman
NA
1
0
problem with catching DNS udp packets
May 23 2009 12:25 AM
Hi,
I write a simple program to catch DNS UDP packets which is listening to port 53.
UdpClient server = null;
try
{
server = new UdpClient(0);//also I tried port 53 but same result
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
IPEndPoint remoteip = new IPEndPoint(IPAddress.Any, 0);
for (; ; )
{
byte[] bb = server.Receive(ref remoteip);
Console.WriteLine(Encoding.ASCII.GetString(bb));
}
but it is not showing anything ,to be honest it will stuck in the following line :
byte[] bb = server.Receive(ref remoteip);
my purpose is to catch my local computer DNS request which are made by several program on my pc then relay their request to real dns servers and then after that cache their relative addresses for later on.
that's why I thought it should be good idea first of all to test DNS:udp53 but no chance.
Reply
Answers (
1
)
Validation
Reg:Image button and textbox