Skip to main content

Python framework to scrape PasteBin pastes and analyze them

Project description

pastepwn - Paste-Scraping Python Framework

Pastebin is a very helpful tool to store or rather share ascii encoded data online. In the world of OSINT, pastebin is being used by researchers all around the world to retreive e.g. leaked account data, in order to find indicators about security breaches.

Pastepwn is a framework to scrape pastes and scan them for certain indicators. There are several analyzers and actions to be used out-of-the-box, but it is also easily extensible - you can create your own analyzers and actions on the fly.

Please note: This framework is not to be used for illegal actions. It can be used for querying public Pastebin pastes for e.g. your username or email address in order to increase your own security.

Setup pastepwn

To use the pastepwn framework you need to follow these simple steps:

  1. Make sure to have a Pastebin premium account!
  2. Clone the repository with git clone https://github.com/d-Rickyy-b/pastepwn.git
  3. Install dependencies with pip install -r requirements.txt¹
  4. Create a file (e.g. main.py) in the project root, where you put your code in²
  5. Fill that file with content - add analyzers and actions. Check the example implementation.

¹ (There will be a pypi module for installation with pip soon)

² (If you want to store all pastes, make sure to setup a mongodb instance)

Behind a proxy

There is 2 ways to use this tool behind a proxy:

  • Define the following environment variables: HTTP_PROXY, HTTPS_PROXY, NO_PROXY.
  • When initializing the PastePwn object, use the proxies argument. proxies is a dict as defined in requests' documentation.

ToDos

There are quite some features which will be implemented in the (near) future. Check the bug tracker on GitHub to get an up-to-date status about features and ToDos.

  • REST API for querying paste data
  • Adding more analyzers and actions, based on community input
  • Adding support for other paste sites
  • Add a helpful wiki with instructions and examples

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pastepwn-1.0.8.tar.gz (15.8 kB view hashes)

Uploaded Source

Built Distribution

pastepwn-1.0.8-py3-none-any.whl (30.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page