Information Gathering

Pastego – Scrape/Parse Pastebin Using GO And Expression Grammar

Pastego - Scrape/Parse Pastebin Using GO And Expression Grammar (PEG)

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


$ go get -u

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 phpsudoLinux<body> words.

usage: pastego [<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')`

qctrl+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



go get -u ""


go get -u ""


go get -u ""

To create the code from PEG use pigeon:

go get -u

You need a PRO account to use this: pastebin will block/blacklist your IP.
pastebin PRO


  • increase the time between each request
  • create a script to restart your router when pastebin warns you

In progress…
Add flag to pass/read a list of proxies to avoid IP ban/throttle for free users


About the author

Mazen Elzanaty

Add Comment

Click here to post a comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: