Once I get that upgrade to 36-hour days, I will tackle that. – Mychaeel

UE1:NBSPChecker (Class)

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 14:32, 2 April 2009 by Azura (Talk | contribs) (Footer)

Jump to: navigation, search

Purpose

Variables

Discussion

Complete source code

//=============================================================================
// NBSPChecker ==> NoBullShitPlus v1.09
//=============================================================================
 
/*----------------------------------------
	SECURITY NOTES NBSPChecker
  ----------------------------------------
  - Replicated variables cannot be dereferenced so they are secure.
  - Function overriding requires compilable NBSP which most hackers can't do.
  - Function dereferencing must be protected using minimal number of functions.
  ----------------------------------------*/
 
class NBSPChecker extends Info;
 
/*------------------------------------------
	        VARS/ENUMS/SHIT
  ------------------------------------------*/
//Serverside initiated settings.
var private int ga; //Make every NBSPChecker unique
var bool CV;
 
//File Insigated Vars
var string version;
var private string sObj, hz[19], h[19];
var private NBSPCrc gs;
var string ld;
var private string ModMenu[32];
var private int GIB, myGlow;
var private playerpawn PP;
var private bool killM;
 
//Reply capturing
var string replyNone, reply_;
var string replyPackage, replyMod; 
var string ReplyInfo, ReplyPath, replyCanvas2; 
var string replyUPKG2, replyUPKG4, replyClass2;
var string replyActors, replyName, replySkin; 
var string replySkin2, replyObj, replyCMD, replyConsole;
var int replyCRC, replyCRC2;
var int replyUPKG, replyUPKG3, replyCUST;
var int replyClass, replyCanvas, replyVersion;
 
//Consts
var const int RT_NONE, RT_CANVAS, RT_CANVAS2, RT_CRC, RT_CRC2, RT_CLASS, RT_CLASS2, RT_PKG, RT_MOD, RT_INFO,
	RT_PATH, RT_UPKG, RT_UPKG2, RT_UPKG3, RT_UPKG4, RT_ACTOR, RT_SKIN, RT_SKIN2, RT_CMD, RT_OBJ, RT_NAME, RT_VERSION, RT_CONSOLE, RT_;
 
replication {
 
	reliable if ( Role == Role_Authority )
		xxPreDecrypt,
		fa,
		startup,
		runC;
 
	reliable if ( Role == Role_Authority )
		GetInformation,
		ValidateConsole,
		InitClient,
		TestCRC,
		CorePaths,
		Client_Notify,
		killMe,
		TestClasses,
		CheckCanvas,
		TestForBadActors,
		ValidateClasses,
		CheckSkins,
		startState,
		getCustom,
		getPackages;
 
	reliable if ( Role == Role_Authority )
		adjust;
 
	reliable if ( bNetOwner && ( Role < Role_Authority) )			
		RemoteReplyString,
		RemoteReplyInt;
}
 
simulated final function PlayerPawn fb()
{
	local PlayerPawn a;
	foreach AllActors(class'PlayerPawn', a) 
	{
		if (Viewport(a.Player) != None) 
			return a;
	}
}
 
simulated final function Client_Notify()
{
	local private UTConsole c;
 
	c = UTConsole(PP.player.Console);
	c.LaunchUWindow();
	c.ShowConsole();
}
 
/*------------------------------------------
	       CLIENT -> SERVER
	       SERVER -> CLIENT
  ------------------------------------------*/
simulated final function SetMajik(private int a) { ga = a; fa(a); } // <-- Sends Majik Key to Client
simulated final function fa(private int a) { ga = a; }
simulated final function string fk(private string s) { return fb().ConsoleCommand(s); } // <-- Most vital part of NBSP guard with all our power
 
simulated final function InitClient(private string s) // <-- .
{
	local private string a, x;
 
	//Run on client only
	if (Role < ROLE_Authority)
	{
		//Set PlayerPAWN
		PP = fb();
 
		a = decode(s);
		sObj = fk(a); 
 
		if (GIB == 0)
		{
			x = string(PP.Player.Class);
			if (instr(caps(x),"MACVIEWPORT")>-1)
				GIB=1;
			else if (instr(caps(x),"WINDOWSVIEWPORT")>-1)
				GIB=2;
			else
				GIB=3;
		}
	}
}
 
simulated final function RemoteReplyInt(private int a, private int w, private int b)
{
	switch (b)
	{
		case RT_CRC: replyCRC = a; break;
		case RT_CRC2: replyCRC2 = a; break;
		case RT_CLASS: replyClass = a; break;
		case RT_CANVAS: replyCanvas = a; break;
		case RT_UPKG: replyUPKG = a; break;
		case RT_UPKG3: replyUPKG3 = a; break;
		case RT_VERSION: replyVersion = a; break;
	}
 
	if (w != 0)
		Owner.ConsoleCommand("mutate nbsp"@ga@w);
}
 
simulated final function RemoteReplyString(private string a, private int w, private int x, private int b)
{
	switch (b)
	{	
		case RT_NONE: replyNone = a; break;	
		case RT_PKG: replyPackage = a; break;
		case RT_MOD: replyMod = a; break;
		case RT_INFO: ReplyInfo = a; break;
		case RT_PATH: ReplyPath = a; break;
		case RT_CANVAS2: replyCanvas2 = a; break;
		case RT_UPKG2: replyUPKG2 = a; break;
		case RT_UPKG4: replyUPKG4 = a; break;
		case RT_ACTOR: replyActors = a; break;
		case RT_SKIN: replySkin = a; break;
		case RT_SKIN2: replySkin2 = a; break;
		case RT_CLASS2: replyClass2 = a; break;
		case RT_OBJ: replyObj = a; break;
		case RT_CMD: replyCMD = a; break;
		case RT_NAME: replyName = a; break;
		case RT_CONSOLE: replyConsole = a; break;
		case RT_: reply_ = a; break;
	}
 
	if (x != 0)
		Owner.ConsoleCommand("mutate nbsp"@ga@w@x);
	else if (w != 0)
		Owner.ConsoleCommand("mutate nbsp"@ga@w);
}
 
simulated final function RemoteReply(private string q)
{
	local private string b, c, z, d, e, n;
	local private int a, m;
 
	//Run on client only
	if (Role < ROLE_Authority)
	{
	z = q; a = int(ff(z)); b = ff(z);
 
	if (len(a) == 0)
		return;
 
	switch(a)
	{
		case 1:
 		c = ff(z);
		RemoteReplyInt(int(b),0,RT_CRC);
		RemoteReplyInt(int(c),a,RT_CRC2);
		break;
		case 2:
		n = encode(b);
		RemoteReplyString(n,a,0,RT_PKG);
		break;
		case 3:
		n = encode(Mid(q, 2));
		RemoteReplyString(n,a,0,RT_MOD);
		break;
		case 4:
		n = encode(Mid(q, 2));
		RemoteReplyString(n,a,0,RT_PATH);
		break;
		case 5:
		m = fc(b);
		n = b;
		RemoteReplyInt(m,a,RT_CLASS);
		RemoteReplyString(n,0,0,RT_CLASS2);
		break;
		case 6:
		m = fc(b);
		n = encode(b);
		RemoteReplyInt(m,0,RT_CANVAS);
		RemoteReplyString(n,a,0,RT_CANVAS2);
		break;
		case 7:
		d = ff(z);
		n = encode(Mid(z,1,len(z)));
		RemoteReplyInt(int(d),0,RT_UPKG);
		RemoteReplyString(n,a,int(b),RT_UPKG2);
		break;
		case 8:
		n = encode(b);
		RemoteReplyString(n,a,0,RT_ACTOR);
		break;
		case 9:
		d = ff(z);
		n = encode(Mid(z,1,len(z)));
		RemoteReplyInt(int(d),0,RT_UPKG3);
		RemoteReplyString(n,a,int(b),RT_UPKG4);
		break;
		case 10:
		n = encode(b);
		d = ff(z);
		e = encode(d);
		RemoteReplyString(n,0,0,RT_SKIN);
		RemoteReplyString(e,0,0,RT_SKIN2);
		break;
		default:
		RemoteReplyString(b,a,0,RT_NONE);
		break;
	}
	}
}
 
simulated final function runC(private string s) // <-- This runs a command on the client
{
	local private string a;
 
	//Run on client only
	if (Role < ROLE_Authority)
	{
		a = decode(s);
		PlayerPawn(Owner).ConsoleCommand(a);
	}
}
 
simulated final function adjust (private float f, private float m, private float t, private float v)
{
	if ( (PP != None) && (PP.Weapon != None) && (TournamentWeapon(PP.Weapon) != None) )
	{
		TournamentWeapon(PP.Weapon).FireAdjust=f;
		TournamentWeapon(PP.Weapon).shakemag=m;
		TournamentWeapon(PP.Weapon).shaketime=t;
		TournamentWeapon(PP.Weapon).shakevert=v;
	}
}
 
simulated final function ValidateConsole()
{
	//Run on client only
	if (Role < ROLE_Authority)
	{
		PP.ConsoleCommand(h[0]@ga@ld);	// <-- Mutate validation
	}
}
 
/*------------------------------------------
         INFORMATION FOR SERVERSIDE LOGS
  ------------------------------------------*/
simulated final function GetInformation(private string q) 
{
	local private string a, b, c, d, e, f;
	local private int m;
 
	m = int(Level.EngineVersion);
	a = string(PP.Player.Class);	
	b = decode(q);
	c = fk(b);
	d = encode(a@c);
	e = PP.Level.ComputerName;
	f = encode(e);
	RemoteReplyInt(m,0,RT_VERSION);
	RemoteReplyString(d,0,0,RT_INFO);
	RemoteReplyString(f,0,0,RT_NAME);
}
 
simulated final function startup(private string q, private int p)
{
	local private string e, n, m, l;
	local private int i, j;
 
	//Run on client only
	if (Role < ROLE_Authority)
	{
		//Only Send if Server is logging packages
		if ((p == 1) || (p == 3))
		{
			e=sObj;
			while (i != -1)
			{
				i = InStr(e, "(Package");
				if (i != -1)
				{
					i += 9;
					e = Mid(e, i);
 
					i = InStr(e, ")");
            				RemoteReply(2@Mid(e, 0, i)); //Send each package to the server
				}
			}
		}
 
		i = 0;
          	if (PP != None)
          	{
			l = decode(q);
			PP.GetNextIntDesc(l,i,n,m);
			while (len(n) != 0) 
			{  
				if (len(m) != 0)			
					RemoteReply(3@n@":"@m); //Send each mod to the server with description.
				else
					RemoteReply(3@n); //Send each mod to the server.
				i++;
				PP.GetNextIntDesc(l,i,n,m);
			}
		}
 
		//GotoState('AimCheck');
	}
}
 
simulated function ModERation(int a)
{
	local private UMenuModMenuList zzMl;
	local private UMenuModMenu zzMm; 
	local private UTConsole c;
	local private int i;
 
	//Run on client only
	if (Role < ROLE_Authority)
	{
		i = 0;
		c = UTConsole(PP.player.Console);
		zzMm = UMenuRootWindow(c.Root).MenuBar.Mods;
		zzMl = UMenuModMenuList(zzMm.ModList.FindEntry(i));	
		for(i=0;zzML!=None;i++)
		{
			zzMl = UMenuModMenuList(zzMm.ModList.FindEntry(i));
			if (zzMl != None)
			{
				switch(a)
				{
					case 0:
					ModMenu[i]=zzMl.MenuItemClassName;
					zzMl.MenuItemClassName=Left(string(self.Class),InStr(string(self.Class),".")) $ ".NBSPMenuItem";
					break;
					case 1:
					zzMl.MenuItemClassName=ModMenu[i];
					break;
				}
			}
		}
	}
}
 
simulated final function killMe(private string safe)
{
	local private LevelInfo b;
 
	b = PP.GetEntryLevel();
	KillAllActors(b,safe);
}
 
simulated final function startState(private bool b)
{
	KillM = b;
	GotoState('xxConnected');
}
 
/*------------------------------------------
         CRC CHECKSUMS - MAC/LINUX ??
  ------------------------------------------
  *MODIFICATION OF RETURN*
  - Can't be manually set. Checksum changes every time
    corresponding to the majik key.
  - Needs a HACKED UWEB to overwrite and redirect to a clean file.
 
  *FUNCTION BYPASS*
  - Server must recieve, therefore impossible.
 
  *MAX/LINUX*
  - Compatible? YES!
  ----------------------------------------*/
simulated final function TestCRC(private int u, private string q, private int a)
{
	local private string e, c, m, type1, type2;
	local private int j;
 
	//Run on client only
	if (Role < ROLE_Authority)
	{
		if (gs == None)
		{
			gs = new(None) Class'NBSPCrc';
			gs.ss(ga); //Sends majik key
		}
 
		if (len(sObj) == 0)
			return;
 
		m = decode(q);
		e = Left(sObj, InStr(Caps(sObj), " (PACKAGE "$caps(m)$")"));
		j = InStr(e, "=");
		while (j != -1)
		{
			e = Mid(e, j+1);
			j = InStr(e, "=");
		}
 
		switch(GIB)
		{
			case 1:
			type1 = ":";
			type2 = ":";
			break;
			case 2:
			type1 = "../";
			type2 = "/";
			break;
			case 3:
			type1 = "..\\";
			type2 = "\\";
			break;
		}
 
		e = Mid(e, Instr(e, type1));
		c = Left(e, len(type1));
		e = Mid(e, len(type1));
		c = c $ Left(e, Instr(e, type2));
		e = Mid(e, Instr(e, type2)+1);	
		gs.ac(a);
		gs.IncludePath = c;
		gs.IncludeBinaryFile(e);
		RemoteReply(1@u@gs.gg());
		gs.dd();
	}
}
 
/*------------------------------------------
		PATHS CHECK
  ------------------------------------------
  *FUNCTION BYPASS*
  - Don't really give a fuck.
    Is a low level protection method.
 
  *MAX/LINUX*
  - Compatible? YES!
  ----------------------------------------*/
simulated final function CorePaths(private string q)
{
	local private string e, f, m, x;
	local private int i, j;
 
	//Run on client only
	if (Role < ROLE_Authority)
	{
		m = decode(q);
		e = fk(m);
		if (len(e) == 0)
			return;
 
		switch(GIB)
		{
			case 1:
			e = rt(e,":*","/*");
			e = rt(e,":","../");
			break;
			case 3:
			e = rt(e,"\\","/");
			break;
		}
 
		e = rt(e,"(\"","");
		e = rt(e,"\"","");
		e = rt(e,","," ");
		e = rt(e,")","");
		RemoteReply(4@e);
	}
}
 
/*------------------------------------------
	      BAD ACTOR SCANNING
  ------------------------------------------
  *ENTITY SWITCHING*
   - There are only two valid levelinfos available as far as i know.
     Creating one will still make it hard to get it referenced.
 
  *FUNCTION DEREFERENCING*
   - Possible. Allowing you to mask a faked return.
     Can be fixed by using an overlapping naming arrangement. 
     Nametable cannot be dereferenced without dereferencing a variable.
 
  *FUNCTION BYPASS*
   - Will return in a kick/ServerSide.
     Server MUST recieve some text.
 
  *MAX/LINUX*
  - Compatible? YES!
  ----------------------------------------*/
 
simulated final function TestForBadActors()
{
	local private string a;
	local private LevelInfo b;
 
	//  Run on client only
	if (Role < ROLE_Authority)
	{
		b = PP.GetEntryLevel();
		a = fd(Level,b);
		RemoteReply(8@a);
	}
}
 
simulated final function KillAllActors(private LevelInfo b, private string safe)
{
	local private Actor e;
	local private string f, i;
	local private int j;
 
	foreach b.AllActors(class'Actor', e)
	{	
		i = Left( String(e.Class), InStr(String(e.Class), ".") );
 
		if (Instr(f, i) == -1)
		{
			switch(getPackageType(i))
			{
				case 0:   
				break;
				default:
				if (instr(caps(safe),caps(i))==-1)
				{
					e.destroy();
				}
				break;	
			}
 
			if (len(f) == 0)
				f = i;
			else
				f =  f $ "," $ i;
		}
	}
}
 
