• Stars
    star
    6,354
  • Rank 6,005 (Top 0.2 %)
  • Language
    Python
  • License
    MIT License
  • Created about 3 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

🐸 Identify anything. pyWhat easily lets you identify emails, IP addresses, and more. Feed it a .pcap file or some text and it'll tell you what it is! 🧙‍♀️

➡️ Discord ⬅️
The easiest way to identify anything
pip3 install pywhat && pywhat --help

Discord PyPI - Downloads Twitter Follow PyPI - Python Version PyPI


🤔 What is this?

Imagine this: You come across some mysterious text 🧙‍♂️ 0x52908400098527886E0F7030069857D2E4169EE7 or dQw4w9WgXcQ and you wonder what it is. What do you do?

Well, with what all you have to do is ask what "0x52908400098527886E0F7030069857D2E4169EE7" and what will tell you!

what's job is to identify what something is. Whether it be a file or text! Or even the hex of a file! What about text within files? We have that too! what is recursive, it will identify everything in text and more!

Installation

🔨 Using pip

$ pip3 install pywhat

or

# installs optional dependencies that may improve the speed
$ pip3 install pywhat[optimize] 

🔨 On Mac?

$ brew install pywhat

Or for our MacPorts fans:

$ sudo port install pywhat

Use Cases

🦠 Wannacry

You come across a new piece of malware called WantToCry. You think back to Wannacry and remember it was stopped because a researcher found a kill-switch in the code.

When a domain, hardcoded into Wannacry, was registered the virus would stop.

You use What to identify all the domains in the malware, and use a domain registrar API to register all the domains.

🦈 Faster Analysis of Pcap files

Say you have a .pcap file from a network attack. What can identify this and quickly find you:

  • All URLs
  • Emails
  • Phone numbers
  • Credit card numbers
  • Cryptocurrency addresses
  • Social Security Numbers
  • and much more.

With what, you can identify the important things in the pcap in seconds, not minutes.

🐞 Bug Bounties

You can use PyWhat to scan for things that'll make you money via bug bounties like:

  • API Keys
  • Webhooks
  • Credentials
  • and more

Run PyWhat with:

pywhat --include "Bug Bounty" TEXT

To do this.

Here are some examples 👇

🐙 GitHub Repository API Key Leaks

  1. Download all GitHub repositories of an organisation
  2. Search for anything that you can submit as a bounty, like API keys
# Download all repositories
GHUSER=CHANGEME; curl "https://api.github.com/users/$GHUSER/repos?per_page=1000" | grep -o 'git@[^"]*' | xargs -L1 git clone

# Will print when it finds things.
# Loops over all files in current directory.
find . -type f -execdir pywhat --include 'Bug Bounty' {} \;

🕷 Scan all web pages for bounties

# Recursively download all web pages of a site
wget -r -np -k https://skerritt.blog

# Will print when it finds things.
# Loops over all files in current directory.
find . -type f -execdir pywhat --include 'Bug Bounty' {} \;

PS: We support more filters than just bug bounties! Run pywhat --tags

🌌 Other Features

Anytime you have a file and you want to find structured data in it that's useful, What is for you.

Or if you come across some piece of text and you don't know what it is, What will tell you.

📁 File & Directory Handling

File Opening You can pass in a file path by what 'this/is/a/file/path'. What is smart enough to figure out it's a file!

What about a whole directory? What can handle that too! It will recursively search for files and output everything you need!

🔍 Filtering your output

Sometimes, you only care about seeing things which are related to AWS. Or bug bounties, or cryptocurrencies!

You can filter output by using what --rarity 0.2:0.8 --include Identifiers,URL https://skerritt.blog. Use what --help to get more information.

To see all filters, run pywhat --tags! You can also combine them, for example to see all cryptocurrency wallets minus Ripple you can do:

pywhat --include "Cryptocurrency Wallet" --exclude "Ripple Wallet" 1KFHE7w8BhaENAswwryaoccDb6qcT6DbYY

👽 Sorting, Exporting, and more!

Sorting You can sort the output by using what -k rarity --reverse TEXT. Use what --help to get more information.

Exporting You can export to json using what --json and results can be sent directly to a file using what --json > file.json.

Boundaryless mode What has a special mode to match identifiable information within strings. By default, it is enabled in CLI but disabled in API. Use what --help or refer to API Documentation for more information.

🍕 API

