[Guide]Exploits -logic, examples, solutions

09/28/2012 23:02 pro4never#16
Quote:
Originally Posted by -impulse- View Post
It wouldn't work like that given you would use an unsigned type (I know it's just an example, but still give a proper example)

In CO's case a int would work fine with the given example like this:

public int Money
{
get { return _money; }
set { value < 0? _money = 0: _money = value; }
}

Wow... that's what I get for typing things out in the middle of the night. I'm aware of that but just had a very blonde moment. Thanks for the corrections. Accuracy ftw!
10/21/2012 16:46 marlyandedsel#17
how about this one

PHP Code:
public uint ConquerPoints
        
{
            
get { return _conquerpoints; }
            
set 
            
{
                if (
value <= 0)
                 
value 0;
                
_conquerpoints value;
                if (
EntityFlag == EntityFlag.Player)
                    
Update(Network.GamePackets.Update.ConquerPoints, (uint)valuefalse);
            }
        } 
10/21/2012 16:59 go for it#18
mate it doesn't really matter the conquer points being uint or int , both are exploitable
the uint can be exploited by negative cash like i showed in funnyco
the int gives underflow(what u name it ?) the one i showed in this thread

so it doesn't really matter being uint or int , what matters is to add checks on it
10/21/2012 17:16 marlyandedsel#19
i always use something like this when it involve conquerpoints or silver

example:
PHP Code:
 if (client.Entity.Money >= 1000)
                                                {
                                                    
client.Entity.Money -= 1000;
                                                    
client.Entity.Teleport(60003272);
                                                }
                                                else
                                                {
                                                    
dialog.Text("You need 1000 silvers to be able to enter the jail.");
                                                    
dialog.Option("Alright."255);
                                                } 
is it exploitable?
10/21/2012 17:44 I don't have a username#20
Nope. Also why do you check the entity flag for your conquer points? Aren't they only available to players anyways? Otherwise your source must be coded a hell weird and wrong way o.o
10/21/2012 17:59 marlyandedsel#21
Quote:
Originally Posted by I don't have a username View Post
Nope. Also why do you check the entity flag for your conquer points? Aren't they only available to players anyways? Otherwise your source must be coded a hell weird and wrong way o.o
ops yea sorry with it, it was just in my backup source i have removed it already...