Skip to content

Commit

Permalink
rel: v0.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
24rr committed Feb 26, 2025
1 parent 4486d63 commit 3bc2c38
Show file tree
Hide file tree
Showing 8 changed files with 471 additions and 420 deletions.
7 changes: 7 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "roblox-hwid-spoofer"
version = "0.1.0"
version = "0.1.1"
edition = "2021"
authors = ["bufferization"]
description = "A tool to spoof hardware identifiers used by Roblox Hyperion"
Expand All @@ -11,10 +11,11 @@ rand = "0.8"
winreg = "0.11"
winapi = { version = "0.3", features = ["winnt", "processthreadsapi", "securitybaseapi", "handleapi", "minwindef", "winreg", "winbase"] }
chrono = "0.4.39"
anyhow = "1.0"

[profile.release]
opt-level = 3
lto = true
codegen-units = 1
strip = true
panic = "abort"
panic = "abort"
129 changes: 59 additions & 70 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
mod modules;

use std::io::{self, Write};
use std::error::Error;
use std::io;
use anyhow::{Result, Context};
use modules::system_uuid::SystemUuidSpoofer;
use modules::memory_devices::MemoryDevicesSpoofer;
use modules::monitor_edid::MonitorEdidSpoofer;
Expand All @@ -11,55 +11,48 @@ use std::thread;
use winreg::enums::*;
use winreg::RegKey;

fn main() -> Result<(), Box<dyn Error>> {
fn main() -> Result<()> {
print_banner();


if !is_running_as_admin() {
println!("[ERROR] This program must be run with Administrator privileges!");
println!("Please right-click and select 'Run as Administrator'");
wait_for_exit();
return Ok(());
}


setup_main_config()?;

setup_main_config().context("Failed to setup main configuration")?;

loop {
match show_menu()? {
1 => spoof_all()?,
match show_menu().context("Failed to display menu")? {
1 => spoof_all().context("Failed to spoof all hardware IDs")?,
2 => {
println!("\n[-] Running System UUID Spoofer");
match run_system_uuid_spoofer() {
Ok(_) => println!("[+] System UUID Spoofing Successful"),
Err(e) => println!("[!] System UUID Spoofing Failed: {}", e),
}
wait_to_continue()?;
run_system_uuid_spoofer()
.map(|_| println!("[+] System UUID Spoofing Successful"))
.unwrap_or_else(|e| println!("[!] System UUID Spoofing Failed: {}", e));
wait_to_continue().context("Failed to wait for user input")?;
},
3 => {
println!("\n[-] Running Memory Devices Spoofer");
match run_memory_devices_spoofer() {
Ok(_) => println!("[+] Memory Devices Spoofing Successful"),
Err(e) => println!("[!] Memory Devices Spoofing Failed: {}", e),
}
wait_to_continue()?;
run_memory_devices_spoofer()
.map(|_| println!("[+] Memory Devices Spoofing Successful"))
.unwrap_or_else(|e| println!("[!] Memory Devices Spoofing Failed: {}", e));
wait_to_continue().context("Failed to wait for user input")?;
},
4 => {
println!("\n[-] Running Monitor EDID Spoofer");
match run_monitor_edid_spoofer() {
Ok(_) => println!("[+] Monitor EDID Spoofing Successful"),
Err(e) => println!("[!] Monitor EDID Spoofing Failed: {}", e),
}
wait_to_continue()?;
run_monitor_edid_spoofer()
.map(|_| println!("[+] Monitor EDID Spoofing Successful"))
.unwrap_or_else(|e| println!("[!] Monitor EDID Spoofing Failed: {}", e));
wait_to_continue().context("Failed to wait for user input")?;
},
5 => {
println!("\n[-] Running System Registry Spoofer");
match run_system_reg_spoofer() {
Ok(_) => println!("[+] System Registry Spoofing Successful"),
Err(e) => println!("[!] System Registry Spoofing Failed: {}", e),
}
wait_to_continue()?;
run_system_reg_spoofer()
.map(|_| println!("[+] System Registry Spoofing Successful"))
.unwrap_or_else(|e| println!("[!] System Registry Spoofing Failed: {}", e));
wait_to_continue().context("Failed to wait for user input")?;
},
6 => {
println!("\nExiting. Hardware ID Spoofer closed.");
Expand All @@ -72,84 +65,77 @@ fn main() -> Result<(), Box<dyn Error>> {
Ok(())
}

fn show_menu() -> Result<u32, Box<dyn Error>> {
fn show_menu() -> Result<u32> {
println!("\n==== Hardware ID Spoofer Menu ====");
println!("1. Spoof All Hardware IDs");
println!("2. Spoof System UUID only");
println!("3. Spoof Memory Devices only");
println!("4. Spoof Monitor EDID only");
println!("5. Spoof System Registry only");
println!("6. Exit");

print!("\nEnter your choice (1-6): ");
io::stdout().flush()?;
println!("\nEnter your choice (1-6): ");

let mut input = String::new();
io::stdin().read_line(&mut input)?;
io::stdin().read_line(&mut input).context("Failed to read user input")?;

match input.trim().parse() {
Ok(num) => Ok(num),
Err(_) => Ok(0),
}
let parsed = input.trim().parse::<u32>().unwrap_or(0);
Ok(parsed)
}

fn spoof_all() -> Result<(), Box<dyn Error>> {
fn spoof_all() -> Result<()> {
println!("\n[+] Beginning HWID spoofing sequence...");


let spoofers = [
("System UUID", run_system_uuid_spoofer as fn() -> Result<(), Box<dyn Error>>),
("Memory Devices", run_memory_devices_spoofer as fn() -> Result<(), Box<dyn Error>>),
("Monitor EDID", run_monitor_edid_spoofer as fn() -> Result<(), Box<dyn Error>>),
("System Registry", run_system_reg_spoofer as fn() -> Result<(), Box<dyn Error>>),
("System UUID", run_system_uuid_spoofer as fn() -> Result<()>),
("Memory Devices", run_memory_devices_spoofer as fn() -> Result<()>),
("Monitor EDID", run_monitor_edid_spoofer as fn() -> Result<()>),
("System Registry", run_system_reg_spoofer as fn() -> Result<()>),
];

for (name, spoofer_fn) in spoofers.iter() {
spoofers.iter().for_each(|(name, spoofer_fn)| {
println!("\n[-] Running {} Spoofer", name);

match spoofer_fn() {
Ok(_) => println!("[+] {} Spoofing Successful", name),
Err(e) => println!("[!] {} Spoofing Failed: {}", name, e),
}

spoofer_fn()
.map(|_| println!("[+] {} Spoofing Successful", name))
.unwrap_or_else(|e| println!("[!] {} Spoofing Failed: {}", name, e));

thread::sleep(Duration::from_millis(500));
}
});

println!("\n[+] HWID spoofing complete! Your hardware identifiers have been modified.");
println!("[*] Roblox will now detect different hardware identifiers on this machine.");
println!("[*] Remember that spoofed IDs persist across reboots but may reset with Windows updates.");

wait_to_continue()?;
wait_to_continue().context("Failed to wait for user input")?;
Ok(())
}

fn setup_main_config() -> Result<(), Box<dyn Error>> {
fn setup_main_config() -> Result<()> {
let hkcu = RegKey::predef(HKEY_CURRENT_USER);


let (config_key, _) = hkcu.create_subkey(r"Software\Microsoft\DeviceManagement\SecurityProviders")?;

let (config_key, _) = hkcu.create_subkey(r"Software\Microsoft\DeviceManagement\SecurityProviders")
.context("Failed to create config registry key")?;

let prev_run: Option<u32> = config_key.get_value("ConfigVersion").ok();

if let Some(version) = prev_run {
println!("[*] Detected previous configuration (version {})", version);
} else {
println!("[*] First-time setup detected, creating new configuration");
config_key.set_value("ConfigVersion", &1u32)?;
config_key.set_value("SetupDate", &chrono::Local::now().to_rfc3339())?;
config_key.set_value("ConfigVersion", &1u32)
.context("Failed to set ConfigVersion registry value")?;
config_key.set_value("SetupDate", &chrono::Local::now().to_rfc3339())
.context("Failed to set SetupDate registry value")?;
}

Ok(())
}

fn wait_to_continue() -> Result<(), Box<dyn Error>> {
print!("\nPress Enter to continue...");
io::stdout().flush()?;
fn wait_to_continue() -> Result<()> {
println!("\nPress Enter to continue...");

let mut input = String::new();
io::stdin().read_line(&mut input)?;
io::stdin().read_line(&mut input).context("Failed to read user input")?;

Ok(())
}
Expand All @@ -166,6 +152,7 @@ fn is_running_as_admin() -> bool {
};
let mut sid = std::ptr::null_mut();

// Initialize SID
let result = AllocateAndInitializeSid(
&mut authority,
2,
Expand All @@ -179,9 +166,11 @@ fn is_running_as_admin() -> bool {
return false;
}

// Check if user is a member of the admin group
let mut is_member = 0;
let member_check = CheckTokenMembership(std::ptr::null_mut(), sid, &mut is_member);

// Free allocated SID
winapi::um::securitybaseapi::FreeSid(sid);

member_check != 0 && is_member != 0
Expand Down Expand Up @@ -209,18 +198,18 @@ fn print_banner() {
println!("");
}

fn run_system_uuid_spoofer() -> Result<(), Box<dyn Error>> {
SystemUuidSpoofer::spoof()
fn run_system_uuid_spoofer() -> Result<()> {
SystemUuidSpoofer::spoof().context("System UUID spoofing failed")
}

fn run_memory_devices_spoofer() -> Result<(), Box<dyn Error>> {
MemoryDevicesSpoofer::spoof()
fn run_memory_devices_spoofer() -> Result<()> {
MemoryDevicesSpoofer::spoof().context("Memory devices spoofing failed")
}

fn run_monitor_edid_spoofer() -> Result<(), Box<dyn Error>> {
MonitorEdidSpoofer::spoof()
fn run_monitor_edid_spoofer() -> Result<()> {
MonitorEdidSpoofer::spoof().context("Monitor EDID spoofing failed")
}

fn run_system_reg_spoofer() -> Result<(), Box<dyn Error>> {
SystemRegSpoofer::spoof()
fn run_system_reg_spoofer() -> Result<()> {
SystemRegSpoofer::spoof().context("System registry spoofing failed")
}
Loading

0 comments on commit 3bc2c38

Please sign in to comment.