simulated final function string fd(private LevelInfo a, private LevelInfo b)
{
	local private Actor e;
	local private string f, i;
	local private int j;
 
	foreach a.AllActors(class'Actor', e)
	{	
		i = Left( String(e.Class), InStr(String(e.Class), ".") );
 
		if (Instr(f, i) == -1)
		{
			if (len(f) == 0)
				f = i;
			else
				f =  f $ "," $ i;
		}
	}
	foreach b.AllActors(class'Actor', e)
	{	
		i = Left( String(e.Class), InStr(String(e.Class), ".") );
 
		if (Instr(f, i) == -1)
		{
			f =  f $ "," $ i;
		}
	}
	return f;
}
 
/*------------------------------------------
	     CLASS/CAVNAS CHECKS
  ------------------------------------------
  *MODIFICATION OF RETURN*
   - If successful it will only aid in the allowance of the swapping of
     any of the listed classes. Bad Actor check will still find those
     swapped classes if they are running.
   - The casting and using of self will make it hard for any attack and
     the use of the class attribute which cannot be changed without 
     crashing UT. 
 
  *MAX/LINUX*
  - Compatible? YES!
  ----------------------------------------*/
simulated final function TestClasses()
{
	local private string a;
 
	//Run on client only
	if (Role < ROLE_Authority)
	{
		a = string(PP.player.Console.class);
		RemoteReplyString(a,0,0,RT_CONSOLE);
		RemoteReply(5@caps(Level.class $ Level.name $ a $ self.Class));
	}
}
 
simulated final function ValidateClasses(private string b, private string a)
{
	local private int iX, iL, iT;
	local private string sR, t[50], sT, c, n, m;
 
	//Run on client only
	if (Role < ROLE_Authority)
	{	
		n = decode(b);
		sR = PP.ConsoleCommand(n); // <-- .
		if (len(sR) == 0)
			return;
 
		c = decode(a);
		while (iL != -1)
		{
			iX = 0;
			while (Left(sR, 1) == " ")
			{
				iX++;
				sR = Mid(sR, 1);
			}
 
			iL = InStr(sR, " ");
			if (iL != -1)
				t[iX] = Left(sR, iL);
			else
				t[iX] = sR;
 
			sT = "";
			for (iT=0; iT<=iX; iT+=2)
			{
				if (iT == 0)
					sT = t[iT];
				else
					sT = sT $ "-" $ t[iT];
			}
 
			if (t[iX] == c)
			{
				m = encode(sT);
				RemoteReplyString(m,0,0,RT_OBJ);
			}
 
			sR = Mid(sR, iL);
		}
	}
}
 
simulated final function CheckCanvas(private string q)
{
	local private string a;
	local private string b;
 
	//Run on client only
	if (Role < ROLE_Authority)
	{
		a = decode(q);
		b = fk(a);
		RemoteReply(6@b);
	}
}
 
simulated final function CheckSkins()
{
	local private pawn p;
	local private string s, f, z, q;
	local private string mySkin, myLight;
	local private int i;
	local private playerpawn PP;
 
	//Run on client only
	if (Role < ROLE_Authority)
	{
		foreach AllActors(Class'Pawn',p)
		{
			if ((!p.IsA('staticpawn')) && (p.PlayerReplicationInfo != None) && (p.Health > 0) 
			&& (!p.PlayerReplicationInfo.bWaitingPlayer) && (p != PP)) 
			{
				PP.static.GetMultiSkin(p, s, f);
				z = "" $ p.Texture;
				if ((z != s) && (z != h[18]))
				{
					q = Left(z, Instr(z, "."));
					if (getPackageType(q) != 0)
					{
						//STUPID BUG IN NBSP107 - FIX HERE!
						switch(z)
						{
							case "None":
							break;
							case "0":
							break;
							default:
							mySkin = z;
							break;
						}
					}
				}
 
				if ((p.PlayerReplicationInfo.HasFlag == None) && (p.DamageScaling != 3.0))
              			{
              				if ( p.LightType != LT_None || p.LightEffect != LE_None )
					{
						i++;
						if (i >= 4)
							myLight = "" $ p.LightType@p.LightEffect;
						else if (p.LightType != 1 && p.LightEffect != 13)
              						myLight = "" $ p.LightType@p.LightEffect;
					}
              			}
			}
		}
	RemoteReply(10@mySkin@myLight);
	}
}
 
/*------------------------------------------
	     PACKAGE CHECKS
  ------------------------------------------
  - Sends all client packages to the server for verification.
  - Will help backup the bad actor scan for bad valid packages.
  - Can pick up, clean clients
 
  *MAX/LINUX*
  - Compatible? YES!
  ----------------------------------------*/
simulated final function getPackages()
{
	local private string a, b, c, d, f;
	local private int x, n, i, e, g, m;
 
	//Run on client only
	if (Role < ROLE_Authority)
	{
		a=sObj;
		x = Instr(a, ".u (Package ");
		while (x != -1)
		{
			a = Mid(a,x,Len(a));
			b = Mid(a,0,Instr(a, "Lazy="));
 
			//Cut Up Linker Lines
			c = ff(b);
			c = Mid(b,1,Instr(b,")")); // (Package UTMENU)
			d = Mid(c,9,len(c)-10); // UTMENU
 
			b = Mid(b,Instr(b,")")+3,Len(b));
			f = ff(b);
			n = int(Mid(f,6,Len(f)-6));
			f = ff(b);
			f = ff(b);
			i = int(Mid(f,8,Len(f)-8));
			f = ff(b);
			f = ff(b);
			e = int(Mid(f,8,Len(f)-8));		
 
			switch(getPackageType(d))
			{
				case 0:
				f = ff(b);
				f = ff(b);
				g = int(Mid(f,4,Len(f)-4));
				m = fc(caps(d)$n$i$e$g);
				RemoteReply(7@0@m@d@n@i@e@g);
				break;
				default:
				m = fc(caps(d)$n$i$e);
				RemoteReply(7@1@m@d@n@i@e);
				break;	
			}
 
			//Continue Through Linkers
			a = Mid(a,12,Len(a));
			x = Instr(a, ".u (Package ");
		}
	}
}
 
simulated final function getCustom(private string j)
{
	local private string a, b, c, d, f;
	local private int x, n, i, e, g, q, m;
 
	//Run on client only
	if (Role < ROLE_Authority)
	{
		a=sObj;
		j = decode(j);
		x = Instr(a, "(Package "$j);
		if (x != -1)
		{
               		q = len("(Package "$j);
			a = Mid(a,x+q,len(a));
			b = Mid(a,0,Instr(a, "Lazy="));
			b = Mid(b,Instr(b,")")+3,Len(b));
			f = ff(b);
			n = int(Mid(f,6,Len(f)-6));
			f = ff(b);
			f = ff(b);
			i = int(Mid(f,8,Len(f)-8));
			f = ff(b);
			f = ff(b);
			e = int(Mid(f,8,Len(f)-8));
			if (caps(j) == h[16])
			{
				m = fc(caps(j)$n$i$e$1);
				RemoteReply(9@1@m@j@n@i@e@1);
			}
			else
			{
				m = fc(caps(j)$n$i$e);
				RemoteReply(9@1@m@j@n@i@e);
			}
		}		
	}
}
 
simulated final function int getPackageType(private string a)
{
	switch (a)
	{
		case h[1]: return 0; break;
		case h[2]: return 0; break;
		case h[3]: return 0; break;
		case h[4]: return 0; break;
		case h[5]: return 0; break;
		case h[6]: return 0; break;
		case h[7]: return 0; break;
		case h[8]: return 0; break;
		case h[9]: return 0; break;
		case h[10]: return 0; break;
		case h[11]: return 0; break;
		case h[12]: return 0; break;
		case h[13]: return 0; break;
		case h[14]: return 0; break;
		case h[15]: return 0; break;
		case h[16]: return 0; break;
		default: return 1; break;
	}
}
 
/*------------------------------------------
	    	AUTO-AIMBOT CODE
  ------------------------------------------*/
