dorker

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEFAULT_DEPTH   = 1  // recurse into
	DEFAULT_TIMEOUT = 30 // TODO: Set req timeout
)

Variables

View Source
var DorkLib = dorkLib{
	"application/pdf": []Dork{
		Dork{"google", "filetype:pdf"},
	},
	"audio/mpeg": []Dork{
		Dork{"google", "intitle:index.of +?last modified? +?parent directory? +(mp3|wma|ogg) -htm -html -php -asp"},
		Dork{"google", "filetype:mp3"},
		Dork{"google", "filetype:mp4"},
		Dork{"google", "filetype:m4a"},
		Dork{"google", "filetype:m4p"},
		Dork{"google", "filetype:m4v"},
		Dork{"google", "filetype:3gp"},
		Dork{"google", "filetype:3g2"},
	},
	"audio/MPA": []Dork{
		Dork{"google", "filetype:mp3"},
		Dork{"google", "filetype:mp4"},
		Dork{"google", "filetype:m4a"},
		Dork{"google", "filetype:m4p"},
		Dork{"google", "filetype:m4v"},
		Dork{"google", "filetype:3gp"},
		Dork{"google", "filetype:3g2"},
	},
	"audio/mpa-robust": []Dork{
		Dork{"google", "filetype:mp3"},
		Dork{"google", "filetype:mp4"},
		Dork{"google", "filetype:m4a"},
		Dork{"google", "filetype:m4p"},
		Dork{"google", "filetype:m4v"},
		Dork{"google", "filetype:3gp"},
		Dork{"google", "filetype:3g2"},
	},
	"application/ogg": []Dork{
		Dork{"google", "filetype:ogg"},
		Dork{"google", "filetype:ogv"},
		Dork{"google", "filetype:oga"},
		Dork{"google", "filetype:ogx"},
		Dork{"google", "filetype:ogm"},
		Dork{"google", "filetype:spx"},
		Dork{"google", "filetype:opus"},
	},
	"video/ogg": []Dork{
		Dork{"google", "filetype:ogg"},
		Dork{"google", "filetype:ogv"},
		Dork{"google", "filetype:oga"},
		Dork{"google", "filetype:ogx"},
		Dork{"google", "filetype:ogm"},
		Dork{"google", "filetype:spx"},
		Dork{"google", "filetype:opus"},
	},
	"audio/ogg": []Dork{
		Dork{"google", "filetype:ogg"},
		Dork{"google", "filetype:ogv"},
		Dork{"google", "filetype:oga"},
		Dork{"google", "filetype:ogx"},
		Dork{"google", "filetype:ogm"},
		Dork{"google", "filetype:spx"},
		Dork{"google", "filetype:opus"},
	},
	"image/jpeg": {
		Dork{"google", "intitle:index.of +?last modified? +?parent directory? +(jpeg|jpg|jpe|jfif|jfi|jif) -htm -html -php -asp"},
		Dork{"google", "filetype:jpeg"},
		Dork{"google", "filetype:jpg"},
		Dork{"google", "filetype:jpe"},
		Dork{"google", "filetype:jfif"},
		Dork{"google", "filetype:jfi"},
		Dork{"google", "filetype:jif"},
	},
	"image/png": []Dork{
		Dork{"google", "intitle:index.of +?last modified? +?parent directory? +(png) -htm -html -php -asp"},
		Dork{"google", "filetype:png"},
	},
	"image/gif": []Dork{
		Dork{"google", "intitle:index.of +?last modified? +?parent directory? +(gif) -htm -html -php -asp"},
		Dork{"google", "filetype:gif"},
	},
	"image/webp": []Dork{
		Dork{"google", "intitle:index.of +?last modified? +?parent directory? +(webp) -htm -html -php -asp"},
		Dork{"google", "filetype:webp"},
	},
	"image/vnd.adobe.photoshop": []Dork{
		Dork{"google", "intitle:index.of +?last modified? +?parent directory? +(psd) -htm -html -php -asp"},
		Dork{"google", "filetype:psd"},
	},
	"audio/x-flac": []Dork{
		Dork{"google", "filetype:flac"},
	},
	"application/vnd.openxmlformats-officedocument.wordprocessingml.document": []Dork{
		Dork{"google", "filetype:docx"},
	},
	"application/vnd.openxmlformats-officedocument.wordprocessingml.template": []Dork{
		Dork{"google", "filetype:dotx"},
	},
	"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": []Dork{
		Dork{"google", "filetype:xlsx"},
	},
	"application/vnd.openxmlformats-officedocument.presentationml.presentation": []Dork{
		Dork{"google", "filetype:pptx"},
	},
	"application/vnd.openxmlformats-officedocument.presentationml.template": []Dork{
		Dork{"google", "filetype:potx"},
	},
	"application/vnd.openxmlformats-officedocument.presentationml.slideshow": []Dork{
		Dork{"google", "filetype:ppsx"},
	},
	"application/octet-stream": []Dork{
		Dork{"google", "inurl:.DS_Store intitle:index.of"},
		Dork{"google", "intext:.DS_Store & intitle:index -github"},
	},
	"application/vnd.oasis.opendocument.text": []Dork{
		Dork{"google", "filetype:odt"},
	},
	"application/vnd.oasis.opendocument.spreadsheet": []Dork{
		Dork{"google", "filetype:ods"},
	},
	"application/vnd.oasis.opendocument.presentation": []Dork{
		Dork{"google", "filetype:odp"},
	},
	"application/x-shockwave-flash": []Dork{
		Dork{"google", "filetype:swf"},
	},
	"application/gpx": []Dork{
		Dork{"google", "intitle:index.of +?last modified? +?parent directory? +(gpx) -htm -html -php -asp"},
		Dork{"google", "filetype:gpx"},
	},
	"application/gpx+xml": []Dork{
		Dork{"google", "intitle:index.of +?last modified? +?parent directory? +(gpx) -htm -html -php -asp"},
		Dork{"google", "filetype:gpx"},
	},
	"application/postscript": []Dork{
		Dork{"google", "filetype:ps"},
	},
}

