forked from chokepoint/Beleth
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlists.h
More file actions
42 lines (33 loc) · 758 Bytes
/
lists.h
File metadata and controls
42 lines (33 loc) · 758 Bytes
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
36
37
38
39
40
41
42
/*
* Beleth - SSH Dictionary Attack
* lists.h -- Linked list header
*/
#ifndef LISTS_H
#define LISTS_H
/* Globals */
#define MAX_PW_LENGTH 51
/* thread context structure */
struct t_ctx
{
int sock; /* SSH connection socket */
int fd; /* Unix IPC Socket */
int port;
char host[21];
LIBSSH2_SESSION *session;
};
struct t_ctx *t_current;
/* Linked list structure to hold the word list */
struct pw_list
{
char pw[MAX_PW_LENGTH];
struct pw_list *next;
};
struct pw_list *pw_head;
struct pw_list *pw_tail;
/* Thread context initialization */
int init_thread_ctx(char *host, int port, struct t_ctx *ptr);
/* Password linked list functions */
int init_pw_list(char *pw);
int add_pw_list(char *pw);
void destroy_pw_list(void);
#endif