Skip to content
A simple pastebin monitor using the scraping API
Python Dockerfile
Branch: master
Clone or download
mikewilks Update
Spurious bracket removed
Latest commit c7b2a41 Jan 8, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
Dockerfile Added some debug and a Dockerfile Dec 3, 2018 Update Jan 8, 2019
keywords.txt Added more keywords Oct 21, 2018 Added directories per keyword - closing issue 5 Dec 14, 2018


A simple pastebin monitor using the scraping API (and now updated for the new scraping URL)

Simple Pastebin Monitor is a simple Python script that replicates and and extends Pastebin alerts. It makes use of the Pastebin Scraping API as described here. You'll need a Pastebin PRO account to get access to the Scraping API.

The script takes three parameters, you need to specify all or none:

  1. The name and location of the file containing the keywords to check (default is ./keywords.txt)
  2. The directory to save the pastes into (default is .)
  3. Whether to check for the pastebin message that your IP is not authorized or not (default is false)

The script will check Pastebin for pastes every minute and compare their text against the supplied keywords. When there is a match the text of the paste is saved to the output directory (in a directory with the name of the matched keyword). This is an improvement over the built in Pastebin alerts which only saves a link which means you miss removed pastes if you don't click the link before they are taken down.

Running the script can be done in a screen / tmux or by using the built docker image. The machine where you run needs to be have its IP whitelisted in your Pastebin account. Pre-requisites are really just Python 3, Requests, a Pastebin PRO account and an internet connection.

There are various To Dos are described in issues on GitHub but these are probably a way off.

I wrote about about this code on my blog

A Containerized version can be found on Docker Hub

Docker instructions

The container needs two vols mounting for output and input (containing a keywords.txt of things to search for). There is a sample of the keywords.txt on GitHub but it is a simple CR separated list.

A simple docker run command looks like:

docker run -d --name simple-pastebin-monitor -v /path/to/dir-containing-keywords.txt:/input -v /path/to/store-pastes:/output mikewilks/simple-pastebin-monitor

This is an automated build from a GitHub repo

You can’t perform that action at this time.