mirror of
https://github.com/a2x/cs2-dumper.git
synced 2025-04-11 02:05:35 +08:00
Add first offsets config for linux
This commit is contained in:
parent
6a1600d432
commit
7e573bdcb6
132
config_linux.json
Normal file
132
config_linux.json
Normal file
@ -0,0 +1,132 @@
|
|||||||
|
{
|
||||||
|
"signatures": [
|
||||||
|
{
|
||||||
|
"name": "dwBuildNumber",
|
||||||
|
"module": "libengine2.so",
|
||||||
|
"pattern": "89 15 ? ? ? ? 48 83 ? ? 48 8D 3D ? ? ? ?",
|
||||||
|
"operations": [
|
||||||
|
{
|
||||||
|
"type": "rip",
|
||||||
|
"offset": 2,
|
||||||
|
"length": 6
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "dwNetworkGameClient_deltaTick",
|
||||||
|
"module": "libengine2.so",
|
||||||
|
"pattern": "89 83 ? ? ? ? B8 01",
|
||||||
|
"operations": [
|
||||||
|
{
|
||||||
|
"type": "slice",
|
||||||
|
"start": 2,
|
||||||
|
"end": 4
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "dwEntityList",
|
||||||
|
"module": "libclient.so",
|
||||||
|
"pattern": "48 8B 3D ? ? ? ? 44 89 E3 45 89 E6 C1 ? 0E",
|
||||||
|
"operations": [
|
||||||
|
{
|
||||||
|
"type": "rip"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "dwForceAttack",
|
||||||
|
"module": "libclient.so",
|
||||||
|
"pattern": "4c 8d ? ? ? ? ? 4d 89 ? 48 89 ? ? ? ? ? eb",
|
||||||
|
"operations": [
|
||||||
|
{
|
||||||
|
"type": "rip"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "add",
|
||||||
|
"value": 48
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "dwForceAttack2",
|
||||||
|
"module": "libclient.so",
|
||||||
|
"pattern": "4c 8d ? ? ? ? ? 48 8d ? ? ? ? ? 48 89 ? ? ? ? ? e8 ? ? ? ? 49 ? ? ? 31 d2 48 c7 ? ? ? ? ? ? 08",
|
||||||
|
"operations": [
|
||||||
|
{
|
||||||
|
"type": "rip"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "add",
|
||||||
|
"value": 48
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "dwGameEntitySystem",
|
||||||
|
"module": "libclient.so",
|
||||||
|
"pattern": "48 89 3d ? ? ? ? e9 ? ? ? ? 55",
|
||||||
|
"operations": [
|
||||||
|
{
|
||||||
|
"type": "rip"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "dwGameEntitySystem_getHighestEntityIndex",
|
||||||
|
"module": "libclient.so",
|
||||||
|
"pattern": "8b 87 ? ? ? ? c3 66 ? ? ? ? ? ? ? ? 8b 97",
|
||||||
|
"operations": [
|
||||||
|
{
|
||||||
|
"type": "slice",
|
||||||
|
"start": 2,
|
||||||
|
"end": 4
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "dwGameRules",
|
||||||
|
"module": "libclient.so",
|
||||||
|
"pattern": "48 89 3d ? ? ? ? 8b",
|
||||||
|
"operations": [
|
||||||
|
{
|
||||||
|
"type": "rip"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "dwLocalPlayerController",
|
||||||
|
"module": "libclient.so",
|
||||||
|
"pattern": "48 8B 15 ? ? ? ? 31 C0 48 85 D2 74 5C",
|
||||||
|
"operations": [
|
||||||
|
{
|
||||||
|
"type": "rip"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "dwLocalPlayerPawn",
|
||||||
|
"module": "libclient.so",
|
||||||
|
"pattern": "48 8D 05 ? ? ? ? C3 ? ? ? 00 00 00 00 00 C7 47 40",
|
||||||
|
"operations": [
|
||||||
|
{
|
||||||
|
"type": "rip"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "add",
|
||||||
|
"value": 56
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "dwViewMatrix",
|
||||||
|
"module": "libclient.so",
|
||||||
|
"pattern": "4c 8d 05 ? ? ? ? 48 ? ? 48 8d ? ? ? ? ? e8 ? ? ? ? 8b",
|
||||||
|
"operations": [
|
||||||
|
{
|
||||||
|
"type": "rip"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -72,3 +72,9 @@ pub const PROC_NAME: &str = "cs2.exe";
|
|||||||
|
|
||||||
#[cfg(target_os = "linux")]
|
#[cfg(target_os = "linux")]
|
||||||
pub const PROC_NAME: &str = "cs2";
|
pub const PROC_NAME: &str = "cs2";
|
||||||
|
|
||||||
|
#[cfg(target_os = "windows")]
|
||||||
|
pub const OFFSETS_CONF: &str = "config.json";
|
||||||
|
|
||||||
|
#[cfg(target_os = "linux")]
|
||||||
|
pub const OFFSETS_CONF: &str = "config_linux.json";
|
||||||
|
@ -7,8 +7,8 @@ use simplelog::{debug, error, info};
|
|||||||
use super::{generate_files, Entries, Entry};
|
use super::{generate_files, Entries, Entry};
|
||||||
|
|
||||||
use crate::builder::FileBuilderEnum;
|
use crate::builder::FileBuilderEnum;
|
||||||
use crate::config::Config;
|
|
||||||
use crate::config::Operation::*;
|
use crate::config::Operation::*;
|
||||||
|
use crate::config::{self, Config};
|
||||||
use crate::os::Process;
|
use crate::os::Process;
|
||||||
|
|
||||||
pub fn dump_offsets(
|
pub fn dump_offsets(
|
||||||
@ -17,7 +17,7 @@ pub fn dump_offsets(
|
|||||||
file_path: &str,
|
file_path: &str,
|
||||||
indent: usize,
|
indent: usize,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
let file = File::open("config.json")?;
|
let file = File::open(config::OFFSETS_CONF)?;
|
||||||
|
|
||||||
let config: Config = serde_json::from_reader(file)?;
|
let config: Config = serde_json::from_reader(file)?;
|
||||||
|
|
||||||
|
@ -86,8 +86,8 @@ fn main() -> Result<()> {
|
|||||||
|
|
||||||
TermLogger::init(log_level, config, TerminalMode::Mixed, ColorChoice::Auto)?;
|
TermLogger::init(log_level, config, TerminalMode::Mixed, ColorChoice::Auto)?;
|
||||||
|
|
||||||
if !Path::new("config.json").exists() {
|
if !Path::new(config::OFFSETS_CONF).exists() {
|
||||||
bail!("Missing config.json file");
|
bail!("Missing {} file", config::OFFSETS_CONF);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the output directory if it doesn't exist.
|
// Create the output directory if it doesn't exist.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user