Jump to content
gatero

Adding items to temp bag from external source

Recommended Posts

Hello guys,

Im here again.

At the moment i need someone to explain me how website mall works.

I need to be able to give some character a specific item.

I willing to pay for this so pm me those who can help me with this.

 

Thank you in advance.

 

EDIT:

As i managed to find the Inventory in-game. Now what i need is how to decrypt the inventory. Thanks in advance

Edited by gatero

Share this post


Link to post
Share on other sites

Hello, @gatero!

 

You can find functions to encrypt and decrypt inventory in GameDB database (dbo.encrypt and dbo.decrypt)

ALTER FUNCTION [dbo].[encrypt]
(    
    @input char(3500)
)
RETURNS char(3500)
AS
BEGIN
        DECLARE @prefix varchar(8)
        DECLARE @result varchar(3500)
        DECLARE @key varchar(8)
        DECLARE @input_length integer
        DECLARE @key_length integer
        DECLARE @i integer

        SET @i = CHARINDEX('#', @input)
        SET @prefix = SUBSTRING(@input, 0, @i + 1)
        SET @input = SUBSTRING(@input, @i + 1, 3500)
        SET @result = ''
        SET @key = '19800216'
        SET @input_length = LEN(@input)
        SET @key_length = LEN(@key)
        SET @i = 0
        WHILE @i < @input_length
        BEGIN
                SET @result = @result + CHAR(ASCII(SUBSTRING(@input, @i + 1, 1)) + ASCII(SUBSTRING(@key, @i % @key_length + 1, 1)))
                SET @i = @i + 1
        END
        SET @result = @prefix + @result
        
    RETURN @result
END

ALTER FUNCTION [dbo].[decrypt]
(    
    @input char(3500)
)
RETURNS char(3500)
AS
BEGIN
        DECLARE @prefix varchar(8)
        DECLARE @result varchar(3500)
        DECLARE @key varchar(8)
        DECLARE @input_length integer
        DECLARE @key_length integer
        DECLARE @i integer

        SET @i = CHARINDEX('#', @input)
        SET @prefix = SUBSTRING(@input, 0, @i + 1)
        SET @input = SUBSTRING(@input, @i + 1, 3500)
        SET @result = ''
        SET @key = '19800216'
        SET @input_length = LEN(@input)
        SET @key_length = LEN(@key)
        SET @i = 0
        WHILE @i < @input_length
        BEGIN
                SET @result = @result + CHAR(ASCII(SUBSTRING(@input, @i + 1, 1)) - ASCII(SUBSTRING(@key, @i % @key_length + 1, 1)))
                SET @i = @i + 1
        END
        SET @result = @prefix + @result
        
    RETURN @result
END

 PHP equivalent (by Matt):

<?php

	define('CRYPT_KEY', '19800216');

	function encrypt($input, $key) 
	{
		$keyLen = strlen($key);
		$inputLen = strlen($input);
		$result = '';
	   
		for ($i = 0 ; $i < $inputLen ; $i++ ) {
			$result .= chr(ord($input[$i]) + ord($key[$i % $keyLen]));
		}
	   
		return $result;
	}
	 
	function decrypt($input, $key) 
	{
		$keyLen = strlen($key);
		$inputLen = strlen($input);
		$result = '';
	   
		for ($i = 0 ; $i < $inputLen ; $i++ ) {
			$result .= chr(ord($input[$i]) - ord($key[$i % $keyLen]));
		}
	   
		return $result;
	}

	
	$example = 'btmk`^cnjei\abafaei``babaeh\`^abaeh\a^dl]kddg^bbaeh\`^abaehka^gjbei\abafaei``babaeh\`^abaeh\a^do]jdcf^cbaeh\`^abaehkb^ibbei``babbih``^abaeh\`^abaei\cf]geeke\cibaeh\`^abaehkc^gfajda\b]f]id`\b]f]id`\blj]okgh^bbaeh\`^abaeh\`^abbejf\b]hieh\bk]heejg\e]iaehkgehkf';
	
	print(decrypt($example, CRYPT_KEY));
 
?>

Output:

1;5;0,289,1,10000,10000,0,0,0,0,0,0,1,36,2,47,1,0,0,0,0,0,0;1,641,1,10000,10000,0,0,0,0,0,0,1,39,1,36,2,0,0,0,0,0,0;2,8,1,10000,10000,0,0,0,0,0,0,1,34,14,35,18,0,0,0,0,0,0;3,6001,1,0,0,0,0,0,0,0,0,0;4,6378,1,0,0,0,0,0,0,0,0,1,26,0,28,0,29,24,27,3,30,0;73755

 

  • Like 1

Share this post


Link to post
Share on other sites

They should be here?

image.png.dc62043defe8349fcda985787f914e9c.png

 

 

I would need a Java solution for this, or i can execute any sql queries to use this functions?

 

Edited by gatero

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...