dorkgen/README.md

2.1 KiB

Dorkgen

Dorkgen is a dork request generator for popular search engines such as Google, DuckDuckGo and Bing. Learn more about Google Hacking.

Install

go get github.com/sundowndev/dorkgen

Usage

package main

import (
	"fmt"
  
  	"github.com/sundowndev/dorkgen"
)

func main() {
  dork := dorkgen.Google{}
  // dork := dorkgen.DuckDuckGo{}
  // dork := dorkgen.Bing{}
 
  dork.Site("example.com").Intext("06792489265").ToString()
  // site:example.com "06792489265"

  dork.Site("example.com").Or().Intext("06792489265").ToString()
  // site:example.com OR "06792489265"

  dork.Site("facebook.*").Exclude("site:facebook.com").ToUrl()
  // https://www.google.com/search?q=site%3A"facebook.*"+-site%3Afacebook.com
}

API

type EngineFactory interface {
	Site(string) *GoogleSearch
	ToString() string
	Intext(string) *GoogleSearch
	Inurl(string) *GoogleSearch
	Filetype(string) *GoogleSearch
	Cache(string) *GoogleSearch
	Related(string) *GoogleSearch
	Ext(string) *GoogleSearch
	Exclude(string) *GoogleSearch
}