aboutsummaryrefslogtreecommitdiff
path: root/02/src/cracking.h
blob: 0173dbbe702a9ad31f22c79f0555de8350f75f1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/// src/cracking.h --- password cracking utilities
//
// Copyright (c) 2026 Martin Michalec <martin@michalec.dev>
//
// SPDX-License-Identifier: MIT
//
/// Commentary:
//
/// Code:

#ifndef INCLUDED_CRACKING_H
#define INCLUDED_CRACKING_H

#include <stdio.h>
#include <unistd.h>

#include "string-builder.h"
#include "string-view.h"

struct shell {
  FILE *in;
  FILE *out;
  pid_t pid;
};

void password_bump (STRING_BUILDER);
bool test_credentials (struct shell,
                       struct string_view login,
                       struct string_view password);
struct shell spawn_shell (void);
void close_shell (struct shell);

#endif // INCLUDED_CRACKING_H

/// src/cracking.h ends here