Raised This Month: $ Target: $400
 0% 

View Poll Results: Does This Crash Your Server?
Yes 1 100.00%
No 0 0%
Unsure / Untested 0 0%
Voters: 1. You may not vote on this poll

Solved Escaped Hex In PrintToServer Testing Plugin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
canadianjeff
BANNED
Join Date: Sep 2016
Old 10-23-2020 , 12:37   Escaped Hex In PrintToServer Testing Plugin
#1

when I am on windows 10 and using PuTTY to SSH into my server start my server and watch the console output when some of these escaped hex shows up in console output PuTTY will freak out and when I go to quit or shutdown the server it will seg fault on linux

fails when \x05 is printed to server console


Code:
#include <sourcemod>
#include <sdktools>

#pragma semicolon 1
#pragma newdecls required

#define PLUGIN_VERSION "0.00"

public Plugin myinfo = 
{
	name = "HEX TEST",
	author = "linux_canadajeff",
	description = "Testing Print To Server To Find What Makes It Crash!!!!",
	version = PLUGIN_VERSION,
	url = ""
};

public void OnPluginStart()
{
	CreateConVar("sm_hextest_version", PLUGIN_VERSION, "Standard plugin version ConVar. Please don't change me!", FCVAR_REPLICATED|FCVAR_NOTIFY|FCVAR_DONTRECORD);
	RegAdminCmd("sm_hextest", hextest, ADMFLAG_ROOT, "Tests the printtoserver escaped hex values");
}

public Action hextest(int client, int args)
{
	PrintToServer("\\x01 Test!");
	PrintToServer("\x01");
	PrintToServer("\\x02 Test!");
	PrintToServer("\x02");
	PrintToServer("\\x03 Test!");
	PrintToServer("\x03");
	PrintToServer("\\x04 Test!");
	PrintToServer("\x04");
	PrintToServer("\\x05 Test!");
	PrintToServer("\x05");
	PrintToServer("\\x06 Test!");
	PrintToServer("\x06");
	PrintToServer("\\x07 Test!");
	PrintToServer("\x07");
	PrintToServer("\\x08 Test!");
	PrintToServer("\x08");
	PrintToServer("\\x09 Test!");
	PrintToServer("\x09");
	PrintToServer("\\x10 Test!");
	PrintToServer("\x10");
	PrintToServer("\\x11 Test!");
	PrintToServer("\x11");
	PrintToServer("\\x12 Test!");
	PrintToServer("\x12");
	PrintToServer("\\x13 Test!");
	PrintToServer("\x13");
	PrintToServer("\\x14 Test!");
	PrintToServer("\x14");
	PrintToServer("\\x015 Test!");
	PrintToServer("\x15");
	return Plugin_Handled;
}

Last edited by asherkin; 03-07-2022 at 03:47. Reason: Restore to previous version.
canadianjeff is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:30.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode