Skip to content

turbo-turnip/DNS-Cacher

Repository files navigation

DNS Cacher

Description

This simple C# program fetches hostnames and looks through domain name servers for A records. When it finds an IP in the DNS, it will cache the IP, DNS, and Hostname, so that when you fetch the same hostname, it will receive the cached results.


Requirements

.NET 3.1 or greater

Running the Program

Visual Studio

Download the source code: git clone https://github.com/SoftwareFuze/DNS-Cacher.git
Then, open DNS-Cacher.csproj with Visual Studio.

.NET CLI

Download the source code: git clone https://github.com/SoftwareFuze/DNS-Cacher.git
Then, run the command dotnet run

When you run the program, you should see the following message
Welcome Screen


Commands


View the current cache

To view the current cache, run the command current-cache

View current cache

Create a new cache

To create a new cache, run the command create-cache [name] where [name] is the name of the new cache you want to register.

Create cache

Now, as you can see, it switched us over to the newly created cache we made!

We now have both our default-cache and our newly created my-new-cache

The new cache

Switch from one cache to another

To switch from one cache to another, run the command switch-cache [cache] where [cache] is the name of the cache you want to switch to.

Switch caches

Lookup a DNS record

To lookup a DNS record by hostname, run the command lookup [hostname] where [hostname] is the hostname.

Valid hostnames are the domain name, followed by the TLD.

    Examples of valid and invalid hostnames:

  • ✅   google.com
  • ❌   https://google.com/
  • ✅   apple.com
  • ❌   apple.com/
Lookup hostname

To exit the program, run the command .exit

About

A simple C# DNS A Record IP cacher.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages