🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

piehydra

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

piehydra

wrapper for hydra-thc (bruteforcing tool)

0.0.1
PyPI
Maintainers
1

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

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts