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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
//! # Azathoth-core
//!
//! `azathoth-core` provides low-level, platform-specific definitions and utilities used across the [Azathoth c2 framework](https://github.com/AzathothC2/)
//!
//! It serves a `no_std`-compatible layer, containing:
//! * Platform-specific structs, constants and type definitions for Windows and Linux
//! * A `crc32` lookup table for fast hashing
//! * The `AzError` trait error interface shared across the rest of the Azathoth Crates
//!
//! > **WARNING**
//! > This project is still in active development and may change at any time!
//!
//! ## Installation
//! * Manually, via `Cargo.toml`: `azathoth-core = "0.1.0"`
//! * Using the `cargo` cli: `cargo add azathoth-core`
//!
//!
//! ## Supported Platform Definitions
//! The following structs (and related types) are included:
//! * Windows:
//! * `Guid`
//! * Windows Internals:
//! * `TEB` (Thread Environment Block)
//! * `PEB` (Process Environment Block)
//! * `RTL_USER_PROCESS_PARAMETERS`
//! * `UNICODE_STRING`
//! * `LIST_ENTRY`
//! * `LDR_DATA_TABLE_ENTRY`
//! * `PEB_LDR_DATA`
//! * PE/COFF structures:
//! * `IMAGE_DOS_HEADER`
//! * `IMAGE_NT_HEADERS64`
//! * `IMAGE_FILE_HEADER`
//! * `IMAGE_OPTIONAL_HEADER64`
//! * `IMAGE_DATA_DIRECTORY`
//! * `IMAGE_EXPORT_DIRECTORY`
//! * `IMAGE_SECTION_HEADER`
//! * `IMAGE_BASE_RELOCATION`
//! * `IMAGE_IMPORT_DESCRIPTOR`
//! * `IMAGE_IMPORT_DESCRIPTOR_0` (union)
//! * `IMAGE_THUNK_DATA64`
//! * `IMAGE_THUNK_DATA64_0` (union)
//! * `IMAGE_IMPORT_BY_NAME`
//! * `IMAGE_TLS_DIRECTORY64`
//! * `URL_COMPONENTSA`
//! * `RUNTIME_FUNCTION`
//! * Linux:
//! * `Elf64Ehdr` (ELF64 File header)
//! * `Elf64Dyn` (ELF64 dynamic table entry)
//! * `Elf64Rela` (ELF64 Relocation entries)
//! * `Elf64Sym` (Symbol table entry)
//! * `Elf64Phdr` (ELF64 Program header)
//! * `Elf64Shdr` (ELF64 section header)
extern crate core;
extern crate alloc;
//// Defines global error trait
/// Os-specific types, structs, consts, and function definitions
/// Crc32 table re-export
pub use CRC32_TABLE;