SA:MP Server Exploit[Read]
#1

Hey.

From some testing and updating, I found out a new way hackers can crash most SA:MP servers, they have a certain mod they add to their vehicle or edit their tune menu, and adding the component, will crash the entire server.

There is a way to fix this -
pawn Code:
public OnVehicleMod(playerid,vehicleid,componentid)
{
  return 0;
}
This has been happening to many server's lately, noobs who think they are hackers have a way to crash it.
Reply
#2

It's like having #pragma tabsize 0 in the scipt...
It will be better to check if it's possible to mod vehicle with such component or not and then synchronize it or not.
Reply
#3

Quote:
Originally Posted by CrαcK
It's like having #pragma tabsize 0 in the scipt...
Sorry, what?

Quote:
Originally Posted by CrαcK
It will be better to check if it's possible to mod vehicle with such component or not and then synchronize it or not.
Is that even possible? As the tune menu's are built in GTA:SA.

Are the devs notified of this? There has been many servers that were crashed because of this exploit, it will work on ANY SA:MP server.
Reply
#4

Quote:
Originally Posted by 0xF29323
Quote:
Originally Posted by CrαcK
It's like having #pragma tabsize 0 in the scipt...
Sorry, what?
I mean that having return 0; is the easiest way to avoid crashes(like having no loose identation errors), but components will not be synced, will they?
Quote:

Is that even possible? As the tune menu's are built in GTA:SA.

Are the devs notified of this? There has been many servers that were crashed because of this exploit, it will work on ANY SA:MP server.

For example:
pawn Code:
public OnVehicleMod(playerid,vehicleid,componentid)
{
  new model = GetVehicleModel(vehicleid);
  switch(componentid)
  {
     case 1008: // nitro 5x
     {
       if(IsTransfenderCar(model) || IsWheelOfArchCar(model) || IsLocoLowCar(model)) return 1;
     }
  }
  return 0;
}
Reply
#5

Quote:
Originally Posted by CrαcK
Quote:
Originally Posted by 0xF29323
Quote:
Originally Posted by CrαcK
It's like having #pragma tabsize 0 in the scipt...
Sorry, what?
I mean that having return 0; is the easiest way to avoid crashes(like having no loose identation errors), but components will not be synced, will they?
No, returning 0 means the function will not be called, so your vehicle will not be tuned.

Quote:
Originally Posted by CrαcK
For example:
pawn Code:
public OnVehicleMod(playerid,vehicleid,componentid)
{
  new model = GetVehicleModel(vehicleid);
  switch(componentid)
  {
     case 1008: // nitro 5x
     {
       if(IsTransfenderCar(model) || IsWheelOfArchCar(model) || IsLocoLowCar(model)) return 1;
     }
  }
  return 0;
}
I don't know if that's possible, I never tested it.

I also noticed Official servers like GamerX and AS have OnVehicleMod set to return 0 too.
Reply
#6

My hotfix is worked perfect now
Thank you CrαcK!
Reply
#7

Quote:
Originally Posted by Davee.
My hotfix is worked perfect now
Thank you CrαcK!
I'm also working on one, I'll be releasing it soon.
Reply
#8

Done, http://pawn.pastebin.com/f4359f033
Thanks Davee. for information.
Reply
#9

http://pawn.pastebin.com/f1f6fa468

Small edit to allow any other code to work.
Reply
#10

Quote:
Originally Posted by CrαcK
Done, http://pawn.pastebin.com/f4359f033
Thanks Davee. for information.
I was in the middle of working on one, but glad you finished yours. Thanks!

I highly recommend people read this topic.
Reply
#11

Okay..I get this error after i compile:

Code:
C:\DOCUME~1\daniel\Desktop\SAMPFO~1\sftdm\GAMEMO~1\sam.pwn(429) : error 025: function heading differs from prototype
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
How'd i fix it? Rofl.

Line 429:
pawn Code:
public OnVehicleMod(playerid, vehicleid, componentid)
Do I need to forward it or somthing?
Reply
#12

It seems that you have old includes coming with pawno compiler. Redownload server package.
Reply
#13

Quote:
Originally Posted by [UF
XtreaMeR ]
Okay..I get this error after i compile:

Code:
C:\DOCUME~1\daniel\Desktop\SAMPFO~1\sftdm\GAMEMO~1\sam.pwn(429) : error 025: function heading differs from prototype
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
How'd i fix it? Rofl.

Line 429:
pawn Code:
public OnVehicleMod(playerid, vehicleid, componentid)
Do I need to forward it or somthing?
Your pawn compiler isn't updated, use the 0.2X version on the server package.
Reply
#14

Quote:
Originally Posted by 0xF29323
Quote:
Originally Posted by [UF
XtreaMeR ]
Okay..I get this error after i compile:

Code:
C:\DOCUME~1\daniel\Desktop\SAMPFO~1\sftdm\GAMEMO~1\sam.pwn(429) : error 025: function heading differs from prototype
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
How'd i fix it? Rofl.

Line 429:
pawn Code:
public OnVehicleMod(playerid, vehicleid, componentid)
Do I need to forward it or somthing?
Your pawn compiler isn't updated, use the 0.2X version on the server package.
What do you think i'm using? 0.1's? rofl.
Reply
#15

Quote:
Originally Posted by [UF
XtreaMeR ]
Quote:
Originally Posted by 0xF29323
Quote:
Originally Posted by [UF
XtreaMeR ]
Okay..I get this error after i compile:

Code:
C:\DOCUME~1\daniel\Desktop\SAMPFO~1\sftdm\GAMEMO~1\sam.pwn(429) : error 025: function heading differs from prototype
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
How'd i fix it? Rofl.

Line 429:
pawn Code:
public OnVehicleMod(playerid, vehicleid, componentid)
Do I need to forward it or somthing?
Your pawn compiler isn't updated, use the 0.2X version on the server package.
What do you think i'm using? 0.1's? rofl.
Your obviously not using the 0.2X pawn compiler, otherwise you wouldn't get that error.
Reply
#16

Quote:
Originally Posted by [UF
XtreaMeR ]
Quote:
Originally Posted by 0xF29323
Quote:
Originally Posted by [UF
XtreaMeR ]
Okay..I get this error after i compile:

Code:
C:\DOCUME~1\daniel\Desktop\SAMPFO~1\sftdm\GAMEMO~1\sam.pwn(429) : error 025: function heading differs from prototype
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
you are using the 0.2.2 samp includes redownload the server and replace the 0.2.2 includes with the 0.2x includes
How'd i fix it? Rofl.

Line 429:
pawn Code:
public OnVehicleMod(playerid, vehicleid, componentid)
Do I need to forward it or somthing?
Your pawn compiler isn't updated, use the 0.2X version on the server package.
What do you think i'm using? 0.1's? rofl.
Reply
#17

I'm using the 0.2x compiler -.-'
Reply
#18

Quote:
Originally Posted by [UF
XtreaMeR ]
I'm using the 0.2x compiler -.-'
Update your a_samp include, just re-download the server package and replace all the includes.
Reply
#19

Thanks to release my little edited script! Clever. You didn't have premission for this.. :/
Reply
#20

Wow, i just failed right there. Nevermind.
Reply


Forum Jump:


Users browsing this thread: