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


Raised This Month: $ Target: $400
 0% 

[REQ] Spin hack detector/banner


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xJonny
Junior Member
Join Date: May 2007
Location: England
Old 04-05-2008 , 08:46   [REQ] Spin hack detector/banner
Reply With Quote #1

Recently our server has been bombarded by spin hackers.

There was one anti spinhacker made for AMXModX here: http://forums.alliedmods.net/showthread.php?t=10982

Is it possible to put that idea into SourceMod without false positives? It would be excellent if it banned by IP.

Last edited by xJonny; 04-05-2008 at 09:45.
xJonny is offline
SAMURAI16
BANNED
Join Date: Sep 2006
Old 04-05-2008 , 09:37   Re: [REQ] Spin hack detector/banner
Reply With Quote #2

Code:
#include <sourcemod> #include <sdktools> public Plugin:myinfo = {     name = "SpinHack Detectir",     author = "SAMURAI",     description = "catch spinhack",     version = "1.0",     url = "www.cs-utilz.net" } #define MaxAngelChange 1500 #define MAX_DETECTIONS 25 #define PLAYER_LEFT 128            // Player is holdign down the left  button #define PLAYER_RIGHT 256        // Player is holdign down the right button new Float:gf_LastAng[MAXPLAYERS+1][3]; new Float:gf_TotalAng[MAXPLAYERS+1]; new g_Detections[MAXPLAYERS+1] ; new g_iMaxClients; public OnPluginStart() {         g_iMaxClients = GetMaxClients();         CreateTimer(1.0,check_for_spinhack,_,TIMER_REPEAT);     CreateTimer(0.1,FakePrethink,0,TIMER_REPEAT);         } public Action:check_for_spinhack(Handle:timer) {     for(new i = 1; i <= g_iMaxClients; i++)     {         if(IsPlayerAlive(i))         {             if(gf_TotalAng[i] >= MaxAngelChange)             {                 if(g_Detections[i] >= MAX_DETECTIONS)                 {                     RegisterOffense(i);                 }                 g_Detections[i]++;             }             else                 g_Detections[i] = 0;                 gf_TotalAng[i] = 0.0;         }     } } public Action:FakePrethink(Handle:timer) {     for(new i = 1; i<= g_iMaxClients; i++)     {         if(IsPlayerAlive(i))         {             decl Float:Angle[3];             GetClientAbsAngles(i,Angle);                         gf_TotalAng[i] += GetVectorDistance(gf_LastAng[i],Angle);             CopyVector(Angle,gf_LastAng[i])                     new button = GetClientButtons(i);                         if(button & PLAYER_LEFT || button & PLAYER_RIGHT)             {                 g_Detections[i] = 0;             }         }     } } stock RegisterOffense(client) {     BanClient(client,0,BANFLAG_IP,"SpinHack Detected !","SpinHack Detected",_); } stock CopyVector(Float:Vec1[3],Float:Vec2[3]) {     Vec2[0] = Vec1[0];     Vec2[1] = Vec1[1];     Vec2[2] = Vec1[2]; }
Just porting EKS's plugin
SAMURAI16 is offline
Send a message via MSN to SAMURAI16
xJonny
Junior Member
Join Date: May 2007
Location: England
Old 04-05-2008 , 10:45   Re: [REQ] Spin hack detector/banner
Reply With Quote #3

Thanks a lot! I will test this later and report back!
xJonny is offline
ottobohn
Senior Member
Join Date: Sep 2007
Old 04-07-2008 , 16:54   Re: [REQ] Spin hack detector/banner
Reply With Quote #4

Same, I'll test and refine.

Otto
n00bsalad.net
ottobohn is offline
ottobohn
Senior Member
Join Date: Sep 2007
Old 04-07-2008 , 17:14   Re: [REQ] Spin hack detector/banner
Reply With Quote #5

I was wondering if you could port over your AMX anti-hacks to sourcemod too?

Quote:
Plugin detects:
  • *RapidFire
    *SpinHack
    *SpeedHack(SpeedHack secure for KZ servers)
    *Aim Shake
    *Low Recoil
    *Aimbot
    *Double Attack
    *WallHack
    *FastName change
    *Name Symbols(Detect specified symbols from name)
    *Bhop (Detect and block)
    *Left/Right keys(Detect and block)
    *Flash Bug(Detect and remove flashes from specified map zones)
    *Check IPs (Detect and block, specified IPs from file(hackhunter/hackhunter_ips.ini))
ottobohn is offline
narutopgm
Member
Join Date: Sep 2006
Old 04-07-2008 , 18:05   Re: [REQ] Spin hack detector/banner
Reply With Quote #6

for ban whis steamid

Quote:
stock RegisterOffense(client)
{
BanClient(client, 0, BANFLAG_AUTO, "SpinHack Detected !", "SpinHack Detected", "sm_ban", client);
}
no ?
narutopgm is offline
Fredd
Veteran Member
Join Date: Jul 2007
Old 04-07-2008 , 18:12   Re: [REQ] Spin hack detector/banner
Reply With Quote #7

SAMURAI16@: it would be much better to set a timer on a client when he connects and disconnects, better then a loop..
__________________
Need a private coder? AMXX, SourceMOD, MMS? PM me!
Fredd is offline
SAMURAI16
BANNED
Join Date: Sep 2006
Old 04-07-2008 , 23:06   Re: [REQ] Spin hack detector/banner
Reply With Quote #8

Quote:
Originally Posted by ottobohn View Post
I was wondering if you could port over your AMX anti-hacks to sourcemod too?
Maybe i'm gonna port my Hack Hunter to SourceMod
SAMURAI16 is offline
Send a message via MSN to SAMURAI16
siosios
SourceMod Donor
Join Date: Jan 2008
Old 04-07-2008 , 23:11   Re: [REQ] Spin hack detector/banner
Reply With Quote #9

that would be nice!!!!
siosios is offline
narutopgm
Member
Join Date: Sep 2006
Old 04-08-2008 , 05:39   Re: [REQ] Spin hack detector/banner
Reply With Quote #10

for ban whis steamid
Quote:
#include <sourcemod>
#include <sdktools>

public Plugin:myinfo =
{
name = "SpinHack Detectir",
author = "SAMURAI",
description = "catch spinhack",
version = "1.0",
url = "www.cs-utilz.net"
}


#define MaxAngelChange 1500
#define MAX_DETECTIONS 25

#define PLAYER_LEFT 128 // Player is holdign down the left button
#define PLAYER_RIGHT 256 // Player is holdign down the right button


new Float:gf_LastAng[MAXPLAYERS+1][3];
new Float:gf_TotalAng[MAXPLAYERS+1];
new g_Detections[MAXPLAYERS+1] ;

new g_iMaxClients;

public OnPluginStart()
{

g_iMaxClients = GetMaxClients();

CreateTimer(1.0,check_for_spinhack,_,TIMER_REPEAT);
CreateTimer(0.1,FakePrethink,0,TIMER_REPEAT);


}

public Action:check_for_spinhack(Handle:timer)
{
for(new i = 1; i <= g_iMaxClients; i++)
{
if(IsPlayerAlive(i))
{
if(gf_TotalAng[i] >= MaxAngelChange)
{
if(g_Detections[i] >= MAX_DETECTIONS)
{
RegisterOffense(i);
}
g_Detections[i]++;
}
else
g_Detections[i] = 0;

gf_TotalAng[i] = 0.0;
}
}
}

public Action:FakePrethink(Handle:timer)
{
for(new i = 1; i<= g_iMaxClients; i++)
{
if(IsPlayerAlive(i))
{
decl Float:Angle[3];
GetClientAbsAngles(i,Angle);

gf_TotalAng[i] += GetVectorDistance(gf_LastAng[i],Angle);
CopyVector(Angle,gf_LastAng[i])

new button = GetClientButtons(i);

if(button & PLAYER_LEFT || button & PLAYER_RIGHT)
{
g_Detections[i] = 0;
}
}
}
}

stock RegisterOffense(client)
{
BanClient(client,0,BANFLAG_AUTO,"SpinHack Detected !","SpinHack Detected", "sm_ban", client);
}

stock CopyVector(Float:Vec1[3],Float:Vec2[3])
{
Vec2[0] = Vec1[0];
Vec2[1] = Vec1[1];
Vec2[2] = Vec1[2];
}

No ?
narutopgm 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 21:38.


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