feat(Spoofing): Add local user name spoofing (#502)

* Spoofs your local name by using natives and writing to a single struct (couldn't spoof name in chat otherwise)
* Add tooltip to IP spoofing to mention that it may cause you to get dropped from a session while connecting
* Expanded explanation in spoofing section to include that spoofing is server-side and not client-side.
This commit is contained in:
Yimura
2022-12-23 00:03:34 +01:00
committed by GitHub
parent ce5c317d87
commit e50bdd8c42
8 changed files with 62 additions and 21 deletions

View File

@ -9,15 +9,20 @@ namespace big
{
void view::spoofing()
{
components::small_text("To spoof any of the below credentials you need to reconnect with the lobby.");
components::sub_title("Username");
g_fiber_pool->queue_job([] {
PAD::DISABLE_ALL_CONTROL_ACTIONS(0);
});
components::small_text("To spoof any of the below credentials you need to reconnect with the lobby.\nAll spoofed details will be only visible by other players, your game will still show your actual name, ip, rid...");
components::sub_title("Username");
ImGui::Checkbox("Spoof Username", &g.spoofing.spoof_username);
if (g.spoofing.spoof_username)
{
ImGui::SameLine();
ImGui::Checkbox("Spoof Username Locally", &g.spoofing.spoof_local_username);
}
constexpr size_t name_size = RTL_FIELD_SIZE(rage::rlGamerInfo, m_name);
static char name[name_size];
@ -33,11 +38,9 @@ namespace big
components::sub_title("IP Address");
g_fiber_pool->queue_job([] {
PAD::DISABLE_ALL_CONTROL_ACTIONS(0);
});
ImGui::Checkbox("Spoof IP", &g.spoofing.spoof_ip);
if (ImGui::IsItemHovered())
ImGui::SetTooltip("Disable this feature if you're having trouble joining sessions.");
ImGui::Text("IP Address:");
ImGui::DragInt4("##ip_fields", g.spoofing.ip_address.data(), 0, 255);
@ -46,10 +49,6 @@ namespace big
components::sub_title("Rockstar ID");
g_fiber_pool->queue_job([] {
PAD::DISABLE_ALL_CONTROL_ACTIONS(0);
});
ImGui::Checkbox("Spoof Rockstar ID", &g.spoofing.spoof_rockstar_id);
ImGui::Text("Rockstar ID:");
@ -61,10 +60,6 @@ namespace big
components::sub_title("Crew");
g_fiber_pool->queue_job([] {
PAD::DISABLE_ALL_CONTROL_ACTIONS(0);
});
ImGui::Checkbox("Spoof Crew", &g.spoofing.spoof_crew_data);
constexpr size_t crew_tag_size = RTL_FIELD_SIZE(ClanData, m_clan_tag);