Cod4 cracked server linux

Cod4 cracked server linux

Hello,
I am on linux box, running few cod4 servers and I need some help making them show in master list.

I did some changes in my iptables:

-A INPUT -p udp -m udp -m string —sport 20800 -j DROP —algo bm —string «BANNED_CDKEY»
-A INPUT -p udp -m udp -m string —sport 20800 -j DROP —algo bm —string «INVALID_CDKEY»
-A OUTPUT -p udp -m udp -m string —sport 20800 -j DROP —algo bm —string «INVALID_CDKEY»
-A OUTPUT -p udp -m udp -m string —sport 20800 -j DROP —algo bm —string «BANNED_CDKEY»

and using original bins, it’s not working.. msg is «key code is in use».
I need little help here and may be patched bins too 🙁

I found a way to fix it. Unfortunately it is not working with ip tables at all.
Just find getIpAuthoruze in bin file, using hex editor and rename it (first one) with something else, so it will not get IP authorization for clients who want to connect to the server. That’s it. 🙂

Thanks goes to IzNoGoD, who point me to right direction 🙂

Happy new year to all

i renamed getIpAuthorize to other letters, but now i’m getting: «Key Code in use. Please try reconnecting later.»

Can anyone help me with this? I want to run cod4 cracked linux server which should be shown in master list. Thanks!

I’m also attempting this and had the same issue as jankarl ^^^

Anyone know the solution? Cheers

Couldn’t seem to edit my last post..

Found this after more googling:

I’m also attempting this and had the same issue as jankarl ^^^

Anyone know the solution? Cheers

I will look into the porting my cracked solution from cod4 to cod2 when i got time.

See:
https://github.com/kungfooman/libcod/blob/master/libcod.cpp (hook call of AuthorizeState: line 1944)
https://github.com/kungfooman/libcod/blob/master/functions.hpp (requires addresses of Cmd_Argv, Cvar_VariableValue and hook_AuthorizeState_call)

Ok, it seems that my cracked solution from cod2 doesn’t work in cod4. Cvar_VariableValue should be 0x0819E7C0.

void *__cdecl sub_816FE18(int a1, char a2, __int16 a3, int a4, int a5)
<
const char *v5; // edx@2
__int32 v6; // eax@4
int v7; // edx@4
int v8; // esi@4
signed int v9; // edx@7
const char *v10; // ebx@9
void *result; // eax@15
int v12; // eax@35
int v13; // [sp+18h] [bp-430h]@13
int v14; // [sp+18h] [bp-430h]@24
char *v15; // [sp+18h] [bp-430h]@40
signed int v16; // [sp+34h] [bp-414h]@7
signed int v17; // [sp+38h] [bp-410h]@8
char v18; // [sp+3Ch] [bp-40Ch]@42

if ( !sub_813C0C4(a1, a2, a3, a4, a5, v13e7844c, v13e78450, v13e78454) )
return (void *)sub_8122B2E(15, «SV_AuthorizeIpPacket: not from authorize server\n»);
v5 = «%s%s\t\n» + 6;
if ( *(_DWORD *)(4 * v8879a40 + 0x8879A84) > 1 )
v5 = *(const char **)(*(_DWORD *)(4 * v8879a40 + 0x8879AA4) + 4);
v6 = __strtol_internal(v5, 0, 10, 0);
v8 = 0;
v7 = 0;
while ( v6 != *(_DWORD *)(v7 + 333857868) )
<
++v8;
v7 += 80;
if ( v8 == 1024 )
return (void *)sub_8122B2E(15, «SV_AuthorizeIpPacket: challenge not found\n»);
>
*(_DWORD *)(80 * v8 + 0x13E64454) = v90b4f84;
v9 = *(_DWORD *)(4 * v8879a40 + 0x8879A84);
v16 = 136494744;
if ( v9 > 2 )
<
v16 = *(_DWORD *)(*(_DWORD *)(4 * v8879a40 + 0x8879AA4) + 8);
v17 = 136494744;
if ( v9 5 )
LABEL_17:
v10 = *(const char **)(*(_DWORD *)(4 * v8879a40 + 0x8879AA4) + 20);
LABEL_10:
if ( !sub_81AAAE2(v16, «deny») )
<
if ( !v17 || !*(_BYTE *)v17 )
goto LABEL_45;
if ( !sub_81AAAE2(v17, «CLIENT_UNKNOWN_TO_AUTH») || !sub_81AAAE2(v17, 136518348) )
<
v13 = (int)»needcdkey»;
goto LABEL_14;
>
if ( sub_81AAAE2(v17, «INVALID_CDKEY») )
<
sub_81AAAE2(v17, «BANNED_CDKEY»);
v13 = (int)»error\nEXE_ERR_BAD_CDKEY»;
>
else
<
LABEL_45:
v13 = (int)»error\nEXE_ERR_CDKEY_IN_USE»;
>
LABEL_14:
sub_813D086(
1,
*(_DWORD *)(80 * v8 + 0x13E64438),
*(_DWORD *)(80 * v8 + 0x13E6443C),
*(_DWORD *)(80 * v8 + 0x13E64440),
*(_DWORD *)(80 * v8 + 0x13E64444),
*(_DWORD *)(80 * v8 + 0x13E64448),
v13);
return memset((void *)(80 * v8 + 333857848), 0, 0x50u);
>
if ( strcmp((const char *)(80 * v8 + 333857892), v10) )
<
sub_8122B2E(
15,
«rejecting connection due to mismatched GUID: expected \»%s\», got \»%s\»\n»,
80 * v8 + 333857892,
v10);
v14 = (int)»error\nEXE_ERR_BAD_CDKEY»;
LABEL_25:
sub_813D086(
1,
*(_DWORD *)(80 * v8 + 0x13E64438),
*(_DWORD *)(80 * v8 + 0x13E6443C),
*(_DWORD *)(80 * v8 + 0x13E64440),
*(_DWORD *)(80 * v8 + 0x13E64444),
*(_DWORD *)(80 * v8 + 0x13E64448),
v14);
return memset((void *)(80 * v8 + 333857848), 0, 0x50u);
>
if ( !sub_81AAAE2(v16, «demo») )
<
if ( !(unsigned __int8)sub_819E7C0(«fs_restrict») )
<
v14 = (int)»error\nEXE_ERR_NOT_A_DEMO_SERVER»;
goto LABEL_25;
>
goto LABEL_35;
>
result = (void *)sub_81AAAE2(v16, «accept»);
if ( result )
<
if ( v17 && *(_BYTE *)v17 )
<
sprintf(&v18, «error\n%s», v17);
v15 = &v18;
>
else
<
v15 = «error\nEXE_ERR_BAD_CDKEY»;
>
sub_813D086(
1,
*(_DWORD *)(80 * v8 + 0x13E64438),
*(_DWORD *)(80 * v8 + 0x13E6443C),
*(_DWORD *)(80 * v8 + 0x13E64440),
*(_DWORD *)(80 * v8 + 0x13E64444),
*(_DWORD *)(80 * v8 + 0x13E64448),
v15);
return memset((void *)(80 * v8 + 333857848), 0, 0x50u);
>
if ( !*(_DWORD *)(80 * v8 + 0x13E64460) )
<
LABEL_35:
v12 = sub_81A9F8A(«challengeResponse %i», *(_DWORD *)(80 * v8 + 0x13E6444C));
result = (void *)sub_813D086(
1,
*(_DWORD *)(80 * v8 + 0x13E64438),
*(_DWORD *)(80 * v8 + 0x13E6443C),
*(_DWORD *)(80 * v8 + 0x13E64440),
*(_DWORD *)(80 * v8 + 0x13E64444),
*(_DWORD *)(80 * v8 + 0x13E64448),
v12);
>
return result;
>

Читайте также:  Citrix xenserver установка windows

You could hook all the calls in this function to sub_81AAAE2. (which compares the state with deny or accept)

I think this should do the trick:

return strcmp(state, base);
>

#if COD_VERSION == COD4_1_7
cracking_hook_call(0x0816FF42, (int)hook_StateCompare);
cracking_hook_call(0x081701D6, (int)hook_StateCompare);
#endif

Basically it changes the compare function to returning false (1) when it compares deny to deny. And it returns true (0) when it compares deny to accept.

Shouldnt this be more like

int hook_StateCompare(char * state, char * base)
<
if (CvarVariableValue == NULL || CvarVariableValue(«sv_cracked») == 1)
return 0;
return strcmp(state, base);
>

Shouldnt this be more like

