Created
September 18, 2020 10:38
-
-
Save johnw86/ef94639357268874a9dc5b8f34dbd10c to your computer and use it in GitHub Desktop.
SFP Lookup
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
// Using DnsClient nuget package | |
var client = new LookupClient(); | |
var textRecords = client.Query("google.com", QueryType.TXT).AllRecords.TxtRecords(); | |
var spfRecords = textRecords.Where(x => x.EscapedText.Any(t => t.Contains("spf"))); | |
foreach (var spfRecord in spfRecords) | |
{ | |
foreach (var text in spfRecord.EscapedText) | |
{ | |
Console.WriteLine(text); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment