-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8b22bea
commit e691d72
Showing
9 changed files
with
123 additions
and
212 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
.idea | ||
packages | ||
ExoTracker/bin | ||
ExoTracker/obj | ||
.idea | ||
target | ||
Cargo.lock | ||
*.iml |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[package] | ||
name = "exotracker-rs" | ||
version = "0.1.0" | ||
authors = ["LastExceed <[email protected]>"] | ||
edition = "2018" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
console = "0.15.0" | ||
win_mem = "0.2.2" | ||
nalgebra = "0.29.0" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
# ExoTracker | ||
|
||
very rushed initial version. code is total spaghetti. full refactor incoming | ||
Completely rewritten in Rust. Code is still somewhat spaghetti. Currently depends on [this PR](https://github.com/nevalackin/win_mem/pull/2) | ||
|
||
# About virus warnings | ||
|
||
Releases aren't signed yet, so expect your browser and anti-virus software to not like the executable. If you don't trust me (which is fair) you can always check the code and compile it yourself | ||
[Explanation and workaround here](https://stackoverflow.com/a/66582477). I'm not gonna pay money for a certificate, and manually submitting each version for verification is way too much work | ||
|
||
If you don't trust me (which is fair) you can always look at the code and compile it yourself |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
mod utils; | ||
|
||
use std::thread; | ||
use std::time::Duration; | ||
use console::Term; | ||
use nalgebra::Vector3; | ||
use win_mem::process::Process; | ||
use win_mem::utils::WinResult; | ||
use utils::*; | ||
|
||
const CANNON: Vector3<f32> = Vector3::new( | ||
-66000f32, | ||
0f32, | ||
0f32 | ||
); | ||
|
||
fn main() { | ||
let term = Term::stdout(); | ||
term.hide_cursor().expect(""); | ||
term.set_title("ExoTracker v1.00"); | ||
|
||
loop { | ||
term.clearprint("searching for game process..."); | ||
let process = loop { | ||
if let Ok(process) = Process::find("EXO ONE.exe") { | ||
break process | ||
} | ||
thread::sleep(Duration::from_millis(1000)); | ||
}; | ||
|
||
term.clearprint("in menu");//desktop->menu | ||
let mut in_menu = true; | ||
while let Ok(unity_player) = process.find_module("UnityPlayer.dll") { | ||
while let Ok(_) = read_and_print(&term, &process, unity_player.address()) { | ||
in_menu = false; | ||
thread::sleep(Duration::from_millis(20)); | ||
}; | ||
if in_menu { | ||
thread::sleep(Duration::from_millis(20)); | ||
} else { | ||
term.clearprint("in menu");//ingame -> menu | ||
in_menu = true; | ||
} | ||
} | ||
} | ||
} | ||
|
||
fn read_and_print(term: &Term, process: &Process, unity_player: usize) -> WinResult<()> { | ||
let address = resolve_multilevel_pointer( | ||
&process, | ||
unity_player + 0x0156C900, | ||
&[0x3F8, 0x1A8, 0x28, 0xA0] | ||
)?; | ||
|
||
let position = process.read_mem::<Vector3<f32>>(address + 0x00)?; | ||
let velocity = process.read_mem::<Vector3<f32>>(address + 0x30)?; | ||
|
||
let distance = CANNON - position; | ||
|
||
term.move_cursor_to(0, 0).expect(""); | ||
println!("speed vertical {} ", velocity.y as i32); | ||
println!("speed horizontal {} ", velocity.xz().magnitude() as i32); | ||
println!("speed total {} ", velocity.magnitude() as i32); | ||
println!(); | ||
println!("distance to go {} ", distance.magnitude() as i32 - 7500); | ||
|
||
Ok(()) | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
use console::Term; | ||
use win_mem::process::Process; | ||
use win_mem::utils::WinResult; | ||
|
||
pub trait TermEx { | ||
fn clearprint(&self, text: &str) -> (); | ||
} | ||
|
||
impl TermEx for Term { | ||
fn clearprint(&self, text: &str) -> () { | ||
self.clear_screen().expect("screen clear failed"); | ||
println!("{}", text); | ||
} | ||
} | ||
|
||
pub fn resolve_multilevel_pointer(process: &Process, base: usize, offsets: &[usize]) -> WinResult<usize> { | ||
let mut address = base; | ||
|
||
for offset in offsets { | ||
address = process.read_mem::<usize>(address)? + offset; | ||
} | ||
Ok(address) | ||
} | ||
|
||
// recursive approach for novelty | ||
|
||
// pub fn resolve_multilevel_pointer2(process: &Process, base: usize, offsets: &[usize]) -> WinResult<usize> { | ||
// if let [first_offset, remaining_offsets @ ..] = offsets { | ||
// resolve_multilevel_pointer2( | ||
// process, | ||
// process.read_mem::<usize>(base)? + first_offset, | ||
// remaining_offsets | ||
// ) | ||
// } else { Ok(base) } | ||
// } |