Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Battle of the Immortals
You last visited: Today at 13:10

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Pettab_ Petinfo BLOB get info

Discussion on Pettab_ Petinfo BLOB get info within the Battle of the Immortals forum part of the MMORPGs category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Feb 2013
Posts: 67
Received Thanks: 4
Pettab_ Petinfo BLOB get info

Hello , I need litlle help with PetBug find code :
Code:
CREATE DEFINER=`root`@`localhost` FUNCTION `getpetinteger`(PET_GET_ID BIGINT UNSIGNED, PET_GET_TYPE INT) RETURNS int(11)
    READS SQL DATA
    DETERMINISTIC
BEGIN
	DECLARE PET_VIT INTEGER UNSIGNED;
	DECLARE PET_INT INTEGER UNSIGNED;
	DECLARE PET_STR INTEGER UNSIGNED;
	DECLARE PET_SPR INTEGER UNSIGNED;
	DECLARE PET_DEX INTEGER UNSIGNED;
	SET PET_VIT = 0;
	SET PET_INT = 0;
	SET PET_STR = 0;
	SET PET_SPR = 0;
	SET PET_DEX = 0;
	SELECT CONV(CONCAT(SUBSTR(hex(PetInfo),INSTR(SUBSTR(hex(PetInfo),43), "3F00")+10,2),SUBSTR(hex(PetInfo),INSTR(SUBSTR(hex(PetInfo),43), "3F00")+8,2),SUBSTR(hex(PetInfo),INSTR(SUBSTR(hex(PetInfo),43), "3F00")+6,2),SUBSTR(hex(PetInfo),INSTR(SUBSTR(hex(PetInfo),43), "3F00")+4,2)),16,10) INTO PET_VIT FROM pettab_sg WHERE PetID = PET_GET_ID;
	RETURN PET_VIT;
	ELSEIF PET_GET_TYPE = 2 THEN
	SELECT CONV(CONCAT(SUBSTR(hex(PetInfo),INSTR(SUBSTR(hex(PetInfo),43), "3F00")+50,2),SUBSTR(hex(PetInfo),INSTR(SUBSTR(hex(PetInfo),43), "3F00")+48,2),SUBSTR(hex(PetInfo),INSTR(SUBSTR(hex(PetInfo),43), "3F00")+46,2),SUBSTR(hex(PetInfo),INSTR(SUBSTR(hex(PetInfo),43), "3F00")+44,2)),16,10) INTO PET_INT FROM pettab_sg WHERE PetID = PET_GET_ID;
	RETURN PET_INT;
	ELSEIF PET_GET_TYPE = 3 THEN
	SELECT CONV(CONCAT(SUBSTR(hex(PetInfo),INSTR(SUBSTR(hex(PetInfo),43), "3F00")+90,2),SUBSTR(hex(PetInfo),INSTR(SUBSTR(hex(PetInfo),43), "3F00")+88,2),SUBSTR(hex(PetInfo),INSTR(SUBSTR(hex(PetInfo),43), "3F00")+86,2),SUBSTR(hex(PetInfo),INSTR(SUBSTR(hex(PetInfo),43), "3F00")+84,2)),16,10) INTO PET_STR FROM pettab_sg WHERE PetID = PET_GET_ID;
	RETURN PET_STR;
	ELSEIF PET_GET_TYPE = 4 THEN
	SELECT CONV(CONCAT(SUBSTR(hex(PetInfo),INSTR(SUBSTR(hex(PetInfo),43), "3F00")+130,2),SUBSTR(hex(PetInfo),INSTR(SUBSTR(hex(PetInfo),43), "3F00")+128,2),SUBSTR(hex(PetInfo),INSTR(SUBSTR(hex(PetInfo),43), "3F00")+126,2),SUBSTR(hex(PetInfo),INSTR(SUBSTR(hex(PetInfo),43), "3F00")+124,2)),16,10) INTO PET_SPR FROM pettab_sg WHERE PetID = PET_GET_ID;
	RETURN PET_SPR;
	ELSEIF PET_GET_TYPE = 5 THEN
	SELECT CONV(CONCAT(SUBSTR(hex(PetInfo),INSTR(SUBSTR(hex(PetInfo),43), "3F00")+170,2),SUBSTR(hex(PetInfo),INSTR(SUBSTR(hex(PetInfo),43), "3F00")+168,2),SUBSTR(hex(PetInfo),INSTR(SUBSTR(hex(PetInfo),43), "3F00")+166,2),SUBSTR(hex(PetInfo),INSTR(SUBSTR(hex(PetInfo),43), "3F00")+164,2)),16,10) INTO PET_DEX FROM pettab_sg WHERE PetID = PET_GET_ID;
	RETURN PET_DEX;
	END IF;
