Исходник Выбор региона для лв

..................................................
Участник
Статус
Оффлайн
Регистрация
13 Авг 2020
Сообщения
990
Реакции[?]
249
Поинты[?]
25K
скорее всего такая тему уже была
ну и пофыгу
(эта хуйня не моя)
я тестил вроде бы как работает так как пинг поднимается иногда до 100 при моём обычном 20-30
misc.cpp
Код:
void misc::ChangeRegion()
{
    switch (g_cfg.misc.region_changer) {
    case 0:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster waw");
        break;
    case 1:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster atl");
        break;
    case 2:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster bom");
        break;
    case 3:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster can");
        break;
    case 4:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster canm");
        break;
    case 5:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster cant");
        break;
    case 6:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster canu");
        break;
    case 7:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster dxb");
        break;
    case 8:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster eat");
        break;
    case 9:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster fra");
        break;
    case 10:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster gru");
        break;
    case 11:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster hkg");
        break;
    case 12:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster iad");
        break;
    case 13:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster jnb");
        break;
    case 14:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster lax");
        break;
    case 15:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster lhr");
        break;
    case 16:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster lim");
        break;
    case 17:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster lux");
        break;
    case 18:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster maa");
        break;
    case 19:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster mad");
        break;
    case 20:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster man");
        break;
    case 21:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster okc");
        break;
    case 22:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster ord");
        break;
    case 23:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster par");
        break;
    case 24:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster pwg");
        break;
    case 25:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster pwj");
        break;
    case 26:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster pwu");
        break;
    case 27:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster pww");
        break;
    case 28:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster pwz");
        break;
    case 29:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster scl");
        break;
    case 30:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster sea");
        break;
    case 31:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster sgp");
        break;
    case 32:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster sha");
        break;
    case 33:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster sham");
        break;
    case 34:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster shat");
        break;
    case 35:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster shau");
        break;
    case 36:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster shb");
        break;
    case 37:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster sto");
        break;
    case 38:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster sto2");
        break;
    case 39:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster syd");
        break;
    case 40:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster tsn");
        break;
    case 41:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster tsnm");
        break;
    case 42:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster tsnt");
        break;
    case 43:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster tsnu");
        break;
    case 44:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster tyo");
        break;
    case 45:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster tyo1");
        break;
    case 46:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster vie");
        break;
    case 47:
        m_engine()->ExecuteClientCmd("sdr SDRClient_ForceRelayCluster ams");
        break;
    }
}
misc.h
Код:
void ChangeRegion();
menu.cpp
Код:
draw_combo(crypt_str("Force mm region"), g_cfg.misc.region_changer, mmregions, ARRAYSIZE(mmregions));
                                if (ImGui::CustomButton(crypt_str("Apply region changes"), crypt_str("##CONFIG__CREATE"), ImVec2(220 * dpi_scale, 26 * dpi_scale)))
                                {
                                    misc::get().ChangeRegion();
                                }
constchars.h
Код:
const char* mmregions[48] = {
        "Warsaw [Poland]",
    "Atlanta [U.S. South]",
    "Mumbai [India]",
    "Guangzhou [China]",
    "Guangzhou #2 [China]",
    "Guangzhou #3 [China]",
    "Guangzhou #4 [China]",
    "Dubai [United Arab Emirates]",
    "Seattle [U.S. North]",
    "Frankfurt [Switzerland]",
    "Sao Paulo [Brazil]",
    "Hong Kong [China]",
    "Washington D.C [U.S. East]",
    "Cape Town [South Africa]",
    "Los Angeles [U.S. West]",
    "London [United Kingdom]",
    "Lima [Peru]",
    "Berlin [Germany]",
    "Chennai [India]",
    "Madrid [Spain]",
    "Manila [Phillipines]",
    "Oklahoma City [Canada]",
    "Chicago [U.S.]",
    "Paris [France]",
    "Guangzhou #5 [China]",
    "Tianjin [China]",
    "Hebei [China]",
    "Wuhan [China]",
    "Jiaxing [China]",
    "Santiago [Chile]",
    "Seoul [South Korea]",
    "Singapore [Australia]",
    "Shanghai [China]",
    "Shanghai #2 [China]",
    "Shanghai #3 [China]",
    "Shanghai #4 [China]",
    "Nakashibetsu [Japan]",
    "Moscow [Russia]",
    "Moscow #2 [Russia]",
    "Sydney [Australia]",
    "Beijing [China]",
    "Beijing #2 [China]",
    "Beijing #3 [China]",
    "Beijing #4 [China]",
    "Tokyo [Japan]",
    "Tokyo #2 [Japan]",
    "Vienna [Austria]",
    "Amsterdam [Netherlands]"
};
 
Последнее редактирование:
NulledLand
Пользователь
Статус
Оффлайн
Регистрация
7 Ноя 2019
Сообщения
113
Реакции[?]
42
Поинты[?]
0
wait aren't SDR got patched? Forcing region like that it won't work as I know!
 
Арбитр
Продавец
Статус
Оффлайн
Регистрация
13 Июл 2018
Сообщения
1,528
Реакции[?]
1,637
Поинты[?]
280K
Yes, I believe the command method is still possible. When Valve removed the command they only removed it from the console, which means the value that is actually set in their networking library steamnetworkingsockets.dll is still there - and it can still be manipulated. The networking library didn't actually update.

By looking at the source on GitHub here you will find no mention of ForceRelayCluster, because its config option constructor is called in csteamnetworkingsockets_sdr.cpp (it's defined here but never initialised) - the initialisation isn't included in the repository because Valve only sends their SDR networking stuff to game development partners. However, in the somewhat dated build included with CS:GO this option is still included as the game uses Steam Datagram Relay.

From a quick look at the source, you will need to call the constructor for GlobalConfigValue and replace the pointer OR it's possible that you can just edit the old struct - which will be much easier. I had a really quick look, and it seems that the [string] value used by the library is +0x8 bytes from the start of the struct:

1619025156077.png

Here's the string you can use to find an Xref (I think it's the destructor):
1619025182957.png

And here is the value being used (nice spelling Valve):
1619025204191.png
up to you to find the offset: I would recommend using a signature because Valve might update the library soon.

Credits: Kudx
 
Начинающий
Статус
Оффлайн
Регистрация
14 Окт 2017
Сообщения
21
Реакции[?]
17
Поинты[?]
0
awesome u actually ripped it straight off my source (kitsune) and its pasted from nanosense.
its actually working if someone is wondering.
 
Сверху Снизу