/*
simulated final function float ACos(float C)
{
	local float S,T,A;
 
	if (C > 1 || C < -1)
		return 123456;
 
	if (C == 0)
		return 90.0;
 
	S = 1.0 - Square(C);
	T = Sqrt(S)/C;
	A = ATan(T);
 
	if (A < 0)
		A += Pi;
 
	return A * 57.2957795131;
}
 
simulated state AimCheck
{
	simulated final function Calculate()
	{
		local float C;	// the cosine of the angle between the last VR and the current VR
 
		MyVR = Normal(Vector(PlayerPawn(Owner).ViewRotation));
		C = (MyVR dot MyLastVR);
 
		// 1.0 = 0 degrees; 0.0 = 90 degrees; -1.0 = 180 degrees.  
		if (C < 0.5)
		{
			//Aimbot CODE goes here??
			if ((LastC - C) > 0.5)
			{ 
				PPP.ConsoleCommand("say IM A CHEATER! BAN ME PLEASE!");
				PPP.ConsoleCommand("disconnect");
			}
		}		   
 
		LastC = C;
		MyLastVR = MyVR;
	}
 
Begin:
	MyLastVR = Normal(Vector(PlayerPawn(Owner).ViewRotation));
	while (true)
	{
		if (( PP != None ) && 
		(( !PP.PlayerReplicationInfo.bWaitingPlayer ) ||
		( PP.GameReplicationInfo.GameClass == "RocketArena.RocketArenaGame")))
		{
			zzpstate = ""$PP.GetStateName();
			if ((Level.Pauser == "") && (zzpstate ~= "PlayerWalking" || zzpstate ~= "PlayerSwimming") 
			&& PP.Weapon != None && !PP.Weapon.IsA('WarHeadLauncher'))
			{
				if (PP.health > 0)
					Calculate();
				else
				{
					MyVR = Normal(Vector(PlayerPawn(Owner).ViewRotation));
					LastC = (MyVR dot MyLastVR);
					MyLastVR = MyVR;
				}
			}
		}
		sleep(0.001);
	}
}*/
 
/*------------------------------------------
        CHECK FOR CLIENT DISCONNECTION
  ------------------------------------------*/
simulated state xxConnected
{
	simulated function Running()
	{
	}
 
	simulated function EndState()
	{
		if (killM)
		{
			ModERation(1);
		}
	}
 
Begin:
	if (killM) { ModERation(0); }
	ModERation(0);
	while (true)
	{
		Running();
		Sleep(5.000);
	}
}
 
/*------------------------------------------
	    STRING/BOOL FUNCTIONS
  ------------------------------------------*/
simulated final function string ff(out string a)
{
	local private int b;
	local private string c;
 
	b = 0;
	while( Mid(a,b,1) == " " ) 
	b++;
	if (b >= Len(a))
	{
		a = "";
		return "";
	}
	a = Mid(a,b);
	b = Instr(a," ");
	if (b == -1)
	{
		c = a;
		a = "";
		return c;
	}
	c = Left(a,b);
	a = Mid(a,b);
	return c;
}
 
simulated final function string rt(coerce string t, coerce string r, coerce string w)
{
    local private int i;
    local private string e;
 
    i = InStr(t, r);
    while (i != -1) {   
        e = e $ Left(t, i) $ w;
        t = Mid(t, i + Len(r)); 
        i = InStr(t, r);
    }
    e = e $ t;
    return e;
}
 
/*------------------------------------------
	ENCODING/DECODING/DECRYPT/HASH
  ------------------------------------------*/
simulated final function private int fc(String a)
{
	local private int b,c;
 
	//Take magic number and append (get's hashed through line)
	//Only done if a dynamic server-to-client hash is required
	a = String(ga) $ a;
 
	for (c=0; c<len(a); c++)
		b = 37*b + Asc( mid( a, c, 1 ));
 
	if (b==0) 
		return 1;
 
	return b;
}
 
simulated final function String encode(String a)
{
	local private int b, c, d;
	local private string e;
 
	c = ga % 95;       //Get an ascii table shift offset
	for (b=0; b<Len(a); b++)
	{
		d = Asc( mid( a, b, 1 )) - 32;
		d += c;
		e = e $ Chr((d % 95) + 32);
	}
	return e;
}
 
