Skip to content

Commit

Permalink
Merge pull request #103 from dmdhrumilmistry/dev
Browse files Browse the repository at this point in the history
RELEASE: v2.4.0
  • Loading branch information
dmdhrumilmistry authored Aug 3, 2024
2 parents ba2147e + acf0107 commit 4121176
Show file tree
Hide file tree
Showing 12 changed files with 1,439 additions and 950 deletions.
59 changes: 40 additions & 19 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,48 @@ on:
types: [published]

permissions:
contents: read
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
# steps:
# - name: Repo Checkout
# uses: actions/checkout@v4

# - name: Set up Python
# uses: actions/setup-python@v5
# with:
# python-version: "3.12.x"

# - name: Install and configure Poetry
# uses: snok/[email protected]
# with:
# # version: 1.5.1
# # virtualenvs-create: true
# virtualenvs-in-project: true
# # virtualenvs-path: ~/poetry-venv
# # installer-parallel: true

# - name: Load cached venv
# id: cached-poetry-dependencies
# uses: actions/cache@v3
# with:
# path: .venv
# key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}

# - name: Install dependencies
# if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
# run: |
# python -m pip install --upgrade pip
# poetry install --sync --no-interaction

# - name: Build package
# run: poetry build

# - name: Publish package
# uses: pypa/[email protected]
# with:
# packages-dir: ./dist
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
__pycache__/
*.py[cod]
*$py.class
**/.DS_Store

# C extensions
*.so
Expand Down
143 changes: 78 additions & 65 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

