dorkgen

package module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2020 License: MIT Imports: 2 Imported by: 2

README

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
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EngineFactory

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

EngineFactory is the main interface for search engine implementations.

type GoogleSearch

type GoogleSearch struct {
	EngineFactory
	// contains filtered or unexported fields
}

GoogleSearch is the Google implementation for Dorkgen

func (*GoogleSearch) Cache

func (e *GoogleSearch) Cache(url string) *GoogleSearch

Cache ...

func (*GoogleSearch) Exclude

func (e *GoogleSearch) Exclude(value string) *GoogleSearch

Exclude ...

func (*GoogleSearch) Ext

func (e *GoogleSearch) Ext(ext string) *GoogleSearch

Ext ...

func (*GoogleSearch) Filetype

func (e *GoogleSearch) Filetype(filetype string) *GoogleSearch

Filetype ...

func (*GoogleSearch) Intext

func (e *GoogleSearch) Intext(text string) *GoogleSearch

Intext ...

func (*GoogleSearch) Inurl

func (e *GoogleSearch) Inurl(url string) *GoogleSearch

Inurl ...

func (*GoogleSearch) Or

func (e *GoogleSearch) Or() *GoogleSearch

Or ...

func (*GoogleSearch) Related

func (e *GoogleSearch) Related(url string) *GoogleSearch

Related ...

func (*GoogleSearch) Site

func (e *GoogleSearch) Site(site string) *GoogleSearch

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 ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL