All Projects → mikewilks → simple-pastebin-monitor

mikewilks / simple-pastebin-monitor

Licence: other
A simple pastebin monitor using the scraping API

Programming Languages

python
139335 projects - #7 most used programming language
Dockerfile
14818 projects

Projects that are alternatives of or similar to simple-pastebin-monitor

awesome-pastebin
List of pastebin sites.
Stars: ✭ 58 (+70.59%)
Mutual labels:  pastebin, pastebin-monitor
Jawbreaker
A Python obfuscator using HTTP Requests and Hastebin.
Stars: ✭ 50 (+47.06%)
Mutual labels:  pastebin
Dogbin
The sexiest pastebin and url shortener ever
Stars: ✭ 237 (+597.06%)
Mutual labels:  pastebin
Phorkie
Self-hosted pastebin software written in PHP. Pastes are editable, forkable, may have multiple files and are stored in git repositories.
Stars: ✭ 203 (+497.06%)
Mutual labels:  pastebin
EMAGNET
Automated hacking tool that will find leaked databases with 97.1% accurate to grab mail + password together from recent uploads from https://pastebin.com. Bruteforce support for spotify accounts, instagram accounts, ssh servers, microsoft rdp clients and gmail accounts
Stars: ✭ 1,427 (+4097.06%)
Mutual labels:  pastebin
dpaste
The Django project driving dpaste.org
Stars: ✭ 424 (+1147.06%)
Mutual labels:  pastebin
pastelyst
A Web Paste Tool built with Cutelyst and KDE Frameworks
Stars: ✭ 19 (-44.12%)
Mutual labels:  pastebin
piu.clj
Simple pastebin
Stars: ✭ 14 (-58.82%)
Mutual labels:  pastebin
binnit
minimal no-fuss pastebin service clone in golang
Stars: ✭ 27 (-20.59%)
Mutual labels:  pastebin
PasteBinApp
iOS app for PasteBin
Stars: ✭ 27 (-20.59%)
Mutual labels:  pastebin
Pastebin
Modern pastebin written in golang
Stars: ✭ 111 (+226.47%)
Mutual labels:  pastebin
uranus
[W.I.P] An ecosystem of crawlers for detecting: leaks, sensitive data exposure and attempts exfiltration of data
Stars: ✭ 22 (-35.29%)
Mutual labels:  pastebin
bin
highly opinionated, minimal pastebin
Stars: ✭ 97 (+185.29%)
Mutual labels:  pastebin
rentry
Markdown pastebin from command line
Stars: ✭ 252 (+641.18%)
Mutual labels:  pastebin
local-paste
Lightweight pastebin for home network which may or may not be connected to the internet.
Stars: ✭ 24 (-29.41%)
Mutual labels:  pastebin
Paste
Paste is a project that started from the files pastebin.com used before it was bought.
Stars: ✭ 204 (+500%)
Mutual labels:  pastebin
CryptDown
client-side AES-encrypted Markdown pastebin clone
Stars: ✭ 47 (+38.24%)
Mutual labels:  pastebin
omnibin
Android client for different bins like dogbin. Previous dogbin mobile.
Stars: ✭ 19 (-44.12%)
Mutual labels:  pastebin
pastebin-api
A very simple pastebin npm package to interact with the pastebin api!
Stars: ✭ 20 (-41.18%)
Mutual labels:  pastebin
shelf.gg
A pastebin to find and share useful resources 📚
Stars: ✭ 29 (-14.71%)
Mutual labels:  pastebin

simple-pastebin-monitor

A simple pastebin monitor using the scraping API.

Simple Pastebin Monitor

Simple pastebin monitor is a simple Python script that replicates and extends Pastebin alerts function. 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.

Simple pastebin monitor saves the pastes it matches to disk and optionally notifies via a Slack channel.

The script takes two parameters, you need to specify both or neither:

  1. The input directory where the keywords.txt file is located (and the optional slack.json)
  2. The directory to save the pastes into (default is .)

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) and optionally notified via Slack. This is an improvement over the built-in Pastebin alerts which only saves a link meaning 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 conatiner image. The machine where you run needs to be have its IP whitelisted in your Pastebin account. Pre-requisites are Python 3, Requests, slackclient, a Pastebin PRO account and an internet connection.

The notification to a Slack channel is optional and is enabled by the presence of a file called slack.json in the input directory. There is a sample of this file in the repo, it has two parameters containing the Slack token and the channel name to notify in. The Slack token can be obtained by following the 'Add a Bot User' instructions here. The token we need in our config file is the one found in the "Install App" part of the config page in the section "OAuth Tokens for Your Team".

There are various To Dos described in issues on GitHub.

I wrote about about this code on my blog

A Containerised version can be found on Docker Hub or you can pull it from the GitHub Container Registry or quay.io e.g.

docker/podman pull ghcr.io/mikewilks/simple-pastebin-monitor:latest 

or

docker/podman pull quay.io/mikewilks/simple-pastebin-monitor

Container instructions

There is an automated build pushed to Docker Hub from GitHub repo.

There is also a GitHub Action creating a container image on the GitHub Container Registry - ghcr.io/mikewilks/simple-pastebin-monitor:latest

A further image is available on quay.io - quay.io/mikewilks/simple-pastebin-monitor

SPBM Container Deployment

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

A simple run command using podman looks like:

podman run -d --name simple-pastebin-monitor -v /path/to/input-dir-containing-keywords.txt-and-optional-slack.json:/input -v /path/to/store-pastes:/output mikewilks/simple-pastebin-monitor

or with docker

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

or you can be explicit about the registry (in the example below GitHub Container Registry)

podman run -d --name simple-pastebin-monitor -v /path/to/input-dir-containing-keywords.txt-and-optional-slack.json:/input -v /path/to/store-pastes:/output ghcr.io/mikewilks/simple-pastebin-monitor

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].