how will ya

Started by MEGAMIND, Jul 04, 2018, 12:01 PM

Previous topic - Next topic

MEGAMIND

hey everyone how can we do a function that if a player join and he has an .asi file or any other external stuff running behind him
so how we will be able to kick him right when he joins?

vitogta

https://forum.vc-mp.org/?topic=5872.0
QuoteAdded a GetPlayerModuleList plugin call to get a list of loaded modules (i.e. DLLs) on a player's game without crashing the client. Use the OnPlayerModuleList plugin callback to receive the list and parse it.
so use player.RequestModuleList() in onplayerjoin and use event OnPlayerModuleList(player, str) to get list of files

But note - after all servers will start to kick players for .asi files obviously there will be no any player with .asi files in his report log and cheaters will use spoofing to send to server fake data to hide their .asi/.dlls or another methods.

MEGAMIND

Quote from: vitogta on Jul 04, 2018, 12:32 PMhttps://forum.vc-mp.org/?topic=5872.0
QuoteAdded a GetPlayerModuleList plugin call to get a list of loaded modules (i.e. DLLs) on a player's game without crashing the client. Use the OnPlayerModuleList plugin callback to receive the list and parse it.
so use player.RequestModuleList() in onplayerjoin and use event OnPlayerModuleList(player, str) to get list of files

But note - after all servers will start to kick players for .asi files obviously there will be no any player with .asi files in his report log and cheaters will use spoofing to send to server fake data to hide their .asi/.dlls or another methods.
ok i got ur point so how will we still able to get him kicked when we get to know using your system that he/she uses .asi??

vitogta

function onPlayerJoin(player){
player.RequestModuleList();
}
function onPlayerModuleList(player, list){
local rows = ::split(list, "\n");
foreach(row in rows){
row = row.tolower();
local row_search = ::regexp(@"\w+\.asi$").search(row);
if(null != row_search){
local asi = row.slice(row_search.begin,row_search.end);
if("mp3dec.asi" != asi){
player.Kick();
return;
}
}
}
}

MEGAMIND

Quote from: vitogta on Jul 05, 2018, 09:43 AMfunction onPlayerJoin(player){
player.RequestModuleList();
}
function onPlayerModuleList(player, list){
local rows = ::split(list, "\n");
foreach(row in rows){
row = row.tolower();
local row_search = ::regexp(@"\w+\.asi$").search(row);
if(null != row_search){
local asi = row.slice(row_search.begin,row_search.end);
if("mp3dec.asi" != asi){
player.Kick();
return;
}
}
}
}
it kicks without any reason i dont even have an .asi , plus i removed that mp3dec.asi to other asi name which still gets me kicked even other players get kicked without any reason

vitogta

Quote from: MEGAMIND on Jul 05, 2018, 10:31 AMit kicks without any reason i dont even have an .asi , plus i removed that mp3dec.asi to other asi name which still gets me kicked even other players get kicked without any reason
then there is some .asi files, i dont know. you can check reason in such way:
if("mp3dec.asi" != asi){
 Message(player.Name +" kicked for "+ asi);
 player.Kick();