Created
March 30, 2023 08:31
-
-
Save DeathsPirate/f111513ec5968eea29b6c13ecbc35e46 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# List of domains to search in DNS cache | |
$domains = @( | |
"akamaicontainer.com", | |
"akamaitechcloudservices.com", | |
"azuredeploystore.com", | |
"azureonlinecloud.com", | |
"azureonlinestorage.com", | |
"dunamistrd.com", | |
"glcloudservice.com", | |
"journalide.org", | |
"msedgepackageinfo.com", | |
"msstorageazure.com", | |
"msstorageboxes.com", | |
"officeaddons.com", | |
"officestoragebox.com", | |
"pbxcloudeservices.com", | |
"pbxphonenetwork.com", | |
"pbxsources.com", | |
"qwepoi123098.com", | |
"sbmsa.wiki", | |
"sourceslabs.com", | |
"visualstudiofactory.com", | |
"zacharryblogs.com" | |
) | |
# Get the DNS cache using ipconfig | |
$dnsCache = ipconfig /displaydns | |
# Initialize an array to store the matched domains | |
$matchedDomains = @() | |
# Search the DNS cache for each domain | |
foreach ($domain in $domains) { | |
if ($dnsCache -match $domain) { | |
$matchedDomains += $domain | |
} | |
} | |
# Display the matched domains | |
if ($matchedDomains) { | |
Write-Host "Matched Domains in DNS Cache:" | |
foreach ($matchedDomain in $matchedDomains) { | |
Write-Host $matchedDomain | |
} | |
} else { | |
Write-Host "No matched domains found in DNS Cache." | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment