aboutsummaryrefslogtreecommitdiff
path: root/02/src/cracking.h
diff options
context:
space:
mode:
Diffstat (limited to '02/src/cracking.h')
-rw-r--r--02/src/cracking.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/02/src/cracking.h b/02/src/cracking.h
new file mode 100644
index 0000000..0173dbb
--- /dev/null
+++ b/02/src/cracking.h
@@ -0,0 +1,35 @@
1/// src/cracking.h --- password cracking utilities
2//
3// Copyright (c) 2026 Martin Michalec <martin@michalec.dev>
4//
5// SPDX-License-Identifier: MIT
6//
7/// Commentary:
8//
9/// Code:
10
11#ifndef INCLUDED_CRACKING_H
12#define INCLUDED_CRACKING_H
13
14#include <stdio.h>
15#include <unistd.h>
16
17#include "string-builder.h"
18#include "string-view.h"
19
20struct shell {
21 FILE *in;
22 FILE *out;
23 pid_t pid;
24};
25
26void password_bump (STRING_BUILDER);
27bool test_credentials (struct shell,
28 struct string_view login,
29 struct string_view password);
30struct shell spawn_shell (void);
31void close_shell (struct shell);
32
33#endif // INCLUDED_CRACKING_H
34
35/// src/cracking.h ends here