pub const QUICK_START: &str = include_str!("quick_start.md");
pub const SECURITY: &str = include_str!("security.md");
pub const TUI: &str = include_str!("tui.md");
pub const GDB: &str = include_str!("gdb.md");
pub const SSH: &str = include_str!("ssh.md");
pub const SUDO: &str = include_str!("sudo.md");
pub const REVERSE_SHELL: &str = include_str!("reverse_shell.md");
pub struct Guide {
pub uri: &'static str,
pub name: &'static str,
pub content: &'static str,
}
pub const ALL: &[Guide] = &[
Guide {
uri: "guide://shell/security",
name: "⚠️ Security Guidelines (Must read first)",
content: SECURITY,
},
Guide {
uri: "guide://shell/tui",
name: "Driving Full-Screen TUI Programs (vim/htop/less/whiptail) in pty mode",
content: TUI,
},
Guide {
uri: "guide://shell/gdb",
name: "GDB / pwndbg Debugging Scenario Guide",
content: GDB,
},
Guide {
uri: "guide://shell/ssh",
name: "SSH Remote Connection Scenario Guide",
content: SSH,
},
Guide {
uri: "guide://shell/sudo",
name: "sudo Password / Confirmation Scenario Guide",
content: SUDO,
},
Guide {
uri: "guide://shell/reverse_shell",
name: "CTF Reverse Shell Scenario Guide",
content: REVERSE_SHELL,
},
];
pub fn find(uri: &str) -> Option<&'static str> {
ALL.iter().find(|g| g.uri == uri).map(|g| g.content)
}