Functions

func LogMeIn added in v0.2.0

func LogMeIn()

LogMeIn logs the scrapped files

Types

type Dork

type Dork struct {
	Engine string `json:"engine"`
	String string `json:"string"`
}

Dork defines a dork for a particular engine TODO: Load dorks from a custom json file

func NewDork

func NewDork(engine, term string) Dork

NewDork returns a new dork

func (*Dork) GetEngine

func (d *Dork) GetEngine() string

GetEngine returns dork engine

func (*Dork) GetSrting

func (d *Dork) GetSrting() string

GetSrting returns query string for dorking

func (*Dork) UpdateDork

func (d *Dork) UpdateDork(engine, site, term string)

UpdateDork updates the dork values

func (*Dork) UpdateEngine

func (d *Dork) UpdateEngine(engine string)

UpdateEngine unpdates dork's engine

func (*Dork) UpdateString

func (d *Dork) UpdateString(site, term string)

UpdateString unpdates dork's search string

type Dorker

type Dorker struct {
	Dorks []Dork
	// contains filtered or unexported fields
}

Dorker defines a dorker structure. Used to store dorks.

func NewDorker

func NewDorker(userAgent string, timeout, depth int) *Dorker

NewDorker returns a new dorker

func (*Dorker) AddDork

func (d *Dorker) AddDork(dork Dork)

AddDork adds a dork in the dorker object

func (*Dorker) Google

func (d *Dorker) Google() (results []string)

Google dorks Google engine

type Scrapper added in v0.2.0

type Scrapper struct {
	// contains filtered or unexported fields
}

Scrapper is the main scrapping class

func NewScrapper added in v0.2.0

func NewScrapper(domain string, depth int) *Scrapper

NewScrapper initializes the scrapper

func (s *Scrapper) Links() []string

Links is a helper method to return all the recovered file URLs

func (*Scrapper) Run added in v0.2.0

func (s *Scrapper) Run() error

Run begins the scrapping task

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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