END

CREATE DEFINER=`root`@`localhost` FUNCTION `getpetfloat`(PET_INTEGER INTEGER UNSIGNED ) RETURNS int(11)
    READS SQL DATA
    DETERMINISTIC
BEGIN
	RETURN SIGN(PET_INTEGER) *  (1.0 + (PET_INTEGER &  0x007FFFFF) * POWER(2.0, -23)) * POWER(2.0, (PET_INTEGER & 0x7f800000) / 0x00800000 - 127);
END

SELECT RoleID, getpetfloat(getpetinteger(PetID,1)) AS 'VIT', getpetfloat(getpetinteger(PetID,2)) AS 'INT', getpetfloat(getpetinteger(PetID,3)) AS 'STR', getpetfloat(getpetinteger(PetID,4)) AS 'SPR', getpetfloat(getpetinteger(PetID,5)) AS 'DEX' FROM pettab_sg;
Credit to LikeReally

But this code getting just started Value for Vit/Str/Int...
if you lvl pet or someone use PetBug hack they are not found in Pettab_sg, bcz code getting start value from pet info.

If anyone can little help with this.
Thank you
NerkoWoI is offline  
Old 08/28/2024, 13:58   #2
 
elite*gold: 0
Join Date: Nov 2014
Posts: 80
Received Thanks: 5
Talking

Quote:
Originally Posted by NerkoWoI View Post
Hello , I need litlle help with PetBug find code :
Code:
CREATE DEFINER=`root`@`localhost` FUNCTION `getpetinteger`(PET_GET_ID BIGINT UNSIGNED, PET_GET_TYPE INT) RETURNS int(11)
    READS SQL DATA
    DETERMINISTIC
BEGIN
	DECLARE PET_VIT INTEGER UNSIGNED;
	DECLARE PET_INT INTEGER UNSIGNED;
	DECLARE PET_STR INTEGER UNSIGNED;
	DECLARE PET_SPR INTEGER UNSIGNED;
	DECLARE PET_DEX INTEGER UNSIGNED;
	SET PET_VIT = 0;
	SET PET_INT = 0;
	SET PET_STR = 0;
	SET PET_SPR = 0;
	SET PET_DEX = 0;
	SELECT CONV(CONCAT(SUBSTR(hex(PetInfo),INSTR(SUBSTR(hex(PetInfo),43), "3F00")+10,2),SUBSTR(hex(PetInfo),INSTR(SUBSTR(hex(PetInfo),43), "3F00")+8,2),SUBSTR(hex(PetInfo),INSTR(SUBSTR(hex(PetInfo),43), "3F00")+6,2),SUBSTR(hex(PetInfo),INSTR(SUBSTR(hex(PetInfo),43), "3F00")+4,2)),16,10) INTO PET_VIT FROM pettab_sg WHERE PetID = PET_GET_ID;
	RETURN PET_VIT;
	ELSEIF PET_GET_TYPE = 2 THEN
	SELECT CONV(CONCAT(SUBSTR(hex(PetInfo),INSTR(SUBSTR(hex(PetInfo),43), "3F00")+50,2),SUBSTR(hex(PetInfo),INSTR(SUBSTR(hex(PetInfo),43), "3F00")+48,2),SUBSTR(hex(PetInfo),INSTR(SUBSTR(hex(PetInfo),43), "3F00")+46,2),SUBSTR(hex(PetInfo),INSTR(SUBSTR(hex(PetInfo),43), "3F00")+44,2)),16,10) INTO PET_INT FROM pettab_sg WHERE PetID = PET_GET_ID;
	RETURN PET_INT;
	ELSEIF PET_GET_TYPE = 3 THEN
	SELECT CONV(CONCAT(SUBSTR(hex(PetInfo),INSTR(SUBSTR(hex(PetInfo),43), "3F00")+90,2),SUBSTR(hex(PetInfo),INSTR(SUBSTR(hex(PetInfo),43), "3F00")+88,2),SUBSTR(hex(PetInfo),INSTR(SUBSTR(hex(PetInfo),43), "3F00")+86,2),SUBSTR(hex(PetInfo),INSTR(SUBSTR(hex(PetInfo),43), "3F00")+84,2)),16,10) INTO PET_STR FROM pettab_sg WHERE PetID = PET_GET_ID;
	RETURN PET_STR;
	ELSEIF PET_GET_TYPE = 4 THEN
	SELECT CONV(CONCAT(SUBSTR(hex(PetInfo),INSTR(SUBSTR(hex(PetInfo),43), "3F00")+130,2),SUBSTR(hex(PetInfo),INSTR(SUBSTR(hex(PetInfo),43), "3F00")+128,2),SUBSTR(hex(PetInfo),INSTR(SUBSTR(hex(PetInfo),43), "3F00")+126,2),SUBSTR(hex(PetInfo),INSTR(SUBSTR(hex(PetInfo),43), "3F00")+124,2)),16,10) INTO PET_SPR FROM pettab_sg WHERE PetID = PET_GET_ID;
	RETURN PET_SPR;
	ELSEIF PET_GET_TYPE = 5 THEN
	SELECT CONV(CONCAT(SUBSTR(hex(PetInfo),INSTR(SUBSTR(hex(PetInfo),43), "3F00")+170,2),SUBSTR(hex(PetInfo),INSTR(SUBSTR(hex(PetInfo),43), "3F00")+168,2),SUBSTR(hex(PetInfo),INSTR(SUBSTR(hex(PetInfo),43), "3F00")+166,2),SUBSTR(hex(PetInfo),INSTR(SUBSTR(hex(PetInfo),43), "3F00")+164,2)),16,10) INTO PET_DEX FROM pettab_sg WHERE PetID = PET_GET_ID;
	RETURN PET_DEX;
	END IF;
