Categories: Kali Linux

Pastego – Scrape/Parse Pastebin Using GO & Expression Grammar

Pastego Scrape/Parse Pastebin using GO and grammar expression (PEG).

Pastego Installation

$ go get -u github.com/edoz90/pastego

Also ReadHackertarget: Tools And Network Intelligence To Help Organizations With Attack Surface Discovery

Usage

Search keywords are case sensitive

pastego -s "password,keygen,PASSWORD"

You can use boolean operators to reduce false positive

pastego -s "quake && ~earthquake, password && ~(php || sudo || Linux || '<body>')"

This command will search for bins with quake but not earthquake words and for bins with password but not php, sudo, Linux, <body> words.

usage: pastego [<flags>]

Flags:
      --help              Show context-sensitive help (also try --help-long and --help-man).
  -s, --search="pass"     Strings to search, i.e: "password,ssh"
  -o, --output="results"  Folder to save the bins
  -i, --insensitive       Search for case-insensitive strings

Supported expression/operators:

`&&` - and

`||` - or

`~` - not

`'string with space'`

`(myexpression && 'with operators')`

Keybindings

q, ctrl+c: quit pastego

k, : show previous bin

j, : show next bin

n: jump forward by 15 bins

p: jump backward by 15 bins

N: move to the next block of findings (in alphabet order)

P: move to the previous block of findings (in alphabet order)

d: delete file from file system

HOME: go to top

Requirements

goquery

go get -u "github.com/PuerkitoBio/goquery"

kingpin

go get -u "gopkg.in/alecthomas/kingpin.v2"

gocui

go get -u "github.com/jroimartin/gocui"

To create the code from PEG use pigeon:

go get -u github.com/mna/pigeon

You can follow us on LinkedinTwitterFacebook for daily Cybersecurity updates also you can take the Best Cybersecurity courses online to keep your self-updated.

R K

Recent Posts

Set Up Nginx Server Blocks on Ubuntu 18.04: Host Multiple Sites

Nginx server blocks let you run more than one website on a single server. Each block…

9 hours ago

Install Tor Browser on Ubuntu 18.04: Anonymous Browsing Guide

Tor Browser is a modified version of Firefox that routes all your web traffic through the Tor…

9 hours ago

Install Vagrant on Ubuntu 18.04: Complete Setup Guide for Developers

Vagrant is a command-line tool that makes it easy to build and manage virtual machine environments.…

10 hours ago

Install VMware Tools on Ubuntu 18.04: Open VM Tools and ISO Guide

VMware Tools is a set of drivers and services that improves the performance of an Ubuntu…

10 hours ago

Install Apache Maven on Ubuntu 18.04: Stable or Latest Version

Java developers use project management tools to automate building their applications. Apache Maven is an open source…

10 hours ago

Install Mono on Ubuntu 18.04: C# Compiler and Runtime Guide

Running programs built for Microsoft's framework on a Linux system is easier than you think. Mono is…

1 day ago