Is there a way to monitor the system's DNS cac

2019-09-07 13:36发布

I want to do a real time monitor of the DNS cache requests of the system in c#. My system is a windows 7 64 bit. What I did so far is to catch the DNS requests by creating a listening UDP server on port 53, but this monitors ALL the DNS request, what I am interested in are only request made to DNS cache of the local OS. Is there a way to monitor the DNS cache of the system? THx

1条回答
甜甜的少女心
2楼-- · 2019-09-07 14:32

You can get your DNS cache via this powershell function: Show-DnsServerCache

And this SO post illustrates how to call powershell functions from C#.

查看更多
登录 后发表回答