int hook_StateCompare(char * state, char * base)
<
if (CvarVariableValue == NULL || CvarVariableValue(«sv_cracked») == 1)
return 0;
return strcmp(state, base);
>

No, because I hook these 2 calls.

if ( !sub_81AAAE2(v16, «deny») )
result = (void *)sub_81AAAE2(v16, «accept»);

I think this should do the trick:

return strcmp(state, base);
>

#if COD_VERSION == COD4_1_7
cracking_hook_call(0x0816FF42, (int)hook_StateCompare);
cracking_hook_call(0x081701D6, (int)hook_StateCompare);
#endif

Basically it changes the compare function to returning false (1) when it compares deny to deny. And it returns true (0) when it compares deny to accept.

Hey Mitch, i look for a way for a long time to run a cod4 cracked server and never found anything in internet!! Sorry for my noob question, but how do u use this php codes u just gave here??

Thanks for your help,
ps: sorry for my bad english, i’m french 🙂
Kill3ill

Hey Mitch, i look for a way for a long time to run a cod4 cracked server and never found anything in internet!! Sorry for my noob question, but how do u use this php codes u just gave here??

Thanks for your help,
ps: sorry for my bad english, i’m french 🙂
Kill3ill

The code is supposed to be adding to libcod. See https://github.com/kungfooman/libcod. (you will need to be able to edit your start up line for this to work. Also linux only)
But i never got around to test that code.

Add after ‘char * hook_AuthorizeState( int arg ) < **** >‘ (line 1446)

return strcmp(state, base);
>

Add this before #ifdef IS_JAVA_ENABLED (line 2022)

Читайте также:  Windows включить aero эффект

#if COD_VERSION == COD4_1_7
cracking_hook_call(0x0816FF42, (int)hook_StateCompare);
cracking_hook_call(0x081701D6, (int)hook_StateCompare);
#endif

Note: This code hasn’t be tested so it might be that it could crash your game server. (cod4_lnxded)

Edit: try this binary at http://znation.nl/libcod/

Thanks for your reply. Well, i downloaded this file here: http://znation.nl/libcod/, so what to do with this now?

Thanks for your reply. Well, i downloaded this file here: http://znation.nl/libcod/, so what to do with this now?

I added a nomysql version (less work to install).

Download http://znation.nl/libcod/libcod4_1_7_nomysql.so and upload it next to your cod4 binary.
Modify your startup line to:

LD_LIBRARY_PATH=. LD_PRELOAD=libcod4_1_7_nomysql.so ./cod4_lnxded . your other parameters here.

(LD_LIBRARY_PATH might be optional)

When you say «next to your cod4 binary» you mean the cod4_lnxded (cracked file or original file?)

No need for cracked lnxded file when you have sv_cracked with libcod

but ye, next to that file

Hi guys, a friend of mine has cod 4 legit game and when he start original server, but when people like me with cracked game try to join it says key code in use. When he starts cracked server everyone can join but need to have server ip adress cuz it dont shows up in the master server list, I followed the tutorial with hex editor and edited cracked server.exe now the server shows but says key code in use on cracked games. How to fix that.

Im pretty damn impressed by running a cod4 libcod enabled server or iptables mod with a .exe file.

I tested my libcod cracked version for cod4, but it doesn’t work yet. The server is currently rejecting the connection because of mismatched guid.

Edit: fixed the rejecting connection now

Download (‘set sv_cracked 1’ to enable semi-cracked)
1.7: http://znation.nl/libcod/libcod4_1_7.so
1.7 (query limit): http://znation.nl/libcod/libcod4_1_7_l.so

I couldn’t test it completely, because I am having trouble with my previous cod4 installation. I need to install cod4 correctly.

I tested my libcod cracked version for cod4, but it doesn’t work yet. The server is currently rejecting the connection because of mismatched guid.

Edit: fixed the rejecting connection now

Download (‘set sv_cracked 1’ to enable semi-cracked)
1.7: http://znation.nl/libcod/libcod4_1_7.so
1.7 (query limit): http://znation.nl/libcod/libcod4_1_7_l.so

I couldn’t test it completely, because I am having trouble with my previous cod4 installation. I need to install cod4 correctly.

In the coming days Ill try to make my servers available by the second libcod file.

Right me if Im wrong — my starting commands should be like this? :

LD_LIBRARY_PATH=. LD_PRELOAD=libcod4_1_7_l.so ./cod4_lnxded +set sv_punkbuster «0» + set net_port «28968» +exec hc.cfg +map_rotate

Can someone provide me, to resolve my problem?

root@TeamSpeak:/home/cod4server# LD_LIBRARY_PATH=. LD_PRELOAD=libcod4_1_7_l.so ./cod4_lnxded +set sv_punkbuster «0» + set net_port «28966» +exec dedicated.cfg +map_rotate
> [WARNING] Compiled for: 4171
Compiled: Mar 13 2016 14:20:07 using GCC 4.8.4
Segmentation fault (core dumped)
root@TeamSpeak:/home/cod4server#

Im using Ubuntu 16.04 x64

Can someone provide me, to resolve my problem?

root@TeamSpeak:/home/cod4server# LD_LIBRARY_PATH=. LD_PRELOAD=libcod4_1_7_l.so ./cod4_lnxded +set sv_punkbuster «0» + set net_port «28966» +exec dedicated.cfg +map_rotate
> [WARNING] Compiled for: 4171
Compiled: Mar 13 2016 14:20:07 using GCC 4.8.4
Segmentation fault (core dumped)
root@TeamSpeak:/home/cod4server#

Im using Ubuntu 16.04 x64

Libcod for cod4 is no longer supported, use cod4x server if you want more features.

Источник

Thread: [CoD4] Setup CoD4(x) on your ubuntu 14.04 server

Thread Tools
Search Thread
Display

[CoD4] Setup CoD4(x) on your ubuntu 14.04 server

First off, I’d like to thank any and all sources I’ve used over the years to gather all this information. I cannot name them individually, however, if you feel special enough that you think you require a listing, send me a PM and I’ll put you in my list of special people.

So, first off, you’d need a server with ubuntu 14.04 x64 minimal. Any other linux installation might also work (debian is closesly related to ubuntu, so the steps listed here will probably work on a debian install as well) (CentOS is not that closely related so most steps will require changing). Aquiring such a server is a thing you have to figure out for yourself. You can buy one of the many VPS’s (virtual private servers) or run linux locally (on your own server/inside a VM/on your main pc) and go from there.

Читайте также:  Scp virtual bus driver windows 10

Step 1: Securing your server

The first steps you should always take when running any internet-facing server is securing the server. The most common attack vector for internet facing servers is ssh root password bruteforcing (clicky), so moving away from both password usage for ssh logon as well as root login is a valid first step. Basically, it involves you following this guide: guide is here. If you’re really paranoid about security you might want to generate your public/private key file on your local pc instead of on your server, use puttygen.

The next step in securing your ssh login is putting it on a different port. By default ssh listens on port 22, on ANY ssh installation. This means that portscans/brute force attacks will try port 22 first. Changing your ssh port basically boils down to editting /etc/ssh/sshd_config and changing the Port 22 line to some other port, preferably above 1024, but it must be below 65536 (I’m using a port between 30000 and 40000). Hereafter you have to restart your ssh deamon (ubuntu: service ssh restart) and reconnect your client on the new port.

After this, you should configure a firewall (example here). Keep in mind that changing your ssh port requires you to actually read the stuff at that link or you might lock yourself out of your server.

Step 2: Installing CoD4x prerequisites
CoD4x prerequisites are as easy as doing:

Step 3: Installing CoD4
Installing cod4 is as simple as uploading the iwd files from an existing cod4 install main directory and the .ff files from the zone/english directory to, for example, /home/USERNAME/_stock/cod4/main/ and /home/USERNAME/_stock/cod4/zone/english
These files need to be readable by the useraccount that will start the server.

Furthermore, you’ll need the stock cod4_lnxded file, which in the case of cod4x is read from a .iwd file in your main directory. So, upload this file: xiceops_00.iwd to your main dir before proceeding.

Step 4: Compiling CoD4x
First off, clone this git repo:

If the git ever goes offline, use this: CoD4X17a-WonderlandX-master.zip

Then, edit a file to fix default jump_slowdownenabled behaviour:

Step 5: Starting your CoD4x server
Create a .sh file with the following contents:

Adjust where required.

Step 6: Creating your first mod
work in progress

Step 7: Go make something awesome
work in progress

Last edited by IzNoGoD; 2nd May 2017 at 08:04 .

«Does not work» is an error report for a bug between keyboard and chair.

Источник

Оцените статью