Anmeldungsdatum: Aug 2007
Beiträge: 1957
|
Kategorie: Battlefield 1 Entwickler: Puddin Poppin
Beschreibung: So here's some code for a lagswitch that works in most battlefield games. It uses windows filtering platform(WFP) to block incoming datagram traffic (system wide, unfortunately) so players freeze in their spot. It's pretty shitty but you get an extra second or two to shoot people before they run behind cover. Pair it with an aimbot and you could probably rack up some kills. Run it as admin.
CPP Code: void blockUDP() { HANDLE engineHandle; if (DWORD result = FwpmEngineOpen0(NULL, RPC_C_AUTHN_WINNT, NULL, NULL, &engineHandle)) { std::wcout << "Err. 3 - 0x" << std::hex << result << std::dec << std::endl; exitWait(); } FWPM_FILTER0 filter; SecureZeroMemory(&filter, sizeof(filter)); FWPM_FILTER_CONDITION0 conditions[2]; conditions[0].fieldKey = FWPM_CONDITION_IP_PROTOCOL; conditions[0].conditionValue.type = FWP_UINT8; conditions[0].conditionValue.uint8 = 17; //rfc 1700 conditions[0].matchType = FWP_MATCH_EQUAL; conditions[1].fieldKey = FWPM_CONDITION_DIRECTION; conditions[1].conditionValue.type = FWP_UINT32; conditions[1].conditionValue.uint32 = FWP_DIRECTION_INBOUND; conditions[1].matchType = FWP_MATCH_EQUAL; filter.action.type = FWP_ACTION_BLOCK; filter.displayData.name = L"DICE plz..."; filter.layerKey = FWPM_LAYER_DATAGRAM_DATA_V4; filter.numFilterConditions = 2; filter.weight.type = FWP_EMPTY; filter.filterCondition = conditions; while (true) { if (GetAsyncKeyState(18) & 0x8000) //alt key { if (DWORD result = FwpmFilterAdd0(engineHandle, &filter, NULL, &filter.filterId)) { std::wcout << "Err. 4 - 0x" << std::hex << result << std::dec << std::endl; exitWait(); } while (GetAsyncKeyState(18) & 0x8000) { Sleep(1); } if (DWORD result = FwpmFilterDeleteById0(engineHandle, filter.filterId)) { std::wcout << "Err. 5 - 0x" << std::hex << result << std::dec << std::endl; exitWait(); } } Sleep(1); } }
Download: BF1 Lagswitch
|