pub struct Process { /* private fields */ }
Implementations§
source§impl Process
impl Process
pub fn scan_abs( &self, error_name: &str, pattern: &str, scan_offset: usize, pointer_offsets: Vec<usize> ) -> Result<Pointer, String>
sourcepub fn scan_rel(
&self,
error_name: &str,
pattern: &str,
scan_offset: usize,
instruction_size: usize,
pointer_offsets: Vec<usize>
) -> Result<Pointer, String>
pub fn scan_rel( &self, error_name: &str, pattern: &str, scan_offset: usize, instruction_size: usize, pointer_offsets: Vec<usize> ) -> Result<Pointer, String>
Examples found in repository?
examples/dsr.rs (line 56)
51 52 53 54 55 56 57 58 59 60 61 62 63 64
pub fn refresh(&mut self) -> Result<(), String>
{
if !self.process.is_attached()
{
self.process.refresh()?;
self.game_data_man = self.process.scan_rel("GameDataMan", "48 8b 05 ? ? ? ? 48 8b 50 10 48 89 54 24 60", 3, 7, vec![0])?;
self.ai_timer = self.process.scan_rel("AI Timer", "48 8b 0d ? ? ? ? 48 85 c9 74 0e 48 83 c1 28", 3, 7, vec![0])?;
}
else
{
self.process.refresh()?;
}
Ok(())
}
source§impl Process
impl Process
sourcepub fn refresh(&mut self) -> Result<(), String>
pub fn refresh(&mut self) -> Result<(), String>
Cling to a running process
Examples found in repository?
examples/dsr.rs (line 55)
51 52 53 54 55 56 57 58 59 60 61 62 63 64
pub fn refresh(&mut self) -> Result<(), String>
{
if !self.process.is_attached()
{
self.process.refresh()?;
self.game_data_man = self.process.scan_rel("GameDataMan", "48 8b 05 ? ? ? ? 48 8b 50 10 48 89 54 24 60", 3, 7, vec![0])?;
self.ai_timer = self.process.scan_rel("AI Timer", "48 8b 0d ? ? ? ? 48 85 c9 74 0e 48 83 c1 28", 3, 7, vec![0])?;
}
else
{
self.process.refresh()?;
}
Ok(())
}
source§impl Process
impl Process
pub fn get_current_process_name() -> Result<String, ()>
sourcepub fn get_running_process_names() -> Vec<String>
pub fn get_running_process_names() -> Vec<String>
Examples found in repository?
examples/dsr.rs (line 88)
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110
fn main()
{
let str = r#"C:\soulmemory\soulmemory_rs.dll"#;
let w32_str = get_w32str_from_str(str);
println!("{:?}", w32_str);
println!("{:?}", vec_u16_to_u8(&w32_str));
let alloated_str = String::from(str);
let collected: Vec<u16> = alloated_str.encode_utf16().collect();
println!("{:?}", collected);
unsafe { println!("{:?}", collected.align_to::<u8>()); }
let processes = Process::get_running_process_names();
for p in &processes
{
println!("{}", p);
}
let mut ds1 = Ds1::new();
loop
{
match ds1.refresh()
{
Ok(()) => {}
Err(e) => println!("{}", e)
}
//ds1.inject_soulmemory_rs();
println!("igt: {}", ds1.get_in_game_time_milliseconds());
println!("ai: {}", ds1.get_ai_timer());
sleep(Duration::from_secs(1));
}
}
source§impl Process
impl Process
sourcepub fn is_attached(&self) -> bool
pub fn is_attached(&self) -> bool
Examples found in repository?
examples/dsr.rs (line 53)
51 52 53 54 55 56 57 58 59 60 61 62 63 64
pub fn refresh(&mut self) -> Result<(), String>
{
if !self.process.is_attached()
{
self.process.refresh()?;
self.game_data_man = self.process.scan_rel("GameDataMan", "48 8b 05 ? ? ? ? 48 8b 50 10 48 89 54 24 60", 3, 7, vec![0])?;
self.ai_timer = self.process.scan_rel("AI Timer", "48 8b 0d ? ? ? ? 48 85 c9 74 0e 48 83 c1 28", 3, 7, vec![0])?;
}
else
{
self.process.refresh()?;
}
Ok(())
}
Trait Implementations§
source§impl BaseReadWrite for Process
impl BaseReadWrite for Process
source§fn read_memory_rel(&self, offset: Option<usize>, buffer: &mut [u8]) -> bool
fn read_memory_rel(&self, offset: Option<usize>, buffer: &mut [u8]) -> bool
Read memory relative to the object’s location in memory
source§fn write_memory_rel(&self, offset: Option<usize>, buffer: &[u8]) -> bool
fn write_memory_rel(&self, offset: Option<usize>, buffer: &[u8]) -> bool
Write memory relative to the object’s location in memory
source§fn read_memory_abs(&self, address: usize, buffer: &mut [u8]) -> bool
fn read_memory_abs(&self, address: usize, buffer: &mut [u8]) -> bool
Read memory at absolute address
source§fn write_memory_abs(&self, address: usize, buffer: &[u8]) -> bool
fn write_memory_abs(&self, address: usize, buffer: &[u8]) -> bool
Write memory at absolute address
source§impl ReadWrite for Process
impl ReadWrite for Process
source§fn read_i8_rel(&self, address: Option<usize>) -> i8
fn read_i8_rel(&self, address: Option<usize>) -> i8
==================================================================================================================================================================
Reading
Read an i8 from the given address
Auto Trait Implementations§
impl Freeze for Process
impl !RefUnwindSafe for Process
impl !Send for Process
impl !Sync for Process
impl Unpin for Process
impl !UnwindSafe for Process
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more