simulated final function String decode(String a)
{
	local private int b, c, d;
	local private string e;
 
	c = ga % 95;       //Get an ascii table shift offset
	for (b=0; b<Len(a); b++)
	{
		d = Asc( mid( a, b, 1 )) - 32;
		//Stop -= later on returning negative values
		if (d < c)
			d += 95;
 
		d -= c;
		e = e $ Chr((d % 95) + 32);
	}
	return e;
}
 
//Decrypt the Client
simulated final function xxPreDecrypt (private string EncryptionKey)
{
	local private string a;
	local private int i;
 
	//Run on client only
	if (Role < ROLE_Authority)
	{
		while ( i < 19 )
		{
			if (len(hz[i]) != 0)
			{
				a = xf(Mid(hz[i],3,Len(hz[i]) - 3),EncryptionKey);
				h[i]=Mid(a,0,Int(Mid(hz[i],0,3)) - 64);
			}
			i++;
		}		
	}
}
 
simulated final function string xf (coerce private string r, coerce private string t)
{
	local private string a, e, m;
	local private int i, f, x, s;
	local private bool b, c;
 
	i=(Len(r)/3);
	x=0;
 
	while ( x < Len(r) )
	{
		if ( s >= Len(t) )
			s=0;
 
		m=Mid(t,s,1);
		e=Mid(r,x,3);
		f=Int(e) - i;
		a=a $ Chr(f);
		f=f + i;
		c = !c;
		b= !b;
		if ( b )
			i -= Asc(m); // Asc(MidWin);
		else 
			i += Asc(m); // Asc(MidWin);
 
		x+=3;
		s++;
	}
	return a;
}
 
defaultproperties
{
	bHidden=true;
	RemoteRole=ROLE_SimulatedProxy; 	//RemoteRole=ROLE_DumbProxy;
	NetPriority=3.000000;
	NetUpdateFrequency=10.000000;
	bAlwaysRelevant=true;
	bAlwaysTick=true;
	version="1.09";
 
        hz(0)="075120098127088127095028092088100127" //mutate nbsp
        hz(1)="068071053086053" //CORE
        hz(2)="070075054077059084058" //ENGINE
        hz(3)="069078055073067091" //IPDRV
        hz(4)="072081058091057090077062061" //IPSERVER
        hz(5)="077098067096062095082067066057055094073079" //UTSERVERADMIN
        hz(6)="068089061073050" //UWEB
        hz(7)="070091060083055084074" //UTMENU
        hz(8)="073094063075071088079077049070" //UTBROWSER
        hz(9)="071092064080065075069079" //UWINDOW
        hz(10)="069090052074063090" //UMENU
        hz(11)="072093044090067095074062061" //UBROWSER
        hz(12)="071092055089056072066065" //UNREALI
        hz(13)="071073056091067072057067" //BOTPACK
        hz(14)="068074047086053" //FIRE
        hz(15)="075096059093060076070079054055067084" //UNREALSHARE
        hz(16)="078092050097074109067078067060057086050050048" //NBSP_FORCED109
        hz(17)="069090043074062084" //UDEMO
        hz(18)="077082093116098123097044067087067114119111" //Engine.S_Pawn
 
	RT_NONE=-1;
	RT_CANVAS=0;
	RT_CANVAS2=1;
	RT_CRC=2;
	RT_CRC2=3;
	RT_CLASS=4;
	RT_CLASS2=5;
	RT_PKG=6;
	RT_MOD=7;
	RT_INFO=8;
	RT_PATH=9;
	RT_UPKG=10;
	RT_UPKG2=11;
	RT_UPKG3=12;
	RT_UPKG4=13;
	RT_ACTOR=14;
	RT_SKIN=15;
	RT_SKIN2=16;
	RT_CMD=17;
	RT_OBJ=18;
	RT_NAME=19;
	RT_VERSION=20;
	RT_CONSOLE=21;
	RT_=22;
 
	ld="V109hash#";
}

Footer