This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use core::panic; | |
use core::ptr; | |
use goblin::pe::data_directories::DataDirectory; | |
use goblin::pe::section_table::{IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE}; | |
use goblin::pe::PE; | |
use winapi::ctypes::c_void; | |
use winapi::shared::minwindef::HINSTANCE; | |
use winapi::um::memoryapi::VirtualAlloc; | |
use winapi::um::winnt::{ | |
DLL_THREAD_ATTACH, MEM_COMMIT, MEM_RESERVE, PAGE_EXECUTE, PAGE_EXECUTE_READ, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub struct VSRegKey(registry::RegKey); | |
impl VSRegKey { | |
pub fn open() -> Result<Self, registry::key::Error> { | |
let regkey = registry::Hive::LocalMachine.open( | |
r"SOFTWARE\WOW6432Node\Microsoft\VisualStudio", | |
registry::Security::Read, | |
)?; | |
Ok(Self(regkey)) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt update | |
# install essential build tools, notably cc linker | |
sudo apt install build-essential -y | |
# install rust | |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh | |
# configure the current shell, suggested by the installation script | |
source "$HOME/.cargo/env" | |
# install dependencies | |
sudo apt install software-properties-common apt-transport-https wget -y | |
# Import the GPG key provided by Microsoft to verify the package integrity. |