END

CREATE DEFINER=`root`@`localhost` FUNCTION `getpetfloat`(PET_INTEGER INTEGER UNSIGNED ) RETURNS int(11)
    READS SQL DATA
    DETERMINISTIC
BEGIN
	RETURN SIGN(PET_INTEGER) *  (1.0 + (PET_INTEGER &  0x007FFFFF) * POWER(2.0, -23)) * POWER(2.0, (PET_INTEGER & 0x7f800000) / 0x00800000 - 127);
END

SELECT RoleID, getpetfloat(getpetinteger(PetID,1)) AS 'VIT', getpetfloat(getpetinteger(PetID,2)) AS 'INT', getpetfloat(getpetinteger(PetID,3)) AS 'STR', getpetfloat(getpetinteger(PetID,4)) AS 'SPR', getpetfloat(getpetinteger(PetID,5)) AS 'DEX' FROM pettab_sg;
Credit to LikeReally

But this code getting just started Value for Vit/Str/Int...
if you lvl pet or someone use PetBug hack they are not found in Pettab_sg, bcz code getting start value from pet info.

If anyone can little help with this.
Thank you
IT'S NOT WORKING PROPERLY. THE PET CAN STILL BE BROKEN
terrain is offline  
Thanks
1 User
Old 08/28/2024, 14:32   #3
 
elite*gold: 0
Join Date: Feb 2013
Posts: 67
Received Thanks: 4
I know for this, but thank you for answered. Yeah its same you cant get right value from blob
NerkoWoI is offline  
Old 08/28/2024, 14:41   #4
 
elite*gold: 0
Join Date: Nov 2014
Posts: 80
Received Thanks: 5
Red face

Quote:
Originally Posted by NerkoWoI View Post
I know for this, but thank you for answered. Yeah its same you cant get right value from blob
FOR NORMAL OPERATION YOU NEED TO PUT PROTECTION AGAINST PACKET SPOOFING, NOT A USELESS PROCEDURE IN THE DATABASE

Quote:
Originally Posted by NerkoWoI View Post
I know for this, but thank you for answered. Yeah its same you cant get right value from blob
YOU SHOULD WRITE TO NECROS AND HE'LL HAVE INFORMATION ON YOUR QUESTION.
terrain is offline  
Old 08/28/2024, 14:56   #5
 
elite*gold: 0
Join Date: Jan 2023
Posts: 23
Received Thanks: 30
Create a Sniff -> Filter the AddPoints packet -> Check the attribute points received on the packet -> Boom, catched
BOILegends is offline  
Thanks
2 Users
Old 08/28/2024, 15:10   #6
 
elite*gold: 0
Join Date: Feb 2013
Posts: 67
Received Thanks: 4
Quote:
Originally Posted by BOILegends View Post
Create a Sniff -> Filter the AddPoints packet -> Check the attribute points received on the packet -> Boom, catched
Thank you mate, but can you little explain please bud ?
NerkoWoI is offline  
Old 09/24/2024, 01:16   #7
 
elite*gold: 0
Join Date: Apr 2015
Posts: 157
Received Thanks: 88
01010110010011001010100010010011010110010101110101 01101010101010
LikeReally is offline  
Thanks
3 Users
Old 09/24/2024, 11:24   #8
 
elite*gold: 0
Join Date: Jan 2023
Posts: 23
Received Thanks: 30
Quote:
Originally Posted by NerkoWoI View Post
Thank you mate, but can you little explain please bud ?
you need create a packet sniff and filter the packet id 17510 that is MSG_PET_C2S_ADD_POINT and just check how many points the user added on the pet

this is my code to detect and ban pet
Quote:
using System;
using System.Collections.Generic;
using System.Data.Entity.Migrations;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using HellYeah.Core;
using HellYeah.Database;
using HellYeah.Modules.Cfg;

namespace HellYeah.PacketProcessing
{
class PetBugFix : Message
{
private uint roleid;
private ushort realm;
public PetBugFix(ProcessInComingPacket br) : base(br)
{
roleid = br.RoleID;
realm = br.Realm;
}

public override void Decode()
{
try
{
using (var br = new BinaryReader(new MemoryStream(GetData())))
{
//var role = ResourcesManager.GetRoleDatabase((int)roleid);
var PetDBID = br.ReadUInt64();
var STRAdd = br.ReadUInt16();
var VITAdd = br.ReadUInt16();
var DEXAdd = br.ReadUInt16();
var INTAdd = br.ReadUInt16();
var SPRAdd = br.ReadUInt16();
var Total = STRAdd + VITAdd + DEXAdd + INTAdd + SPRAdd;
Log.Pet(string.Format("RoleID:[" + roleid + "] PetDBID:{0} Str:{1} Vit:{2} Dex:{3} Int:{4} Spr:{5} Total:{6}",PetDBID, STRAdd, VITAdd, DEXAdd, INTAdd, SPRAdd, Total));
// Console.WriteLine();
if (Total > 1000)
{

Log.Pet($"RoleID:{roleid} PetDbId:{PetDBID}, Added a Total of [{Total}] TRIED TO BUG PET BUT I HAVE STOPPED HIM AND MOVED THE BUGGED PET TO THE TABLE CALLED 'pettab_sg_banned'\n");





if (PetBugFixCfg.AutoBanAccount.ToLower() == "true")
{
DatabaseManager.BanAccount(roleid.ToString());
//FormManager.GetForm<FM_Main>(new FM_Main()).AddRichText($"RoleID:{roleid} PetDbId:{PetDBID} GOT BANNED\n");
Log.Pet($"RoleID:{roleid} PetDbId:{PetDBID} GOT BANNED");
}



if (PetBugFixCfg.AutoBanPet.ToLower() == "true")
{
var accountid = ResourcesManager.GetRoleDatabase((int)roleid).Acco untID;
CommandManager.KickAccount((int)accountid, Msg_KickClient.Kick_CheatDetectorReqKick);

using (var context = new Database.shenguiEntities())
{
context.Configuration.AutoDetectChangesEnabled = false;
context.Configuration.LazyLoadingEnabled = false;
context.Database.ExecuteSqlCommand(
"CREATE TABLE if not exists `pettab_sg_banned` (`PetID` bigint(20) NOT NULL,`RoleID` int(10) unsigned NOT NULL,`PetInfo` blob,PRIMARY KEY(`PetID`),KEY `RoleID` (`RoleID`)) ENGINE = InnoDB DEFAULT CHARSET = latin1; ");

var result = context.pettab_sg.Find((long)PetDBID);

context.pettab_sg_banned.AddOrUpdate(new pettab_sg_banned()
{
PetID = result.PetID,
PetInfo = result.PetInfo,
RoleID = result.RoleID
});
context.pettab_sg.Remove(result);
context.SaveChanges();

}
Log.Pet($"AntiPetBug > Detected PetDbID[{PetDBID}], RoleID[{roleid}] Kicked from the Server and Pet Moved to pettab_sg_banned");
}
//CommandManager.KickAccount((int)DatabaseManager.Ge tUserByRoleID((int)roleid).ID, Msg_KickClient.Kick_CheatDetectorReqKick);
}
else
{
Log.Pet($"RoleID:{roleid} PetDbId:{PetDBID}, Added a Total of [{Total}] Points\n");
}
}
}
catch (Exception e)
{

Log.Debug("PetBugFix.cs ->" + e.ToString());
}
}
}

}
Quote:
Originally Posted by LikeReally View Post
Just because you can't, doesn't means it can't
Gave you but you cant HAHAHA
Packet is another way too but why not release the packet fixer after releasing the hack
I’m planning to make the pet bug fix public soon; I just need some time to code it as a standalone version
BOILegends is offline  
Thanks
2 Users
Old 09/26/2024, 02:09   #9
 
elite*gold: 0
Join Date: Feb 2013
Posts: 67
Received Thanks: 4
Quote:
Originally Posted by LikeReally View Post
Just because you can't, doesn't means it can't
Gave you but you cant HAHAHA
Packet is another way too but why not release the packet fixer after releasing the hack
Well, I tried to make that function, but fail :/.
NerkoWoI is offline  
Old 09/26/2024, 18:09   #10
 
elite*gold: 0
Join Date: Apr 2015
Posts: 157
Received Thanks: 88
01010110010011001010100010010011010110010101110101 01101010101010
LikeReally is offline  
Thanks
2 Users
Old 09/26/2024, 19:11   #11
 
elite*gold: 0
Join Date: Feb 2013
Posts: 67
Received Thanks: 4
Quote:
Originally Posted by LikeReally View Post
THANK YOU SO MUCH BUDDY !

You are AMZING !!!

Do i need DECLARE this Attribute like on your script ?
bcz after I change this Dec in float got again value from pet is born :/
well I missing something. Tried to make view from this function and again same
old value, 1161527296 = 3000 i put 2000 again not find pet.

Well thank you for share, probably missing something.
Just to be clear its up to me not you bud.
NerkoWoI is offline  
Old 09/26/2024, 21:22   #12
 
elite*gold: 0
Join Date: Apr 2015
Posts: 157
Received Thanks: 88
01010110010011001010100010010011010110010101110101 01101010101010
LikeReally is offline  
Thanks
1 User
Old 09/26/2024, 22:10   #13
 
elite*gold: 0
Join Date: Feb 2013
Posts: 67
Received Thanks: 4
Quote:
Originally Posted by LikeReally View Post
its ok bud, I still getting old value from PetInfo, I make some pets with over 2000 but this does not show that value just old when pet get born.
Put like 1148846080 = 1000, but the script did not find him in this query.

Thank you for your support, I really appreciate it

Oh how I'm stupid, lol all work well buddy, I just don't saw something, been messed xD.
Like I said is not bcz you its stupid me, didn't see obvious thing.

Thank you again
NerkoWoI is offline  
Old 09/26/2024, 23:40   #14
 
elite*gold: 0
Join Date: Apr 2015
Posts: 157
Received Thanks: 88
01010110010011001010100010010011010110010101110101 01101010101010
LikeReally is offline  
Thanks
2 Users
Old 09/27/2024, 00:40   #15
 
elite*gold: 0
Join Date: Feb 2013
Posts: 67
Received Thanks: 4
Quote:
Originally Posted by LikeReally View Post
No idea what you saying.
Don't think is hard to copy and paste

Thank you soooooooooooooooooo much you are savior <3

Quote:
Originally Posted by LikeReally View Post

If you mean forbid didn't ban, for that write your own forbid method.

If not, just remove call forbid lines from the sql.
Yeah I make to add in forbidtab_sg for ban player character
but will write function for add account banned not just charater
NerkoWoI is offline  
Reply


Similar Threads Similar Threads
blob
04/16/2016 - elite*gold Trading - 28 Replies
" KEINE ANFRAGEN MEHR BEZÜGLICH ACCOUNTS " oder so
blob
10/22/2012 - S4 League Hacks, Bots, Cheats & Exploits - 4 Replies
#Edit by Corex'
[ERLEDIGT!]Wie player.skill_level auslesen (MySQL-Blob)
10/17/2012 - Metin2 Private Server - 0 Replies
Halihaloooo,:D Ich habe mal wieder keinen Plan, deshalb frage ich mal dumm hier ;) Also wie kann ich die spalte skill_level der tabelle player auslesen ? Benötige dieses für nen script, welches die skills der Spieler anzeigt. (PS. hat sicher jeder schon gesehen, ist auf Ap0s Server HP zu finden :rolleyes:)
[B] Fertige Blob Signatur [S] e*gold
06/29/2012 - elite*gold Trading - 8 Replies
habe gerad eine neue Signatur fertiggestellt. http://puu.sh/E6QZ http://puu.sh/E6Rx Suche Gebote! :) start 10 e*g
[INFO] kbot - get user info... error - official problem info
04/04/2012 - DarkOrbit - 11 Replies
From kbotik.com so now just wait for 5.46 :)



All times are GMT +1. The time now is 13:12.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.