Sixthworks / spankerfield

Undetected software with high code quality for Battlefield 4.
https://www.unknowncheats.me/forum/battlefield-4-a/493695-spankerfield-beautiful-esp-code-base-clean-screenshots.html
Apache License 2.0
83 stars 45 forks source link

Discussion: C++ and Rust comparing #12

Closed Marcus-Rise closed 2 years ago

Marcus-Rise commented 2 years ago

Is C++ a better language in this case than Rust? I want to learn rust, it's often compared to C++, and I'm trying to understand variants of implementation of this language.

womblee commented 2 years ago

C++ is way simpler and I think you should figure it out first, there is a high chance that you will waste a lot of time to get good at Rust.

I like Rust, but it’s a weird choice for memory hacking in a C++ code base. And syntax is way worse...

It can be a nice ass language like this:

let chlclient = crate::utils::interfaces::GetInterface::<*const tf2::engine::CHLClient>("./tf/bin/client.so", "VClient0").expect("Failed to get CHLClient's interface");

And then it can also be:

 let clientmode = unsafe { **(((*((*(chlclient as *mut *mut usize)).offset(10))) + 1) as *mut *mut *mut usize) };

Just learn c++👍

womblee commented 2 years ago

But it can be nice because it's fun (type fun not found, did you mean *const fn?)