0% found this document useful (0 votes)
10 views2 pages

Anti Cheat APK Method

The document outlines a function for handling player authentication in a gaming context. If a player's custom ID is invalid (less than 22 characters), they are banned for 72 hours and a notification is sent to a Discord webhook. If the custom ID is valid, the function confirms successful player authentication.

Uploaded by

millardkareem
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views2 pages

Anti Cheat APK Method

The document outlines a function for handling player authentication in a gaming context. If a player's custom ID is invalid (less than 22 characters), they are banned for 72 hours and a notification is sent to a Discord webhook. If the custom ID is valid, the function confirms successful player authentication.

Uploaded by

millardkareem
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

handlers.

AuthWithFastMonkeys = function(args) {
var playerData = server.GetUserAccountInfo({
PlayFabId: currentPlayerId
}).UserInfo;

var customId = playerData.CustomIdInfo && playerData.CustomIdInfo.CustomId;

var hardwareId = "1cd12d654e9500e474ee54de1b53924018963499"; // Hardcoded


Hardware ID

var bundleId = "com.Cwmo Modded Game";

if (customId && customId.length < 22) {


var banRequest = {
Bans: [{
PlayFabId: currentPlayerId,
DurationInHours: 72,
Reason: "INVALID ACCOUNT"
}]
};
server.BanUsers(banRequest);

var contentBody = {
"content": null,
"embeds": [
{
"title": "LemonLoader Logs - Anti-Cheat",
"description": "**Custom ID:** " + customId + "\n**Player ID:**
" + currentPlayerId + "\n**Reason:** Failing to authenticate",
"color": 16711680,
"author": {
"name": "PLAYER TRIED TO CHEAT"
},
"fields": [
{
"name": "Player Details",
"value": "```diff\n+ Player ID: " + currentPlayerId + "
logged in\n+ Oculus ID: " + customId + "\n- PlayFab ID: " + currentPlayerId + "\n+
Hardware ID: " + hardwareId + "\n+ Bundle ID: " + bundleId + "\n+ Status: Banned
for 72 hours due to failed authentication\n```"
}
]
}
],
"attachments": []
};

var webhookURL = "YOUR_WEBHOOK_URL";


var method = "POST";
var contentType = "application/json";
var headers = {};

var response = http.request(webhookURL, method,


JSON.stringify(contentBody), contentType, headers);

if (response.status >= 200 && response.status < 300) {


log.info("Ban notification sent to Discord webhook.");
} else {
log.error("Error sending ban notification to Discord: " +
response.status);
}

return { message: "Failing to authenticate. User banned for 72 hours due to


an invalid custom ID." };
} else {
return { message: "Player authentication successful." };
}
};

You might also like