Documentation
¶
Overview ¶
Package dorkgen is a Go package to generate dork requests for popular search engines such as Google, DuckDuckGo and Bing. It allows you to define requests programmatically and convert them into string. You can use it as following:
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"
}
Index ¶
- type GoogleSearch
- func (e *GoogleSearch) Cache(url string) *GoogleSearch
- func (e *GoogleSearch) Exclude(value string) *GoogleSearch
- func (e *GoogleSearch) Ext(ext string) *GoogleSearch
- func (e *GoogleSearch) Filetype(filetype string) *GoogleSearch
- func (e *GoogleSearch) Group(value string) *GoogleSearch
- func (e *GoogleSearch) Intext(text string) *GoogleSearch
- func (e *GoogleSearch) Intitle(value string) *GoogleSearch
- func (e *GoogleSearch) Inurl(url string) *GoogleSearch
- func (e *GoogleSearch) Or() *GoogleSearch
- func (e *GoogleSearch) Related(url string) *GoogleSearch
- func (e *GoogleSearch) Site(site string) *GoogleSearch
- func (e *GoogleSearch) ToString() string
- func (e *GoogleSearch) ToURL() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoogleSearch ¶
type GoogleSearch struct {
// contains filtered or unexported fields
}
GoogleSearch is the Google implementation for Dorkgen
func (*GoogleSearch) Cache ¶
func (e *GoogleSearch) Cache(url string) *GoogleSearch
Cache shows the version of the web page that Google has in its cache.
func (*GoogleSearch) Exclude ¶
func (e *GoogleSearch) Exclude(value string) *GoogleSearch
Exclude excludes some results.
func (*GoogleSearch) Ext ¶
func (e *GoogleSearch) Ext(ext string) *GoogleSearch
Ext searches for a particular file extension mentioned in the query.
func (*GoogleSearch) Filetype ¶
func (e *GoogleSearch) Filetype(filetype string) *GoogleSearch
Filetype searches for a particular filetype mentioned in the query.
func (*GoogleSearch) Group ¶ added in v1.0.0
func (e *GoogleSearch) Group(value string) *GoogleSearch
Group isolate tags between parentheses.
func (*GoogleSearch) Intext ¶
func (e *GoogleSearch) Intext(text string) *GoogleSearch
Intext searches for the occurrences of keywords all at once or one at a time.
func (*GoogleSearch) Intitle ¶ added in v1.0.1
func (e *GoogleSearch) Intitle(value string) *GoogleSearch
Intitle searches for occurrences of keywords in title all or one.
func (*GoogleSearch) Inurl ¶
func (e *GoogleSearch) Inurl(url string) *GoogleSearch
Inurl searches for a URL matching one of the keywords.
func (*GoogleSearch) Or ¶
func (e *GoogleSearch) Or() *GoogleSearch
Or puts an OR operator in the request
func (*GoogleSearch) Related ¶
func (e *GoogleSearch) Related(url string) *GoogleSearch
Related list web pages that are “similar” to a specified web page.
func (*GoogleSearch) Site ¶
func (e *GoogleSearch) Site(site string) *GoogleSearch
Site specifically searches that particular site and lists all the results for that site.
func (*GoogleSearch) ToString ¶
func (e *GoogleSearch) ToString() string
ToString converts all tags to a single request
func (*GoogleSearch) ToURL ¶
func (e *GoogleSearch) ToURL() string
ToURL converts tags to an encoded Google Search URL