This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Ping Faker 1.5


Post New Thread Reply   
 
Thread Tools Display Modes
Flasher
Senior Member
Join Date: Apr 2008
Old 09-07-2011 , 18:21   Re: Ping Faker 1.5
Reply With Quote #161

Just set pingfake_flux to something like 5.
Flasher is offline
ebin
New Member
Join Date: Sep 2011
Old 09-15-2011 , 17:06   Re: Ping Faker 1.5
Reply With Quote #162

Hi,

Would it be possible to add a parameter for minimum/maximum ping? I mean that people whose ping is lower than the cvar wont be faked and people whose ping is higher than the cvar wont be faked.

For example minimum 20 and maximum 50 would mean that if player has a lower ping that 20 it wont be faked and if he has higher than 50 it wont be faked.
ebin is offline
joshknifer
Veteran Member
Join Date: Jun 2011
Location: Denver, CO
Old 09-15-2011 , 17:32   Re: Ping Faker 1.5
Reply With Quote #163

Quote:
Originally Posted by MeRcyLeZZ View Post
CVAR is pingfake_ping_max [value].
This sets the top limit.
__________________
joshknifer is offline
Send a message via Skype™ to joshknifer
nightstalker
Member
Join Date: Jun 2008
Location: Dallas
Old 10-15-2011 , 00:12   Re: Ping Faker 1.5
Reply With Quote #164

Very useful plugin!

Question tho, howcome when I fake someone ping it just stays on the same number. I know pingfake_flux "#" should fix that right? but its not doing anything.
nightstalker is offline
Mofforg
Senior Member
Join Date: Aug 2010
Location: Moscow, Russia
Old 10-16-2011 , 12:23   Re: Ping Faker 1.5
Reply With Quote #165

Last version cause many overflows.

10 players in a row get overflowes.


Suck messages i see couple times in every round. All visibled in 1 sec:

PHP Code:
SZ_GetSpaceoverflow on Player
SZ_GetSpace
overflow on Player2
SZ_GetSpace
overflow on Player3
WARNING
datagram overflowed for Player
WARNING
datagram overflowed for Player2
WARNING
datagram overflowed for Player3 
Mofforg is offline
Send a message via ICQ to Mofforg Send a message via Skype™ to Mofforg
Dabb
Senior Member
Join Date: Sep 2010
Location: Romania - Hunedoara
Old 10-16-2011 , 13:03   Re: Ping Faker 1.5
Reply With Quote #166

Quote:
Originally Posted by Mofforg View Post
Last version cause many overflows.

10 players in a row get overflowes.


Suck messages i see couple times in every round. All visibled in 1 sec:

PHP Code:
SZ_GetSpaceoverflow on Player
SZ_GetSpace
overflow on Player2
SZ_GetSpace
overflow on Player3
WARNING
datagram overflowed for Player
WARNING
datagram overflowed for Player2
WARNING
datagram overflowed for Player3 
sorry , it's from your server because i don't have problems with the lastest version on my server
Dabb is offline
Send a message via Yahoo to Dabb
Mofforg
Senior Member
Join Date: Aug 2010
Location: Moscow, Russia
Old 10-16-2011 , 16:21   Re: Ping Faker 1.5
Reply With Quote #167

Quote:
Originally Posted by Dabb View Post
sorry , it's from your server because i don't have problems with the lastest version on my server
If you have empty server, it could be so.

I have full server.
Mofforg is offline
Send a message via ICQ to Mofforg Send a message via Skype™ to Mofforg
Mofforg
Senior Member
Join Date: Aug 2010
Location: Moscow, Russia
Old 10-21-2011 , 22:52   Re: Ping Faker 1.5
Reply With Quote #168

MeRcyLeZZ, Can you help? Idk why all players have overflows. I just remove trash from plugin...

I only need all players see only 50% of ping. Also I am not sure, what for is "check_for_loaded_pings" function.

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>

const TASK_ARGUMENTS 100

