PHP Classes

Weak Auras Decoder: Decode text strings of auras for World Of Warcraft

Recommend this page to a friend!
  Info   View files Documentation   View files View files (8)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 40 All time: 10,466 This week: 362Up
Version License PHP version Categories
weakauras-decoder 1.0GNU Lesser Genera...5.5PHP 5, Cryptography, Games
Description Author

This package can decode text strings of auras for World Of Warcraft.

It takes a text string of a data of an aura generated by World of Warcraft and decodes the contained information.

The package returns a value with the details of the decoded data. It may also return the Lua code that he may figured.

Innovation Award
PHP Programming Innovation award winner
January 2018
Winner
This package can decode text strings of auras for World Of Warcraft.

It takes a text string of a data of an aura generated by World of Warcraft and decodes the contained information.

The package returns a value with the details of the decoded data. It may also return the Lua code that he may figured.

Manuel Lemos
Picture of Sascha Greuel
  Performance   Level  
Name: Sascha Greuel <contact>
Classes: 3 packages by
Country: Germany Germany
Innovation award
Innovation award
Nominee: 2x

Winner: 1x

Details

Travis Discord

WeakAuras Decoder

WeakAuras is a powerful and flexible framework for World Of Warcraft that allows you to display highly customizable graphics on your screen to indicate buffs, debuffs, and a whole host of similar types of information. It was originally meant to be a lightweight replacement for Power Auras, but it now incorporates many features that Power Auras does not, while still remaining more efficient and easy to use.

Created auras can be exported and shared all over the net. But there's a catch: All you get is an encoded string, that is used to be imported in the WeakAuras addon. This encoded string could possibly contain custom code which may be supposed to destroy your gaming experience by stealing gold from your character, spamming other players, etc.

The __WeakAuras Decoder__ is a PHP class that gives you the ability to convert these strings back in a human readable format. It is mostly a port of WeakAuras' Lua code that does literally the same.

Requirements

  • PHP 5.5 or newer
  • HTTP server with PHP support (eg: Apache, Nginx, Caddy)
  • Composer

Installation

Require this package, with Composer, in the root directory of your project:

$ composer require softcreatr/weakauras-decoder

Usage / Examples

decodeAura

Decodes an encoded WeakAuras string into an array.

<?php
require "vendor/autoload.php";

use SoftCreatR\WeakAuras\Decoder;

// Encoded WeakAuras string
$encoded = 'd0JPcaGAjrTlPQETKQoTspMsnxvmBsomvDtPITPG(Mc8xPq7KuyVODtL9lj5NsLgMqzCsbxwvdvurdwsLHtQ6GcXPev4ykY5i' .
           'LwOKqxxWIfvLLlYdfvXtjwgPYZLyIIQ0uHAYumDWIKsnkjbptH8ojr2Ou0xfQ2SIA7IsFwLMLOsnnPkFxkzKsknwrLmArX4LK' .
           '6KskUfPORjKoVc1Hevv3Ms(nK5eXu8etGsHIU(r7prXIIHIHykMTOx5hJ)Qbk1(kfQQ6IJskt(P4THn7Jt79(PoiZtn0CkgfV' .
           'nSixHykfWNaIPuqbNHsno4tZE7)eXy66kN4VV(iHKVC68M1FeuWzkN8GA1bHw3Tp6EPyqnwqbNH5JaL1TaXumOgTdfazXksXo' .
           'uaKfLCQ8JfuWzAUQVcTRXbFA2B)NteJPRRCoXFF9rcjF5C68M1Fock4mLZjUh(uEti99r3B7C3wAMR25OseiqXSLkhC2WM9P4' .
           'vkkRHsTVsHQQU4OKYqP1AGmSzdJInkAmTt6AyymTd0QJZA2BafiT37NiMsjdQvxhLsguRUUi2WM9jqXfSWP9E)uHAmrjZV3ma' .
           'BoCq0OJ02BymT6MgeD0qoRzpTuuiVHykGx9oqhXuSckyjMabkGx9oGykwbfSetGafZopV2bfmMykwbfSetGaLK3(jMIvqblXe' .
           'iqjHupXuSckyjMabk6ZQh8Q3betXkOGLyceOSUBcf0tmfRGcwIjqGYS3gwKJykwbfSetGabkP)UihES(Nc8vdeOKLAm1t3ebs' ;

