# Dorkgen
GoDoc build status go report Latest version
Dorkgen is a dork request generator for popular search engines such as Google, DuckDuckGo and Bing. [Learn more about Google Hacking](https://en.wikipedia.org/wiki/Google_hacking). ## Install ```bash go get github.com/sundowndev/dorkgen ``` ## Usage [Try it in the Go playground](https://play.golang.org/p/ck_hEoX8cTK) #### Get started ```go package main import "github.com/sundowndev/dorkgen" func main() { dork := &dorkgen.GoogleSearch{} // dork := &dorkgen.DuckDuckGo{} // dork := &dorkgen.Bing{} dork.Site("example.com").Intext("text").ToString() // returns: site:example.com "text" } ``` #### Operators ```go dork.Site("facebook.com").Or().Site("twitter.com").ToString() // returns: site:facebook.com OR site:twitter.com dork.Intext("facebook").And().Intext("twitter").ToString() // returns: "facebook" AND "twitter" ``` #### Exclude results ```go dork. Exclude((&dorkgen.GoogleSearch{}). Site("example.com"). ToString()). Site("example.*"). Or(). Intext("text") // returns: -site:example.com site:example.* OR "text" ``` #### Group tags along with operators ```go dork. Group((&dorkgen.GoogleSearch{}). Site("facebook.com"). Or(). Site("twitter.com"). ToString()). Intext("wtf"). ToString() // returns: (site:facebook.com OR site:twitter.com) "wtf" } ``` #### URL conversion ```go dork.Site("facebook.*").Exclude("site:facebook.com").ToURL() // returns: https://www.google.com/search?q=site%3A"facebook.*"+-site%3Afacebook.com ```