Skip to content

Instantly share code, notes, and snippets.

@eur0pa
Forked from lc/waywords.go
Last active April 11, 2024 08:32
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save eur0pa/3da504614a625b2ff197fc9d34370e0b to your computer and use it in GitHub Desktop.
Save eur0pa/3da504614a625b2ff197fc9d34370e0b to your computer and use it in GitHub Desktop.
generate wordlists utilizing the wayback machine
package main
import (
"bufio"
"fmt"
"net/url"
"os"
"strings"
)
func main() {
// usage: printf "example.com" | waybackurls | waywords
words := make(map[string]struct{})
w := bufio.NewScanner(os.Stdin)
for w.Scan() {
u, err := url.Parse(w.Text())
if err != nil {
continue
}
for _, t := range strings.Split(u.Path, "/") {
if t == "" {
continue
}
words[t] = struct{}{}
}
}
for word, _ := range words {
fmt.Println(word)
}
}
@tomnomnom
Copy link

echo example.com | waybackurls | unfurl -u paths | sed -r 's#/#\n#g' | sort -u 🙃

@eur0pa
Copy link
Author

eur0pa commented Jun 30, 2019

echo example.com | waybackurls | unfurl -u paths | sed -r 's#/#\n#g' | sort -u 🙃

Is that so, Mr. Hudson.

curl -s 'http://web.archive.org/cdx/search/cdx?collapse=urlkey&url=*.hacker.one' | awk -F'[) ?&]' 'gsub("/", "\n"){print $2 | "sort -u"}'

@tomnomnom
Copy link

😆

@EdOverflow
Copy link

waybackurls example.com | cut -d/ -f4- | sort -u

🐸

@tomnomnom
Copy link

vim 'http://web.archive.org/cdx/search/cdx?collapse=urlkey&url=*.hacker.one' +'%s/.\+)\/\([^ &?]*\).\+/\1/' +'%s/\//\r/' +'sort u'

@eur0pa
Copy link
Author

eur0pa commented Jun 30, 2019

waybackurls example.com | cut -d/ -f4- | sort -u

🐸

Relying on external tools, Ed? Why don't you install Xorg as well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment