Page 1 of 2

Re: Modify No-Console

Posted: 24 Jan 2018, 20:59
by ArminC
L 01/24/2018 - 22:56:58: [AMXX] Displaying debug trace (plugin "client_exec_steam.amxx", version "1.1")
L 01/24/2018 - 22:56:58: [AMXX] Run time error 10: native error (native "RegisterHookChain")
L 01/24/2018 - 22:56:58: [AMXX] [0] client_exec_steam.sma::plugin_init (line 96)

(without debug says something about get_pcvar_num)

Re: Modify No-Console

Posted: 25 Jan 2018, 12:40
by ArminC
I managed to get it fixed.. some problems with HLDS (rehlsd, regamedll.. idk)

It gives the binds but:


[SVC_DIRECTOR] Server tried to send invalid command:
bind "." "buyammo2"
[SVC_DIRECTOR] Server tried to send invalid command:
bind ";" "+mlook"
[SVC_DIRECTOR] Server tried to send invalid command:
bind "u" "messagemode2"
[SVC_DIRECTOR] Server tried to send invalid command:
bind "y" "messagemode"
[SVC_DIRECTOR] Server tried to send invalid command:
bind "F6" "save quick"

.. these binds don't work. the rest, yes..

Re: Modify No-Console

Posted: 25 Jan 2018, 16:55
by Raheem
What this means?

Re: Modify No-Console

Posted: 25 Jan 2018, 16:58
by ArminC
So.. all the binds are replaced by default then custom.. but..

[SVC_DIRECTOR] Server tried to send invalid command:
bind "." "buyammo2"
[SVC_DIRECTOR] Server tried to send invalid command:
bind ";" "+mlook"
[SVC_DIRECTOR] Server tried to send invalid command:
bind "u" "messagemode2"
[SVC_DIRECTOR] Server tried to send invalid command:
bind "y" "messagemode"
[SVC_DIRECTOR] Server tried to send invalid command:
bind "F6" "save quick"

-- these aren't replaced, instead of (y = messagemode),(y= nothing/nul/clear) .. I download a client from the link from page 1 with sometype of SMShield or something like that.. like the shield block that 5 binds.. whyy?!?!!?

Re: Modify No-Console

Posted: 25 Jan 2018, 20:12
by Raheem
OK, It's clear that this SMShield blocks this way of sending commands as it's developed just 1 month ago or 2 maybe (https://resursecs.com/download-cs-16.html) But it block all things or just these binds only? I in fact don't have this CS and don't download it yet to try + I'm not interested nowadays to upgrade this plugin anymore as there is many other things important in our Mod still need fixes.

Re: Modify No-Console

Posted: 25 Jan 2018, 20:22
by ArminC
No, everytime it block something give a message in console = no, just what I did give you in reply. Only that, is frustrating.. the rest is FINE

and you don't need to download the entire client, that's just a default one.. you need to download the real devil: http://counterstrike16-download.com/SM- ... tector.rar

Re: Modify No-Console

Posted: 26 Jan 2018, 16:53
by Raheem
I'll test this protector later then. But by anyway this plugin works for Steam game which used by most CS players and not many players know this protector so not problem. What if player make his whole game folder permissions read-only??? All these plugins will result in fail... In fact that BAN is the most powerful tool till now. Players still can protect their games but if they think to do.

Re: Modify No-Console

Posted: 26 Jan 2018, 19:34
by ArminC
Hmm.. I get you but is somehow urgent because it binds (nul) the most important keys like y *wtf* and no one can chat in this case ^_^
About read-only? We need to set the binds just on the sesion. We write the binds from our server to his client.. then if he exit the cs, lucky him (resets the cfg at starting again), I don't care, but on my server has my custom binds, if you get it :)

Steam.. oh if you know that on my country most steam players on the server I saw was 8 :\ (max) in the rest ussualy on a 25 players there are 0-5 (mostly 3<=).. the rest have unofficial client.. but the problem is that many players have this types of clients because for an example on a forum they allow only cs clients only with this protection :\

So from what I said above => even if the player is 8 years old.. he can a high chance to download a client with protection, without even know about it *facepalm*

And it worked so good.. until I pressed the y .. (+ the rest of the keys that I did copy in the reply)

Re: Modify No-Console

Posted: 26 Jan 2018, 22:19
by Raheem
I agree it maybe useful just for binds at time player inside your server but what i mean is we can't harm players or send them bad files ... etc

This protector not allow to bind these keys i don't know why but then what we can do? I think we should not unbind all when player connect but we bind our default binds direct. Try it just remove Send_Cmd(id, "unbindall") remove it from all positions in code and try and let me know what happens.

About Steamers i forget to say that i'm personally have near 10 accounts steam have cs1.6 and i use Non-Steam game version protocol 47... :lol: This may explain why there is many non-steamers... :twisted:

Re: Modify No-Console

Posted: 26 Jan 2018, 23:34
by ArminC
Oh.. for me personaly I have Valve Complete Pack (I love hl -> cs) =) Anyway I use sometimes no-steam for some test (like this).. ?? I don't actually want to remove the unbindall.. I want it to remain in a perfect scheme, clear(unbindall); reset(default); apply(custom) :D

But about your first line.. "we can't harm players or send them bad files ... etc" this isn't my intention, just to apply em' damn' binds =)

So you can't do anything? lol

PS: That code isn't suposed to bypass any shield/steam.. there isn't in wild any new exploit (better than this) or wtf is doing this exploit anyway?

Re: Modify No-Console

Posted: 27 Jan 2018, 12:08
by Raheem
I don't know how this shield maybe bypassed... And i'm not the guy who search for exploits and develop it... Make sense?

Re: Modify No-Console

Posted: 27 Jan 2018, 16:11
by ArminC
Oh.. now it's time to decrypt it.. but how.. if I find something I will reply..

Re: Modify No-Console

Posted: 02 Feb 2018, 13:29
by ArminC
I didn't find any solution.. can you add a cvar (1/0) in order to choose if I wana first "unbindall" or not?

Code: Select all

#include <amxmodx>
#include <amxmisc>
#include <reapi>

new const g_szDefaultBinds[][] =
{
	"bind ^"TAB^" ^"+showscores^"",
	"bind ^"ENTER^" ^"+attack^"",
	"bind ^"ESCAPE^" ^"cancelselect^"",
	"bind ^"SPACE^" ^"+jump^"",
	"bind ^"'^" ^"+moveup^"",
	"bind ^"+^" ^"sizeup^"",
	"bind ^",^" ^"buyammo1^"",
	"bind ^"-^" ^"sizedown^"",
	"bind ^".^" ^"buyammo2^"",
	"bind ^"/^" ^"+movedown^"",
	"bind ^"0^" ^"slot10^"",
	"bind ^"1^" ^"slot1^"",
	"bind ^"2^" ^"slot2^"",
	"bind ^"3^" ^"slot3^"",
	"bind ^"4^" ^"slot4^"",
	"bind ^"5^" ^"slot5^"",
	"bind ^"6^" ^"slot6^"",
	"bind ^"7^" ^"slot7^"",
	"bind ^"8^" ^"slot8^"",
	"bind ^"9^" ^"slot9^"",
	"bind ^";^" ^"+mlook^"",
	"bind ^"=^" ^"sizeup^"",
	"bind ^"[^" ^"invprev^"",
	"bind ^"]^" ^"invnext^"",
	"bind ^"`^" ^"toggleconsole^"",
	"bind ^"a^" ^"+moveleft^"",
	"bind ^"b^" ^"buy^"",
	"bind ^"c^" ^"radio3^"",
	"bind ^"d^" ^"+moveright^"",
	"bind ^"e^" ^"+use^"",
	"bind ^"f^" ^"impulse 100^"",
	"bind ^"g^" ^"drop^"",
	"bind ^"h^" ^"+commandmenu^"",
	"bind ^"j^" ^"cheer^"",
	"bind ^"k^" ^"+voicerecord^"",
	"bind ^"l^" ^"showbriefing^"",
	"bind ^"m^" ^"chooseteam^"",
	"bind ^"n^" ^"nightvision^"",
	"bind ^"o^" ^"buyequip^"",
	"bind ^"q^" ^"lastinv^"",
	"bind ^"r^" ^"+reload^"",
	"bind ^"s^" ^"+back^"",
	"bind ^"t^" ^"impulse 201^"",
	"bind ^"u^" ^"messagemode2^"",
	"bind ^"v^" ^"+moveup^"",
	"bind ^"w^" ^"+forward^"",
	"bind ^"x^" ^"radio2^"",
	"bind ^"y^" ^"messagemode^"",
	"bind ^"z^" ^"radio1^"",
	"bind ^"~^" ^"toggleconsole^"",
	"bind ^"UPARROW^" ^"+forward^"",
	"bind ^"DOWNARROW^" ^"+back^"",
	"bind ^"LEFTARROW^" ^"+left^"",
	"bind ^"RIGHTARROW^" ^"+right^"",
	"bind ^"ALT^" ^"+strafe^"",
	"bind ^"CTRL^" ^"+duck^"",
	"bind ^"SHIFT^" ^"+speed^"",
	"bind ^"F1^" ^"autobuy^"",
	"bind ^"F2^" ^"rebuy^"",
	"bind ^"F5^" ^"snapshot^"",
	"bind ^"F6^" ^"save quick^"",
	"bind ^"F7^" ^"load quick^"",
	"bind ^"F10^" ^"quit prompt^"",
	"bind ^"INS^" ^"+klook^"",
	"bind ^"PGDN^" ^"+lookdown^"",
	"bind ^"PGUP^" ^"+lookup^"",
	"bind ^"END^" ^"centerview^"",
	"bind ^"MWHEELDOWN^" ^"invnext^"",
	"bind ^"MWHEELUP^" ^"invprev^"",
	"bind ^"MOUSE1^" ^"+attack^"",
	"bind ^"MOUSE2^" ^"+attack2^"",
	"bind ^"PAUSE^" ^"pause^""
}

new const g_szCustomBinds[][] =
{
	"bind ^"c^" ^"+dellaser^"",
	"bind ^"v^" ^"+setlaser^"",
	"bind ^"x^" ^"+drag^"",
	"bind ^"MWHEELUP^" ^"+jump^""
}

new g_pBlockConsole, g_pDefaultBinds, g_pCustomBinds

public plugin_init()
{
	register_plugin("Client Exec Steam", "1.1", "Raheem")

	// HookChains
	RegisterHookChain(RG_CBasePlayer_PreThink, "Fw_PreThink_Pre", 0)

	// Pointer Cvars
	g_pBlockConsole = register_cvar("block_console_use", "0") // Who to block him from using console inside your server? 0 = Allow all | 1 = Block all | 2 = Allow admins only
	g_pDefaultBinds = register_cvar("bind_default_binds", "1") // Apply default binds at? 0 = No one | 1 = All players | 2 = All players but not admins
	g_pCustomBinds = register_cvar("bind_custom_binds", "1") // Apply custom binds at? 0 = No one | 1 = All players | 2 = All players but not admins
}

public client_authorized(id)
{
	// Default Binds
	if (get_pcvar_num(g_pDefaultBinds) == 0)
	{
		return PLUGIN_CONTINUE
	}
	else if (get_pcvar_num(g_pDefaultBinds) == 1)
	{
		Send_Cmd(id, "unbindall")
		
		for (new i = 0; i <= charsmax(g_szDefaultBinds); i++)
		{
			Send_Cmd(id, g_szDefaultBinds[i])
		}
	}
	else if (get_pcvar_num(g_pDefaultBinds) == 2)
	{
		if (is_user_admin(id))
			return PLUGIN_CONTINUE
		
		Send_Cmd(id, "unbindall")
		
		for (new i = 0; i <= charsmax(g_szDefaultBinds); i++)
		{
			Send_Cmd(id, g_szDefaultBinds[i])
		}
	}
	
	// Custom Binds
	if (get_pcvar_num(g_pCustomBinds) == 0)
	{
		return PLUGIN_CONTINUE
	}
	else if (get_pcvar_num(g_pCustomBinds) == 1)
	{
		for (new i = 0; i <= charsmax(g_szCustomBinds); i++)
		{
			Send_Cmd(id, g_szCustomBinds[i])
		}
	}
	else if (get_pcvar_num(g_pCustomBinds) == 2)
	{
		if (is_user_admin(id))
			return PLUGIN_CONTINUE
		
		for (new i = 0; i <= charsmax(g_szCustomBinds); i++)
		{
			Send_Cmd(id, g_szCustomBinds[i])
		}
	}
	
	return PLUGIN_CONTINUE
}

public Fw_PreThink_Pre(id)
{
	if (get_pcvar_num(g_pBlockConsole) == 0)
	{
		return HC_CONTINUE
	}
	else if (get_pcvar_num(g_pBlockConsole) == 1)
	{
		if (is_user_connected(id))
		{
			Send_Cmd(id, "hideconsole")
		}
	}
	else if (get_pcvar_num(g_pBlockConsole) == 2)
	{
		if (is_user_admin(id))
			return HC_CONTINUE
		
		if (is_user_connected(id))
		{
			Send_Cmd(id, "hideconsole")
		}
	}
	
	return HC_CONTINUE
}

stock Send_Cmd(id, szText[])
{
	message_begin(MSG_ONE, SVC_DIRECTOR, {0, 0, 0}, id)
	write_byte(strlen(szText) + 2)
	write_byte(10)
	write_string(szText)
	message_end()
}

Re: Modify No-Console

Posted: 11 Feb 2018, 17:22
by ArminC
Bump (..to put it in list with unsolved one..)

Re: Modify No-Console

Posted: 16 Feb 2018, 20:51
by Night Fury
Try:

Code: Select all

#include <amxmodx>
#include <amxmisc>
#include <reapi>

new const g_szDefaultBinds[][] =
{
	"bind ^"TAB^" ^"+showscores^"",
	"bind ^"ENTER^" ^"+attack^"",
	"bind ^"ESCAPE^" ^"cancelselect^"",
	"bind ^"SPACE^" ^"+jump^"",
	"bind ^"'^" ^"+moveup^"",
	"bind ^"+^" ^"sizeup^"",
	"bind ^",^" ^"buyammo1^"",
	"bind ^"-^" ^"sizedown^"",
	"bind ^".^" ^"buyammo2^"",
	"bind ^"/^" ^"+movedown^"",
	"bind ^"0^" ^"slot10^"",
	"bind ^"1^" ^"slot1^"",
	"bind ^"2^" ^"slot2^"",
	"bind ^"3^" ^"slot3^"",
	"bind ^"4^" ^"slot4^"",
	"bind ^"5^" ^"slot5^"",
	"bind ^"6^" ^"slot6^"",
	"bind ^"7^" ^"slot7^"",
	"bind ^"8^" ^"slot8^"",
	"bind ^"9^" ^"slot9^"",
	"bind ^";^" ^"+mlook^"",
	"bind ^"=^" ^"sizeup^"",
	"bind ^"[^" ^"invprev^"",
	"bind ^"]^" ^"invnext^"",
	"bind ^"`^" ^"toggleconsole^"",
	"bind ^"a^" ^"+moveleft^"",
	"bind ^"b^" ^"buy^"",
	"bind ^"c^" ^"radio3^"",
	"bind ^"d^" ^"+moveright^"",
	"bind ^"e^" ^"+use^"",
	"bind ^"f^" ^"impulse 100^"",
	"bind ^"g^" ^"drop^"",
	"bind ^"h^" ^"+commandmenu^"",
	"bind ^"j^" ^"cheer^"",
	"bind ^"k^" ^"+voicerecord^"",
	"bind ^"l^" ^"showbriefing^"",
	"bind ^"m^" ^"chooseteam^"",
	"bind ^"n^" ^"nightvision^"",
	"bind ^"o^" ^"buyequip^"",
	"bind ^"q^" ^"lastinv^"",
	"bind ^"r^" ^"+reload^"",
	"bind ^"s^" ^"+back^"",
	"bind ^"t^" ^"impulse 201^"",
	"bind ^"u^" ^"messagemode2^"",
	"bind ^"v^" ^"+moveup^"",
	"bind ^"w^" ^"+forward^"",
	"bind ^"x^" ^"radio2^"",
	"bind ^"y^" ^"messagemode^"",
	"bind ^"z^" ^"radio1^"",
	"bind ^"~^" ^"toggleconsole^"",
	"bind ^"UPARROW^" ^"+forward^"",
	"bind ^"DOWNARROW^" ^"+back^"",
	"bind ^"LEFTARROW^" ^"+left^"",
	"bind ^"RIGHTARROW^" ^"+right^"",
	"bind ^"ALT^" ^"+strafe^"",
	"bind ^"CTRL^" ^"+duck^"",
	"bind ^"SHIFT^" ^"+speed^"",
	"bind ^"F1^" ^"autobuy^"",
	"bind ^"F2^" ^"rebuy^"",
	"bind ^"F5^" ^"snapshot^"",
	"bind ^"F6^" ^"save quick^"",
	"bind ^"F7^" ^"load quick^"",
	"bind ^"F10^" ^"quit prompt^"",
	"bind ^"INS^" ^"+klook^"",
	"bind ^"PGDN^" ^"+lookdown^"",
	"bind ^"PGUP^" ^"+lookup^"",
	"bind ^"END^" ^"centerview^"",
	"bind ^"MWHEELDOWN^" ^"invnext^"",
	"bind ^"MWHEELUP^" ^"invprev^"",
	"bind ^"MOUSE1^" ^"+attack^"",
	"bind ^"MOUSE2^" ^"+attack2^"",
	"bind ^"PAUSE^" ^"pause^""
}

new const g_szCustomBinds[][] =
{
	"bind ^"c^" ^"+dellaser^"",
	"bind ^"v^" ^"+setlaser^"",
	"bind ^"x^" ^"+drag^"",
	"bind ^"MWHEELUP^" ^"+jump^""
}

new g_pBlockConsole, g_pDefaultBinds, g_pCustomBinds, g_pUnbindAll

public plugin_init()
{
	register_plugin("Client Exec Steam", "1.1", "Raheem")

	// HookChains
	RegisterHookChain(RG_CBasePlayer_PreThink, "Fw_PreThink_Pre", 0)

	// Pointer Cvars
	g_pBlockConsole = register_cvar("block_console_use", "0") // Who to block him from using console inside your server? 0 = Allow all | 1 = Block all | 2 = Allow admins only
	g_pDefaultBinds = register_cvar("bind_default_binds", "1") // Apply default binds at? 0 = No one | 1 = All players | 2 = All players but not admins
	g_pCustomBinds = register_cvar("bind_custom_binds", "1") // Apply custom binds at? 0 = No one | 1 = All players | 2 = All players but not admins
	g_pUnbindAll = register_cvar("unbindall", "0")
}

public client_authorized(id)
{
	// Default Binds
	if (get_pcvar_num(g_pDefaultBinds) == 0)
	{
		return PLUGIN_CONTINUE
	}
	else if (get_pcvar_num(g_pDefaultBinds) == 1)
	{
		if (get_pcvar_num(g_pUnbindAll) == 1)
		{
			Send_Cmd(id, "unbindall")
		}
		
		for (new i = 0; i <= charsmax(g_szDefaultBinds); i++)
		{
			Send_Cmd(id, g_szDefaultBinds[i])
		}
	}
	else if (get_pcvar_num(g_pDefaultBinds) == 2)
	{
		if (is_user_admin(id))
			return PLUGIN_CONTINUE
		
		if (get_pcvar_num(g_pUnbindAll) == 1)
		{
			Send_Cmd(id, "unbindall")
		}
		
		for (new i = 0; i <= charsmax(g_szDefaultBinds); i++)
		{
			Send_Cmd(id, g_szDefaultBinds[i])
		}
	}
	
	// Custom Binds
	if (get_pcvar_num(g_pCustomBinds) == 0)
	{
		return PLUGIN_CONTINUE
	}
	else if (get_pcvar_num(g_pCustomBinds) == 1)
	{
		for (new i = 0; i <= charsmax(g_szCustomBinds); i++)
		{
			Send_Cmd(id, g_szCustomBinds[i])
		}
	}
	else if (get_pcvar_num(g_pCustomBinds) == 2)
	{
		if (is_user_admin(id))
			return PLUGIN_CONTINUE
		
		for (new i = 0; i <= charsmax(g_szCustomBinds); i++)
		{
			Send_Cmd(id, g_szCustomBinds[i])
		}
	}
	
	return PLUGIN_CONTINUE
}

public Fw_PreThink_Pre(id)
{
	if (get_pcvar_num(g_pBlockConsole) == 0)
	{
		return HC_CONTINUE
	}
	else if (get_pcvar_num(g_pBlockConsole) == 1)
	{
		if (is_user_connected(id))
		{
			Send_Cmd(id, "hideconsole")
		}
	}
	else if (get_pcvar_num(g_pBlockConsole) == 2)
	{
		if (is_user_admin(id))
			return HC_CONTINUE
		
		if (is_user_connected(id))
		{
			Send_Cmd(id, "hideconsole")
		}
	}
	
	return HC_CONTINUE
}

stock Send_Cmd(id, szText[])
{
	message_begin(MSG_ONE, SVC_DIRECTOR, {0, 0, 0}, id)
	write_byte(strlen(szText) + 2)
	write_byte(10)
	write_string(szText)
	message_end()
}

Re: Modify No-Console (Solved)

Posted: 01 Mar 2018, 09:50
by ArminC
But now I see that it don't bind.. I tried more clients.. and more cvars .. nothing :-? (Same with old versions)

Edit: If I apply only Custom binds it don't work.. If I apply first the default binds then the custom binds it work :-/

Custom Binds only don't apply
Default Binds -> Custom Binds - apply
:x

Help?