![PyHTools Logo](https://i.ibb.co/CtwVV5T/Py-HTools-without-bg-cropped.png)

- Python Hacking Tools (PyHTools) (pht) is a collection of python written hacking tools consisting of network scanner, arp spoofer and detector, dns spoofer, code injector, packet sniffer, network jammer, email sender, downloader, wireless password harvester credential harvester, keylogger, download&execute, and reverse_backdoor along with website login bruteforce, scraper, web spider etc. PHT also includes malwares which are undetectable by the antiviruses.
* Python Hacking Tools (PyHTools) (pht) is a collection of python written hacking tools consisting of network scanner, arp spoofer and detector, dns spoofer, code injector, packet sniffer, network jammer, email sender, downloader, wireless password harvester credential harvester, keylogger, download&execute, and reverse_backdoor along with website login bruteforce, scraper, web spider etc. PHT also includes malwares which are undetectable by the antiviruses.

- These tools are written in python3, refer installation to install/download tools and its dependencies.
* These tools are written in python3, refer installation to install/download tools and its dependencies.

- PyHTools comes with UI, but you can also use command line to use tools individually.
* PyHTools comes with UI, but you can also use command line to use tools individually.

**`NOTE` : The UI hasn't been updated yet with new tools, Refer examples for more information**

Expand Down Expand Up @@ -44,79 +44,92 @@ Never use provided resources for malicious purpose.

## How To Videos

- Gain access to remote shell over the Internet using HTTP Backdoor
* Gain access to remote shell over the Internet using HTTP Backdoor

[![YT Thumbnail](https://img.youtube.com/vi/Wg-PiywAqyw/maxresdefault.jpg)](https://youtu.be/Wg-PiywAqyw)

## Installation

### Using pip
### Virtual Env Setup

It is advised to use virtual environment for any installation.

- Install main branch using pip
* Create virtual environment

```bash
python3 -m pip install git+https://github.com/dmdhrumilmistry/pyhtools.git
python -m venv .venv
```

- Install Release from PyPi
* Activate venv

```bash
# without options
python3 -m pip install pyhtools
source .venv/bin/activate
```

### Using pip

* Install main branch using pip

```bash
# platform independent (but it doesn't support few features)
python -m pip install git+https://github.com/dmdhrumilmistry/pyhtools.git@main#egg=pyhtools
## OS Specific Installations
# for windows
python3 -m pip install pyhtools[windows]
python -m pip install git+https://github.com/dmdhrumilmistry/pyhtools.git@main#egg=pyhtools[windows]
# for linux
python3 -m pip install pyhtools[linux]
python -m pip install git+https://github.com/dmdhrumilmistry/pyhtools.git@main#egg=pyhtools[linux]
```

### Manual Method

- Open terminal
* Open terminal

- Install git package
* Install [git](https://git-scm.com/) and [python3](https://python.org) (>=3.10) package

* Install [Poetry](https://python-poetry.org/docs/#installation)

```bash
sudo apt install git python3 -y
curl -sSL https://install.python-poetry.org | python3 -
```

- Install [Poetry](https://python-poetry.org/docs/master#installing-with-the-official-installer)

- clone the repository to your machine
* clone the repository to your machine

```bash
git clone https://github.com/dmdhrumilmistry/pyhtools.git
```

- Change directory
* Change directory

```bash
cd pyhtools
```

- install with poetry
* Install with poetry

```bash
# without options
poetry install
poetry install --sync
# for windows
poetry install -E windows
poetry install --sync -E windows
# for linux
poetry install -E linux
poetry install --sync -E linux
```

> Run above commands in virtual env

## Start PyHTools

- run pyhtools.py
* run pyhtools.py

```bash
python3 -m pyhtools
python -m pyhtools
```

- to get all the commands use `help`
* to get all the commands use `help`

```bash
pyhtools >> help
Expand All @@ -127,68 +140,68 @@ Never use provided resources for malicious purpose.
### Open In Google Cloud Shell
- Temporary Session
* Temporary Session
[![Open in Cloud Shell](https://gstatic.com/cloudssh/images/open-btn.svg)](https://shell.cloud.google.com/cloudshell/editor?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fdmdhrumilmistry%2Fpyhtools&ephemeral=true&show=terminal&cloudshell_print=./DISCLAIMER.md)
- Perisitent Session
* Perisitent Session
[![Open in Cloud Shell](https://gstatic.com/cloudssh/images/open-btn.svg)](https://shell.cloud.google.com/cloudshell/editor?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fdmdhrumilmistry%2Fpyhtools&ephemeral=false&show=terminal&cloudshell_print=./DISCLAIMER.md)
## Package Tools and Features
### Attackers
- `For Networks`
* `For Networks`
- Network Scanner
- Mac changer
- ARP Spoofing
- DNS spoofing
- Downloads Replacer
- Network Jammer
- Pkt Sniffer
- Code Injector
* Network Scanner
* Mac changer
* ARP Spoofing
* DNS spoofing
* Downloads Replacer
* Network Jammer
* Pkt Sniffer
* Code Injector
- `For Websites`
* `For Websites`
- Login Guesser (Login Bruteforcer)
- Web Spider
- Web crawler (detects dirs | subdomains)
- Web Vulnerablity Scanner
* Login Guesser (Login Bruteforcer)
* Web Spider
* Web crawler (detects dirs | subdomains)
* Web Vulnerablity Scanner
- `For Android`
- mitm
- Custom Certificate Pinner
* `For Android`
* mitm
* Custom Certificate Pinner
### Detectors
- ARP Spoof Detector
* ARP Spoof Detector
### Malwares/Trojans/Payloads/Ransomwares/Worms
- Email Sender (reporter)
- Downloader
- Wireless Password Harvester
- Credential Harvester
- Keylogger (dlogs)
- Reverse Backdoors
- TCP
- HTTP
- Download and Execute
- Telegram Data Harvester
- DMSecRansomware
- Telegram Remote Code Executor
- DirCloner
* Email Sender (reporter)
* Downloader
* Wireless Password Harvester
* Credential Harvester
* Keylogger (dlogs)
* Reverse Backdoors
* TCP
* HTTP
* Download and Execute
* Telegram Data Harvester
* DMSecRansomware
* Telegram Remote Code Executor
* DirCloner
> **NOTE:** Do not upload/send/report malwares to anti virus services such as `VirusTotal`. This will make program detectable
## Project Updates
- [View](https://github.com/users/dmdhrumilmistry/projects/2/views/1)
* [View](https://github.com/users/dmdhrumilmistry/projects/2/views/1)
## How to Package a Evil Files
- [Example Script](./examples/EvilFiles)
- [View How to create a Trojan](./HowTo/Malwares/CreateTrojanPackage.md)
- [Generator Script](./examples/EvilFiles/generatorScript.py)
* [Example Script](./examples/EvilFiles)
* [View How to create a Trojan](./HowTo/Malwares/CreateTrojanPackage.md)
* [Generator Script](./examples/EvilFiles/generatorScript.py)
`Note`: On linux host machines, user needs to install `patchelf` package. Install using below command.
Expand All @@ -200,8 +213,8 @@ apt/dnf/yum install patchelf
## Have any Ideas 💡 or issue
- Create an issue
- Fork the repo, update script and create a Pull Request
* Create an issue
* Fork the repo, update script and create a Pull Request
## Contributing
Expand Down
12 changes: 12 additions & 0 deletions examples/Network/hash_cracker.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from argparse import ArgumentParser
from pyhtools.attackers.Network.pass_cracker import HashCracker

parser = ArgumentParser(prog='pass_cracker')
parser.add_argument('-m', '--mode', default='MD5', help='hash type to decrypt.')
parser.add_argument('-p', '--path', help='path to passwords file.')
parser.add_argument('-h', '--hash', help='hash value to decrypt.')

args = parser.parse_args()

pass_crack = HashCracker(args.m, args.p, args.h)

11 changes: 11 additions & 0 deletions examples/Web/email_scrpr.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from argparse import ArgumentParser
from pyhtools.attackers.web.email_scraper import EmailScraper
from pyhtools.UI.colors import BRIGHT_RED

parser = ArgumentParser(prog='email_scraper')
parser.add_argument('-u', '--url', help='url to base email search on.')
parser.add_argument('-c', '--count', default=100, help='number of emails to scrape.', type=int)

args = parser.parse.args()

email_scrpr = EmailScraper(args.u, args.c)
Loading

0 comments on commit 4121176

Please sign in to comment.