Skip to main content

wrapper for hydra-thc (bruteforcing tool)

Project description

A python wrapper for hydra (bruteforce tool)

Description

Scripts = easy profit. Scripts + hydra = more profit.

Repository also includes a simple server to test the script on.

Usage

from piehydra import HydraCommandBuilder, bruteforce, parse, LineType

command_builder = HydraCommandBuilder()
command_builder.set_target("localhost")
command_builder.set_method("ssh")
command_builder.set_passwords("wordlist.txt")
command_builder.set_usernames("test", list=False)
command_builder.exit_on_found()

def line_handler(line: str):
    parsed_line = parse(line)
    if parsed_line.type == LineType.FOUND:
        print("Found: " + parsed_line.username + ":" + parsed_line.password)
    elif parsed_line.type == LineType.ATTEMPT:
        print("Attempt: " + parsed_line.username + ":" + parsed_line.password)

# main method
bruteforce(command_builder, line_handler)

Output:

...
Attempt: test:s1aut11111
Attempt: test:111111!@
Found: test:test

Install

Note you must have hydra installed for this to work.

sudo apt install hydra

Note that hydra itself is licensed under AGPL which can be found here

pip install piehydra

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

piehydra-0.0.1.tar.gz (2.0 kB view hashes)

Uploaded Source

Built Distribution

piehydra-0.0.1-py3-none-any.whl (2.2 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