new g_maxplayersg_connected[33], g_offset[33][2], g_argping[33][3]
new 
g_loaded_counterg_pingoverride[33] = { -1, ... }
new Array:
g_loaded_authid, Array:g_loaded_ping

public plugin_init()
{
    
register_plugin("Ping faker""1.5""Community")
    

    
g_maxplayers get_maxplayers()
    
    
// If mod is CS, register some additional events to fix a bug
    
new mymod[16]
    
get_modname(mymodcharsmax(mymod))
    if (
equal(mymod"cstrike"))
    {
        
register_event("DeathMsg""fix_fake_pings""a")
        
register_event("TeamInfo""fix_fake_pings""a")
    }
    
    
register_forward(FM_UpdateClientData"fw_UpdateClientData")
    
    
    
g_loaded_authid ArrayCreate(321)
    
g_loaded_ping ArrayCreate(11)
    
    
set_task(2.0"calculate_arguments"TASK_ARGUMENTS__"b")
}


public 
fix_fake_pings()
{
    static 
player
    
for (player 1player <= g_maxplayersplayer++)
    {
        
// Player not in game?
        
if (!g_connected[player])
             continue;
        
        
// Resend fake pings
        
fw_UpdateClientData(player)
    }
}

public 
client_authorized(id)
{
    
check_for_loaded_pings(id)
}

public 
client_putinserver(id)
{
    
g_connected[id] = true
    check_for_loaded_pings
(id)
}

public 
client_disconnect(id)
{
    
g_connected[id] = false
}

public 
fw_UpdateClientData(id)
{
    
// Scoreboard key being pressed?
    
if (!(pev(idpev_button) & IN_SCORE) && !(pev(idpev_oldbuttons) & IN_SCORE))
        return;
    
    
// Send fake player's pings
    
static playersending
    sending 
0
    
for (player 1player <= g_maxplayersplayer++)
    {
        
// Player not in game?
        
if (!g_connected[player])
             continue;
        
        
// Send message with the weird arguments
        
switch (sending)
        {
            case 
0:
            {
                
// Start a new message
                
message_begin(MSG_ONE_UNRELIABLESVC_PINGS_id)
                
write_byte((g_offset[player][0] * 64) + (* (player 1)))
                
write_short(g_argping[player][0])
                
sending++
            }
            case 
1:
            {
                
// Append additional data
                
write_byte((g_offset[player][1] * 128) + (* (player 1)))
                
write_short(g_argping[player][1])
                
sending++
            }
            case 
2:
            {
                
// Append additional data and end message
                
write_byte((* (player 1)))
                
write_short(g_argping[player][2])
                
write_byte(0)
                
message_end()
                
sending 0
            
}
        }
    }
    
    
// End message if not yet sent
    
if (sending)
    {
        
write_byte(0)
        
message_end()
    }
}

// Calculate weird argument values based on target ping
public calculate_arguments()
{
    static 
playerpingloss
    
for (player 1player <= g_maxplayersplayer++)
    {
        
get_user_ping(playerpingloss)
        
ping clamp(floatround(ping 0.5), 04095)
        
        
// First argument's ping
        
for (g_offset[player][0] = 0g_offset[player][0] < 4g_offset[player][0]++)
        {
            if ((
ping g_offset[player][0]) % == 0)
            {
                
g_argping[player][0] = (ping g_offset[player][0]) / 4
                
break;
            }
        }
        
// Second argument's ping
        
for (g_offset[player][1] = 0g_offset[player][1] < 2g_offset[player][1]++)
        {
            if ((
ping g_offset[player][1]) % == 0)
            {
                
g_argping[player][1] = (ping g_offset[player][1]) / 2
                
break;
            }
        }
        
// Third argument's ping
        
g_argping[player][2] = ping
    
}
}

check_for_loaded_pings(id)
{
    
// Nothing to check for
    
if (g_loaded_counter <= 0) return;
    
    
// Get steamid and ip
    
static authid[32], ip[16], ibuffer[32]
    
get_user_authid(idauthidsizeof authid 1)
    
get_user_ip(idipsizeof ip 11)
    
    for (
0g_loaded_counteri++)
    {
        
// Retrieve authid
        
ArrayGetString(g_loaded_authidibuffersizeof buffer 1)
        
        
// Compare it with this player's steamid and ip
        
if (equali(bufferauthid) || equal(bufferip))
        {
            
// We've got a match!
            
g_pingoverride[id] = ArrayGetCell(g_loaded_pingi)
            break;
        }
    }


Last edited by Mofforg; 10-21-2011 at 22:53.
Mofforg is offline
Send a message via ICQ to Mofforg Send a message via Skype™ to Mofforg
Lt.RAT
Member
Join Date: Sep 2008
Location: Russia Yekaterinburg
Old 11-07-2011 , 14:58   Re: Ping Faker
Reply With Quote #169

Quote:
Originally Posted by MeRcyLeZZ View Post
That's pretty neat, how did you manage to find those? I'm going to see if I can send all pings on a single message now, that should reduce bandwidth usage a lot.
I know how to parse all svc_ messages, and ofc added some to wiki.

But i can`t understand how works fix_fake_pings.
Code:
register_event("DeathMsg", "fix_fake_pings", "a")
register_event("TeamInfo", "fix_fake_pings", "a")

public fix_fake_pings()
{
......
		fw_UpdateClientData(player)
......
}

public fw_UpdateClientData(id)
{
....
	if (!(pev(id, pev_button) & IN_SCORE) && !(pev(id, pev_oldbuttons) & IN_SCORE))
		return;
...
}
So, when fix_fake_pings triggered, it launch fw_UpdateClientData for all players, but fw_UpdateClientData send messages only for players which "currently" holding IN_SCORE button. So at that time players can see their real ping.

Also right after connect, server send to player svc_pings, so better to add delayed exec with forcing ping. I give advice coz fixed those things in my own plugin that working with ping.

And I see amazing packet calculation

Test code for you, with sending all in one message:
Code:
stock send_pings_test(id)
{
	static player;
	static p_ping[33]={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32};
	static p_loss[33]={0,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132};
	new bb;//byte buffer

	new bits;

	//we should have at least ourself to send ping, or we`ll send empty message and as I suppose get error  :) but never tested that moment
	message_begin(MSG_ONE_UNRELIABLE, SVC_PINGS, _, id);
	for (player = 1; player <= 32; player++)
	{ 
//lets send info about all possible players, even they are not on server
//		if (! g_connected[player] )
//			 continue;
		
		//CAP p_ping p_loss values, if they are too big to send
		if ( p_ping[player] >= (1<<12) )
		{
			p_ping[player] = ((1<<12) - 1 );
		}
		if ( p_loss[player] >= (1<<7) )
		{
			p_loss[player] = ((1<<7) - 1 );
		}

		bb += (1 + ( (player - 1) << 1) + ( p_ping[player] << 6) ) << bits; // (player - 1) coz in that message: message_slot=player_id-1;
		bits += 18;

		for( ;bits >= 8;bits -= 8, bb >>= 8 )
		{
			write_byte( bb ); // or write: bb&((1<<8)-1)
		}

		bb += (p_loss[player] << bits );
		bits += 7;

		for( ;bits >= 8;bits -=8, bb >>= 8 )
		{
			write_byte( bb );
		}
	}

	write_byte( bb ); //write last part or finalize message
	message_end();	
}
Unfortunally we can send that message only with write_byte and in 2 parts otherwise it`s exceed byte buffer size and corrupt it. Or we need to add support of buffer with more than 4 bytes in it.
Lt.RAT is offline
Send a message via ICQ to Lt.RAT
neoRT
Senior Member
Join Date: May 2011
Old 02-10-2012 , 06:25   Re: Ping Faker 1.5
Reply With Quote #170

I tried it and it causes overflows. After a while it will cause channel overflow and everybody on the server will be kicked. No one can't connect after this because it will get kicked again and again untill server restart.
Any fix for this?
neoRT is offline
Reply



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 13:19.


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