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 details)

Uploaded Source

Built Distribution

piehydra-0.0.1-py3-none-any.whl (2.2 kB view details)

Uploaded Python 3

File details

Details for the file piehydra-0.0.1.tar.gz.

File metadata

  • Download URL: piehydra-0.0.1.tar.gz
  • Upload date:
  • Size: 2.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for piehydra-0.0.1.tar.gz
Algorithm Hash digest
SHA256 e9ffb05caf25aa504f448a4e31e620dcd478a4d449a3d43f7da959241178bfb9
MD5 e6ebc13ece182bacd4bbf0f8e8f34534
BLAKE2b-256 27d35e20c65dc14e8f961ccaff3d5a9d166602687bd444f0f5bdb1ded5ecf529

See more details on using hashes here.

File details

Details for the file piehydra-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: piehydra-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for piehydra-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c8607c9bba44ecc540ed69a25f4d100ed5d8afd922604fd3ef8dce226fa32a48
MD5 f404760f9e81ec0889657d28ad0c8174
BLAKE2b-256 39ae4df250d2b7579ee6c6e25eebbde944869f45131eb0cfa2cf4d1a58b2e270

See more details on using hashes here.

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