PyWhat has an API! Click here https://github.com/bee-san/pyWhat/wiki/API to read about it.

👾 Contributing

what not only thrives on contributors, but can't exist without them! If you want to add a new regex to check for things, you can read our documentation here

We ask contributors to join the Discord for quicker discussions, but it's not needed: Discord

🙏 Thanks

We would like to thank Dora for their work on a bug bounty specific regex database which we have used.

More Repositories

1

Ares

Automated decoding of encrypted text without knowing the key or ciphers used
Rust
468
star
2

AlgorithmsBook

📚 My algorithmic design paradigms book! 📚
TeX
242
star
3

How-I-Hacked-Your-Pi-Hole

Created for my TryHackMe room
Python
138
star
4

Employabiltiy-book

The repo for my book, How to get any job you want
HTML
61
star
5

tldr-News

🏖️ Generates a TL;DR of news using Natural Language Processing 🏖️
JavaScript
36
star
6

Python-Zero-to-Hero

For my book on Python https://beesec.gitbook.io/python-zero-to-hero/
25
star
7

Algorithms

Learn DS&A through leetcode problems
15
star
8

bee-san

6
star
9

awesome-accessible-hacking

Accessible hacking made awesome
6
star
10

DeepValueAnalysisBot

Discord bot for analysis of stocks
Python
5
star
11

awesome-a11y-pentesting

Awesome Accessible Pentesting Tools
5
star
12

skerritt.blog

JavaScript
4
star
13

youtube-videos

Code for my YouTube Videos
Python
4
star
14

diss

Python
4
star
15

Books

React app to show all the books I've read / want to read
JavaScript
4
star
16

Awesome-RSS-Feeds

An Awesome List of RSS Feeds
3
star
17

Dissertation

3
star
18

Everything

A program to do all the annoying little things
Python
3
star
19

newsLetterChecker

The code I use to check my newsletters
Python
3
star
20

LineBytes

.lines() for non-UTF8 files by reading bytes and breaking on 0x0A (linefeed)
Rust
2
star
21

ethereum_osint_tools

2
star
22

DiscordBot

Python
2
star
23

Kurcoder

A tool kit to assist with encoding, decoding, checksums, hex conversions, and IP calculation information.
Python
2
star
24

Subreddit_Lottery

Uses the blockchain to verifiably pick random winners in subreddit giveaways
Solidity
2
star
25

Coding-Interview-Questions

My solutions for Hackerrank / Leetcode
Python
2
star
26

Musk_bot

Markov chain implementation
Python
2
star
27

Peer2PeerBook

The repo for my book on peer 2 peer networking! :)
2
star
28

Polymath

HTML
2
star
29

HackNotts

Python
2
star
30

discord-bot

Discord bot for Ares & Lemmeknow in the http://discord.skerritt.blog discord server
Rust
1
star
31

Shell-Scripts

Shell scripts I use
Shell
1
star
32

Alice

All in one tool for editing blog posts
Python
1
star
33

gatsby-starter-ghost2

1
star
34

twitter_bot

Twitter bot
1
star
35

CS101

All blog posts from my CS101 series
1
star
36

karis

Kurome's Auto Ricing Installation Script for Kali 2020.3+ and will install my everyday tools, and dotfiles.
Shell
1
star
37

SRE-Resources

Highest return on value resources to up your SRE game
1
star
38

getting_started_with_SQL

SQL starting out
Python
1
star
39

TryRecipeMe

JavaScript
1
star
40

gatsby-starter-ghost

1
star
41

Blog-Conclusion-Summariser

Summaries a blog, TL;DR style.
JavaScript
1
star
42

skerrittblog

1
star
43

Algorithmic_Design_Paradigm_pdf

Repo for my book on Algorithmic Design Paradigms
1
star
44

Python-scripts

Short scripts I've made in my spare time
Python
1
star
45

WUDS

Wi-Fi User Detection System
Python
1
star
46

ansible_scripts

This is for my personal K3s cluster
Dockerfile
1
star
47

portfolio

JavaScript
1
star
48

pipi

A discord personal assistant
Python
1
star
49

Scripts

Python
1
star
50

hideme

hides me in my cave
Python
1
star
51

PyCat

Python3 implementation of CAT
Python
1
star
52

Recipes

A GitHub repo of my recipes
JavaScript
1
star
53

bank

Used for my banking
Python
1
star
54

3rd-year-university-notes

For my class
1
star