// Perform decode
$decoded = Decoder::decodeAura($encoded);

// Print the result
var_dump($decoded[0]);

dumpLuaCode

Dumps custom Lua codes into an array.

<?php
require "vendor/autoload.php";

use SoftCreatR\WeakAuras\Decoder;

// Encoded WeakAuras string
$encoded = 'd0JPcaGAjrTlPQETKQoTspMsnxvmBsomvDtPITPG(Mc8xPq7KuyVODtL9lj5NsLgMqzCsbxwvdvurdwsLHtQ6GcXPev4ykY5i' .
           'LwOKqxxWIfvLLlYdfvXtjwgPYZLyIIQ0uHAYumDWIKsnkjbptH8ojr2Ou0xfQ2SIA7IsFwLMLOsnnPkFxkzKsknwrLmArX4LK' .
           '6KskUfPORjKoVc1Hevv3Ms(nK5eXu8etGsHIU(r7prXIIHIHykMTOx5hJ)Qbk1(kfQQ6IJskt(P4THn7Jt79(PoiZtn0CkgfV' .
           'nSixHykfWNaIPuqbNHsno4tZE7)eXy66kN4VV(iHKVC68M1FeuWzkN8GA1bHw3Tp6EPyqnwqbNH5JaL1TaXumOgTdfazXksXo' .
           'uaKfLCQ8JfuWzAUQVcTRXbFA2B)NteJPRRCoXFF9rcjF5C68M1Fock4mLZjUh(uEti99r3B7C3wAMR25OseiqXSLkhC2WM9P4' .
           'vkkRHsTVsHQQU4OKYqP1AGmSzdJInkAmTt6AyymTd0QJZA2BafiT37NiMsjdQvxhLsguRUUi2WM9jqXfSWP9E)uHAmrjZV3ma' .
           'BoCq0OJ02BymT6MgeD0qoRzpTuuiVHykGx9oqhXuSckyjMabkGx9oGykwbfSetGafZopV2bfmMykwbfSetGaLK3(jMIvqblXe' .
           'iqjHupXuSckyjMabk6ZQh8Q3betXkOGLyceOSUBcf0tmfRGcwIjqGYS3gwKJykwbfSetGabkP)UihES(Nc8vdeOKLAm1t3ebs' ;

// Perform decode
$decoded = Decoder::decodeAura($encoded);
$decoded = $decoded[0];

// "Danger keys" are used to identify custom code
$dangerKeys = [
    'custom', 'customDuration', 'customName',
    'customIcon', 'customTexture', 'customStacks',
    'translateFunc', 'alphaFunc', 'scaleFunc',
    'rotateFunc', 'colorFunc', 'customText'
];

// Perform some magic
$luaCodes = [];

foreach ($dangerKeys as $k) {
    $customizations = Decoder::dumpLuaCode($decoded, $k);

    foreach ($customizations as $customization) {
        $customization['value'] = trim($customization['value']);

        if (!empty($customization['value'])) {
            $luaCodes[] = $customization;
        }
    }
}

// Print the result
echo "Decoded string:\n\n";
var_dump($decoded);

echo "\n\nCustom code (if there is any):\n\n";
var_dump($luaCodes);

License

license

Free Software, Hell Yeah!

  Files folder image Files  
File Role Description
Files folder imagesrc (1 directory)
Files folder imagetests (1 directory)
Accessible without login Plain text file .travis.yml Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  src  
File Role Description
Files folder imageSoftCreatR (1 directory)

  Files folder image Files  /  src  /  SoftCreatR  
File Role Description
Files folder imageWeakAuras (2 files)

  Files folder image Files  /  src  /  SoftCreatR  /  WeakAuras  
File Role Description
  Accessible without login Plain text file Decoder.php Class Class source
  Accessible without login Plain text file Iter.php Class Class source

  Files folder image Files  /  tests  
File Role Description
Files folder imageSoftCreatR (1 directory)

  Files folder image Files  /  tests  /  SoftCreatR  
File Role Description
Files folder imageWeakAuras (1 file)

  Files folder image Files  /  tests  /  SoftCreatR  /  WeakAuras  
File Role Description
  Accessible without login Plain text file DecoderTest.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:40
This week:0
All time:10,466
This week:362Up
For more information send a message to info at phpclasses dot org.