yellow.git


yellow

~ opinionated web scanning pipeline for pentesters in a hurry
git clone https://github.com/djnnvx/yellow.git
log | files | refs | archive | README | LICENSE

commit 095edb7cade26fd69e8d6a8c08f1f1fef9027f40
parent 6fe37ce901ee8cc7dc6398214e9ad123197a342d
Author: djnn <[email protected]>
Date: Wed, 4 Dec 2024 20:13:31 +0900

fix(osint): output of domains file

Diffstat:
Mhelpers/strings.go | 2+-
Mosint/run.go | 3++-

2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/helpers/strings.go b/helpers/strings.go
@@ -21,7 +21,7 @@ func ReplaceWithHyphen(input string) string {
 // if its not a valid domain in the end, not too big of a deal,
 // we just want an approximate response
 func StringHasUnwantedCharacters(url string) bool {
-	badChars := ";\t\n, +\\\"[]{}()"
+    badChars := ":;\t\n, +\\\"[]{}()"
 	for _, b := range badChars {
 		if strings.Contains(url, string(b)) {
 			return true
diff --git a/osint/run.go b/osint/run.go
@@ -143,7 +143,7 @@ func (opts OsintOpts) Run() {
 
 			// does it look like a domain name ? at least one .
 			// (hacky, but no need to make it better for now)
-			if addr != nil || !helper.StringHasUnwantedCharacters(parsedDomain) {
+			if addr != nil || (!helper.StringHasUnwantedCharacters(parsedDomain) && parsedDomain != "") {
 				domains = append(domains, parsedDomain)
 				domainBuffer.Write([]byte(string(parsedDomain) + "\n"))
 			}
@@ -158,5 +158,6 @@ func (opts OsintOpts) Run() {
 	}
 
 	fmt.Printf("[OSINT %s] Registered %v IP addresses and assets.\n", opts.domain, len(domains))
+    fmt.Printf("[OSINT %s] Location of unique domain names: %s.\n", opts.domain, uniqueOutfile)
 	fmt.Printf("[OSINT %s] done.\n", opts.domain)
 }