Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
0x4f53 committed Aug 7, 2024
1 parent 3f3b027 commit 46f0aa0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 26 deletions.
27 changes: 2 additions & 25 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,39 +20,16 @@ for index, sub := subdomains {
...
```

### Functions
### Documentation

#### SubdomainsOnly

- Returns: only the subdomains (subdomain.example.com) as a slice of strings


#### DomainsOnly

- Returns: only the domains (example.com) as a slice of strings


#### BreakFusedSubdomains

- Returns: the subdomains/domains that are fused on accident, split into newlines

Example: en.wikipedia.org0x4f.medium.com gives
en.wikipedia.org
0x4f.medium.com


#### SubdomainAndDomainPair

- Returns: a struct containing a subdomain and its domain
Visit https://pkg.go.dev/github.com/0x4f53/textsubs to read about the functions and their descriptions


### Working
This package uses [publicsuffix2](https://github.com/weppos/publicsuffix-go), basic regex matching and a few if-else statements to determine if a string containing dots
is a subdomain or not. Please note that certain strings like "readme.md" will be marked as valid subdomains due to
_.md_ being a valid TLD.

This package does not resolve/validate the subdomains or domains it captures.

---

Copyright (c) 2024 Owais Shaikh
Expand Down
2 changes: 1 addition & 1 deletion textsubs.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ func checkSubdomain(subdomain string, wg *sync.WaitGroup, results chan<- map[str
}

// Returns: a map of format (item, bool) containing items (subdomains or domains) after checking
// if they resolve when pinged (using LookupHost)
// if they resolve when pinged (using LookupHost and waitgroups)
// Example: [0x4f.in play.google.com fakesite123131231.dev] gives
// {0x4f.in : true, play.google.com, fakesite123131231.dev : false}
// Inputs:
Expand Down

0 comments on commit 46f0aa0

Please sign in to comment.