Skip to content

Loop blocking decompilation? #1

@sejbr

Description

@sejbr

I've tried to decompile a plugin I found on one of our servers left by some admin I suppose, althou decompiled code is a bit short and I'm not sure if decompiler died on loop or If it's just a random plugin.
I'm not sure now how I should assess the situation and possible security breach

public PlVers:__version =
{
    version = 5,
    filevers = "1.4.4",
    date = "12/21/2014",
    time = "18:16:58"
};
new Float:NULL_VECTOR[3];
new String:NULL_STRING[4];
public Extension:__ext_core =
{
    name = "Core",
    file = "core",
    autoload = 0,
    required = 0,
};
new MaxClients;
public Extension:__ext_tf2 =
{
    name = "TF2 Tools",
    file = "game.tf2.ext",
    autoload = 0,
    required = 1,
};
public Extension:__ext_sdktools =
{
    name = "SDKTools",
    file = "sdktools.ext",
    autoload = 1,
    required = 1,
};
new String:TFResourceNames[18][0];
public Extension:__ext_tf2items =
{
    name = "TF2Items",
    file = "tf2items.ext.2.ep2v",
    autoload = 0,
    required = 1,
};
public SharedPlugin:__pl_tf2attributes =
{
    name = "tf2attributes",
    file = "tf2attributes.smx",
    required = 1,
};
new primary[66];
new bool:lock;
public Plugin:myinfo =
{
    name = "removed",
    description = "if (primary == -1)",
    author = "removed",
    version = "6.9",
    url = "removed"
};
public __ext_core_SetNTVOptional()
{
    MarkNativeAsOptional("GetFeatureStatus");
    MarkNativeAsOptional("RequireFeature");
    MarkNativeAsOptional("AddCommandListener");
    MarkNativeAsOptional("RemoveCommandListener");
    VerifyCoreVersion();
    return 0;
}

TFClassType:TF2_GetPlayerClass(client)
{
    return GetEntProp(client, PropType:0, TFResourceNames, 4, 0);
}

public OnPluginStart()
{
    HookEvent("post_inventory_application", haha, EventHookMode:1);
    if (lock)
    {
        new i = 1;
        while (i < 2)
        {
            if (lock)
            {
                if (!lock)
                {
                    i++;
                }
            }
            i++;
        }
    }
    return 0;
}

public haha(Handle:event, String:name[], bool:dontBroadcast)
{
    new client = GetClientOfUserId(GetEventInt(event, "userid"));
    if (TF2_GetPlayerClass(client) == 2)
    {
        primary[client] = GetPlayerWeaponSlot(client, 0);
        if (primary[client] == -1)
        {
            new Handle:item = TF2Items_CreateItem(31);
            TF2Items_SetClassname(item, "tf_weapon_compound_bow");
            TF2Items_SetItemIndex(item, 56);
            TF2Items_SetLevel(item, 10);
            TF2Items_SetQuality(item, 6);
            TF2Items_SetNumAttributes(item, 1);
            TF2Items_SetAttribute(item, 0, 328, 1.0);
            primary[client] = TF2Items_GiveNamedItem(client, item);
            CloseHandle(item);
            TF2Attrib_SetByName(primary[client], "hidden primary max ammo bonus", 0.5);
            EquipPlayerWeapon(client, primary[client]);
        }
    }
    if (lock)
    {
        new i = 1;
        while (i < 2)
        {
            if (lock)
            {
                if (!lock)
                {
                    i++;
                }
            }
            i++;
        }
    }
    return 0;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions