Register for your free account! | Forgot your password?

You last visited: Today at 09:44

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

Advertisement



[PHP] Decrypt Awake

Discussion on [PHP] Decrypt Awake within the Flyff PServer Guides & Releases forum part of the Flyff Private Server category.

Reply
 
Old   #1

 
elite*gold: 28
Join Date: Feb 2010
Posts: 463
Received Thanks: 277
[PHP] Decrypt Awake

1. You will need php 5.6+
2. You need to run on x64 php
3. The script don't take 5 lines awake, only 3.

Code:
<?php
	 define( 'MAX_RANDOM_OPTION', 3 );
	 define( '_AWAKE_SAFE_FLAG', 0x2000000000000000 );

	 class CRandomOptionProperty
	 {       
	     static function GetRandomOptionSize( $nRandomOptItemId )
	     {
	         $nSize = 0;
	         
	         $bCheckedSafeFlag = false;
	         $bCheckedSafeFlag = CRandomOptionProperty::IsCheckedSafeFlag( $nRandomOptItemId );
	         if( $bCheckedSafeFlag )
	             return nSize;
	         
	         $i = 0x3FFFF << 8;
	         for( $j = 0; $j < MAX_RANDOM_OPTION; $j++ )
	         {
	             if( $nRandomOptItemId & $i )
	                 $nSize++;
	             else
	                 return $nSize;
	                 
	             $i = $i << 18;
	         }
	         
	         return $nSize;
	     }
	     static function IsCheckedSafeFlag( $n64RandomeOption )
	     {
	         if( ( $n64RandomeOption & _AWAKE_SAFE_FLAG ) == _AWAKE_SAFE_FLAG )
	             return true;
	         return false;
	     }
	     static function GetParam( $nRandomOptItemId, $i, &$nDst, &$nAdj )
	     {
	         if ( $i > MAX_RANDOM_OPTION )
	             return false;
	                         
	         $nRandomOption = ( $nRandomOptItemId >> ( 8 + $i * 18 ) );
	         $nAdj = $nRandomOption & 0x000001FF;
	         if( $nRandomOption & 0x00000200 )
	             $nAdj = -$nAdj;
	         $nRandomOption = $nRandomOption >> 10;
	     
	         $nDst = $nRandomOption & 0x0000007F;
	                     
	         return ( $nDst > 0 );
	     }
	}
	function GetAwakes( $nRandomOptItemId )
	{
	    $nDst;
	    $nAdj;
	    $nStr = '';
	    $str = '';
	    if( CRandomOptionProperty::GetRandomOptionSize( $nRandomOptItemId ) > 1 )
	        $nStr = ', ';
	    for( $i = 0; $i < CRandomOptionProperty::GetRandomOptionSize( $nRandomOptItemId ); $i++ )
	    {
	        if( !CRandomOptionProperty::GetParam( $nRandomOptItemId, $i, $nDst, $nAdj ) )
	            continue;
	        
	        if( $nAdj >= 0 )
	            $str .= $nDst.' +'.$nAdj.$nStr;
	        else
	            $str .= $nDst.' -'.$nAdj.$nStr;
	    }
	    return $str;
	}
?>
	<h2>Decrypt Flyff Awake</h2>
	</div>
		<form method="post">
		<strong><p style="color:red">Awake Encrypt :</br></strong>
		<input type="text" name="awake">
		<input type="submit" name="push"  />
		</form>
	</p></br>
<?php

	if(isset($_POST['push'])) 
	{
?>
	<div class="title">
		<h2>Awake Decrypt :</h2>
		<span class="byline">Awake : <?php echo GetAwakes($_POST['awake']); ?></span>
	</div>
<?php
	}
?>
The script was originaly made by Sedrika.
ZeroTwo02 is offline  
Thanks
2 Users
Old 05/19/2020, 17:07   #2
 
cookie69's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 627
Received Thanks: 688
Quote:
Originally Posted by ZeroTwo02 View Post
1. You will need php 5.6+
2. You need to run on x64 php
3. The script don't take 5 lines awake, only 3.

Code:
<?php
	 define( 'MAX_RANDOM_OPTION', 3 );
	 define( '_AWAKE_SAFE_FLAG', 0x2000000000000000 );

	 class CRandomOptionProperty
	 {       
	     static function GetRandomOptionSize( $nRandomOptItemId )
	     {
	         $nSize = 0;
	         
	         $bCheckedSafeFlag = false;
	         $bCheckedSafeFlag = CRandomOptionProperty::IsCheckedSafeFlag( $nRandomOptItemId );
	         if( $bCheckedSafeFlag )
	             return nSize;
	         
	         $i = 0x3FFFF << 8;
	         for( $j = 0; $j < MAX_RANDOM_OPTION; $j++ )
	         {
	             if( $nRandomOptItemId & $i )
	                 $nSize++;
	             else
	                 return $nSize;
	                 
	             $i = $i << 18;
	         }
	         
	         return $nSize;
	     }
	     static function IsCheckedSafeFlag( $n64RandomeOption )
	     {
	         if( ( $n64RandomeOption & _AWAKE_SAFE_FLAG ) == _AWAKE_SAFE_FLAG )
	             return true;
	         return false;
	     }
	     static function GetParam( $nRandomOptItemId, $i, &$nDst, &$nAdj )
	     {
	         if ( $i > MAX_RANDOM_OPTION )
	             return false;
	                         
	         $nRandomOption = ( $nRandomOptItemId >> ( 8 + $i * 18 ) );
	         $nAdj = $nRandomOption & 0x000001FF;
	         if( $nRandomOption & 0x00000200 )
	             $nAdj = -$nAdj;
	         $nRandomOption = $nRandomOption >> 10;
	     
	         $nDst = $nRandomOption & 0x0000007F;
	                     
	         return ( $nDst > 0 );
	     }
	}
	function GetAwakes( $nRandomOptItemId )
	{
	    $nDst;
	    $nAdj;
	    $nStr = '';
	    $str = '';
	    if( CRandomOptionProperty::GetRandomOptionSize( $nRandomOptItemId ) > 1 )
	        $nStr = ', ';
	    for( $i = 0; $i < CRandomOptionProperty::GetRandomOptionSize( $nRandomOptItemId ); $i++ )
	    {
	        if( !CRandomOptionProperty::GetParam( $nRandomOptItemId, $i, $nDst, $nAdj ) )
	            continue;
	        
	        if( $nAdj >= 0 )
	            $str .= $nDst.' +'.$nAdj.$nStr;
	        else
	            $str .= $nDst.' -'.$nAdj.$nStr;
	    }
	    return $str;
	}
?>
	<h2>Decrypt Flyff Awake</h2>
	</div>
		<form method="post">
		<strong><p style="color:red">Awake Encrypt :</br></strong>
		<input type="text" name="awake">
		<input type="submit" name="push"  />
		</form>
	</p></br>
<?php

	if(isset($_POST['push'])) 
	{
?>
	<div class="title">
		<h2>Awake Decrypt :</h2>
		<span class="byline">Awake : <?php echo GetAwakes($_POST['awake']); ?></span>
	</div>
<?php
	}
?>
The script was originaly made by Sedrika.
For what usage? the awake "decrypt" is already in the c++ source
cookie69 is offline  
Old 05/19/2020, 17:49   #3

 
elite*gold: 28
Join Date: Feb 2010
Posts: 463
Received Thanks: 277
Quote:
Originally Posted by cookie69 View Post
For what usage? the awake "decrypt" is already in the c++ source
For any admin panel.
To see the awake of a trade, or a item delete etc...
On database the awake is encrypted.
ZeroTwo02 is offline  
Thanks
1 User
Old 05/20/2020, 06:46   #4
 
pbben15's Avatar
 
elite*gold: 0
Join Date: Jul 2010
Posts: 174
Received Thanks: 329
Quote:
Originally Posted by ZeroTwo02 View Post
1. You will need php 5.6+
2. You need to run on x64 php
3. The script don't take 5 lines awake, only 3.

Code:
<?php
	 define( 'MAX_RANDOM_OPTION', 3 );
	 define( '_AWAKE_SAFE_FLAG', 0x2000000000000000 );

	 class CRandomOptionProperty
	 {       
	     static function GetRandomOptionSize( $nRandomOptItemId )
	     {
	         $nSize = 0;
	         
	         $bCheckedSafeFlag = false;
	         $bCheckedSafeFlag = CRandomOptionProperty::IsCheckedSafeFlag( $nRandomOptItemId );
	         if( $bCheckedSafeFlag )
	             return nSize;
	         
	         $i = 0x3FFFF << 8;
	         for( $j = 0; $j < MAX_RANDOM_OPTION; $j++ )
	         {
	             if( $nRandomOptItemId & $i )
	                 $nSize++;
	             else
	                 return $nSize;
	                 
	             $i = $i << 18;
	         }
	         
	         return $nSize;
	     }
	     static function IsCheckedSafeFlag( $n64RandomeOption )
	     {
	         if( ( $n64RandomeOption & _AWAKE_SAFE_FLAG ) == _AWAKE_SAFE_FLAG )
	             return true;
	         return false;
	     }
	     static function GetParam( $nRandomOptItemId, $i, &$nDst, &$nAdj )
	     {
	         if ( $i > MAX_RANDOM_OPTION )
	             return false;
	                         
	         $nRandomOption = ( $nRandomOptItemId >> ( 8 + $i * 18 ) );
	         $nAdj = $nRandomOption & 0x000001FF;
	         if( $nRandomOption & 0x00000200 )
	             $nAdj = -$nAdj;
	         $nRandomOption = $nRandomOption >> 10;
	     
	         $nDst = $nRandomOption & 0x0000007F;
	                     
	         return ( $nDst > 0 );
	     }
	}
	function GetAwakes( $nRandomOptItemId )
	{
	    $nDst;
	    $nAdj;
	    $nStr = '';
	    $str = '';
	    if( CRandomOptionProperty::GetRandomOptionSize( $nRandomOptItemId ) > 1 )
	        $nStr = ', ';
	    for( $i = 0; $i < CRandomOptionProperty::GetRandomOptionSize( $nRandomOptItemId ); $i++ )
	    {
	        if( !CRandomOptionProperty::GetParam( $nRandomOptItemId, $i, $nDst, $nAdj ) )
	            continue;
	        
	        if( $nAdj >= 0 )
	            $str .= $nDst.' +'.$nAdj.$nStr;
	        else
	            $str .= $nDst.' -'.$nAdj.$nStr;
	    }
	    return $str;
	}
?>
	<h2>Decrypt Flyff Awake</h2>
	</div>
		<form method="post">
		<strong><p style="color:red">Awake Encrypt :</br></strong>
		<input type="text" name="awake">
		<input type="submit" name="push"  />
		</form>
	</p></br>
<?php

	if(isset($_POST['push'])) 
	{
?>
	<div class="title">
		<h2>Awake Decrypt :</h2>
		<span class="byline">Awake : <?php echo GetAwakes($_POST['awake']); ?></span>
	</div>
<?php
	}
?>
The script was originaly made by Sedrika.
Where do I add these codes? Admin Panel? or do I have to create new file in Admin Panel folder?
pbben15 is offline  
Old 05/26/2020, 13:30   #5
 
elite*gold: 0
Join Date: Aug 2016
Posts: 20
Received Thanks: 3
Thanks for reuploading this man. May I know where on the database I can get the awake values of an Item is saved?

Edit: Nevermind, found it dbo.INVENTORY_EXT_TBL on column m_extInventory, now all I need is figuring out which index when you explode the string using '/' is for which item.
deleonrenz024 is offline  
Old 05/28/2020, 19:09   #6
 
xTwiLightx's Avatar
 
elite*gold: 0
Join Date: Jan 2009
Posts: 1,741
Received Thanks: 1,674
Quote:
Originally Posted by deleonrenz024 View Post
Thanks for reuploading this man. May I know where on the database I can get the awake values of an Item is saved?

Edit: Nevermind, found it dbo.INVENTORY_EXT_TBL on column m_extInventory, now all I need is figuring out which index when you explode the string using '/' is for which item.
0 = m_bCharged
1 = m_dwKeepTime
2 = Awakening
3 = m_bTranformVisPet

... assuming that you're using a clean v15 or v21 source code.
xTwiLightx is offline  
Old 05/29/2020, 13:08   #7
 
elite*gold: 0
Join Date: Aug 2016
Posts: 20
Received Thanks: 3
Quote:
Originally Posted by xTwiLightx View Post
0 = m_bCharged
1 = m_dwKeepTime
2 = Awakening
3 = m_bTranformVisPet

... assuming that you're using a clean v15 or v21 source code.
I don't know what's this for, but thanks.

So for anyone that's maybe wondering on how you can find the correct which database entry is for which item.

This is m_Inventory from INVENTORY_TBL

Red is Item ID from defineItem.h
Blue is Item Index.

So in our case, the Item index 3 has Item ID of 21 which is Wooden Sword.

Now split m_extInventory from INVENTORY_EXT_TBL using the character '/'
then find the 4th one because indexes starts with 0 and the item index we're finding is 3.(the '/' is the delimiter).

Now you can decrypt the 759943664640 using the decrypter above and that will be the awake values of our Wooden Sword
deleonrenz024 is offline  
Old 06/05/2020, 17:39   #8
 
xTwiLightx's Avatar
 
elite*gold: 0
Join Date: Jan 2009
Posts: 1,741
Received Thanks: 1,674
Quote:
Originally Posted by deleonrenz024 View Post
I don't know what's this for, but thanks
Quote:
now all I need is figuring out which index when you explode the string using '/' is for which item.
That's exactly what I did for you.
xTwiLightx is offline  
Reply


Similar Threads Similar Threads
Please Help - How to add awake system like this /awake , /awa or /awakening!
04/30/2017 - Flyff Private Server - 8 Replies
How to add awake system like this /awake , /awa or /awakening!
[Selling] Awake Service / Awake weapons
11/20/2015 - Flyff Trading - 2 Replies
deleted
C++ Text Decrypt Function + Programm Encrypt to Decrypt
07/09/2011 - WarRock Hacks, Bots, Cheats & Exploits - 19 Replies
http://desmond.imageshack.us/Himg233/scaled.php?se rver=233&filename=icevisionzxencrypttodec.png& amp;res=medium Download: uploaded.to - where your files have to be uploaded to Virustotal: VirusTotal - Free Online Virus, Malware and URL Scanner Function C++: char* encrypt(const char* plaintext) {



All times are GMT +1. The time now is 09:45.


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.