77using CsvHelper ;
88using CsvHelper . Configuration ;
99using Nager . PublicSuffix . RuleProviders ;
10- using System . Net . Http ;
1110using Nager . PublicSuffix . RuleProviders . CacheProviders ;
1211using Microsoft . Extensions . Configuration ;
1312
@@ -17,6 +16,7 @@ public class Program
1716{
1817 private static readonly object _fileLock = new ( ) ;
1918 private static StreamWriter ? _outputFileWriter = null ;
19+ private static readonly string _version = "v1.71" ;
2020
2121 public static async Task Main ( string [ ] args = null )
2222 {
@@ -32,8 +32,8 @@ public static async Task Main(string[] args = null)
3232 new Option < int > ( [ "-t" , "--threads" ] , ( ) => 50 , "Number of domains to check at once" ) ,
3333 new Option < bool > ( [ "-v" , "--verbose" ] , "Print extra information" ) ,
3434 new Option < bool > ( [ "-q" , "--quiet" ] , "Quiet mode: Only print found results" ) ,
35- new Option < bool > ( [ "-eu" , "--exclude-unlikely" ] , "Exclude unlikely (edge-case) fingerprints" ) ,
3635 new Option < string > ( [ "-c" , "--csv" ] , "Heading or column index to parse for CSV file. Forces -l to read as CSV instead of line-delimited" ) { Name = "CsvHeading" } ,
36+ new Option < bool > ( [ "-eu" , "--exclude-unlikely" ] , "Exclude unlikely (edge-case) fingerprints" ) ,
3737 new Option < bool > ( [ "--validate" ] , "Validate the takeovers are exploitable (where possible)" )
3838 } ;
3939
@@ -48,6 +48,21 @@ public static async Task Main(string[] args = null)
4848
4949 public static async Task RunSubdominator ( Options o )
5050 {
51+ // Print banner!
52+ if ( ! o . Quiet )
53+ {
54+ Console . WriteLine ( @$ "
55+
56+ _____ _ _ _ _
57+ / ___| | | | | (_) | |
58+ \ `--. _ _| |__ __| | ___ _ __ ___ _ _ __ __ _| |_ ___ _ __
59+ `--. \ | | | '_ \ / _` |/ _ \| '_ ` _ \| | '_ \ / _` | __/ _ \| '__|
60+ /\__/ / |_| | |_) | (_| | (_) | | | | | | | | | | (_| | || (_) | |
61+ \____/ \__,_|_.__/ \__,_|\___/|_| |_| |_|_|_| |_|\__,_|\__\___/|_|
62+ { _version } | stratussecurity.com
63+ " ) ;
64+ }
65+
5166 // Get domain(s) from the options
5267 var rawDomains = new List < string > ( ) ;
5368 if ( ! string . IsNullOrEmpty ( o . DomainsFile ) )
@@ -199,10 +214,9 @@ static async Task<IEnumerable<string>> FilterAndNormalizeDomains(List<string> do
199214 ] )
200215 . Build ( ) ;
201216 var cacheProvider = new LocalFileSystemCacheProvider ( ) ;
202- var ruleProvider = new CachedHttpRuleProvider ( cacheProvider , new HttpClient ( ) ) ;
203-
204- await ruleProvider . BuildAsync ( ) ;
217+ var ruleProvider = new CachedHttpRuleProvider ( cacheProvider , new HttpClient ( ) , configuration ) ;
205218 var domainParser = new DomainParser ( ruleProvider ) ;
219+ await ruleProvider . BuildAsync ( ) ;
206220
207221 // Normalize domains and check validity
208222 var normalizedDomains = domains
0 commit comments