ionCube Logo
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


 
Post new topic   Reply to topic    ionCube Forum Index -> ionCube PHP Encoder

Dynamic Keys with Laravel Controller

Author Message
solodev



Joined: 02 Dec 2019
Posts: 3

PostPosted: Mon Dec 02, 2019 8:33 am    Post subject: Dynamic Keys with Laravel Controller Reply with quote

Good morning

I have a little problem with the use of Dynamic Keys with Laravel.
Is it possible to use Dynamic Keys inside Laravel's Controller ?
If it possible i will buy extended support to open trouble ticket and get more detail info regarding this.
Back to top
View user's profile Send private message
alastair



Joined: 23 Feb 2010
Posts: 308

PostPosted: Mon Dec 02, 2019 10:37 am    Post subject: Reply with quote

Hi,

It should be possible to use dynamic keys in that way. Please could you give an example of what you are trying to do.
_________________
Alastair

ionCube
Back to top
View user's profile Send private message
solodev



Joined: 02 Dec 2019
Posts: 3

PostPosted: Mon Dec 02, 2019 2:25 pm    Post subject: Reply with quote

I supposed its because laravel cannot read or execute " // @ioncube.dk " inside laravel's function.

Everytime i execute function with " // @ioncube.dk " in it , the browser failed and show the popular "The connection was reset" page without any additional error message from laravel.

when I removed " // @ioncube.dk ", it works properly.
Back to top
View user's profile Send private message
alastair



Joined: 23 Feb 2010
Posts: 308

PostPosted: Mon Dec 02, 2019 4:34 pm    Post subject: Reply with quote

Hi,

It will not be Laravel that is "reading" that but the ionCube Loader.

I wrote "reading" as the comment does not exist in the encoded file but a representation of the function that needs to be called.

What may be happening is that the key generating function is not defined at that point. Suppose you have something like:

//@ioncube.dk foo() -> "myfoooutput"
public function encryptedMethod()
{
}

Then if foo is undefined at the point encryptedMethod() is first called then a fatal error will result saying that the function could not be decoded. That should be logged somewhere.

So you will need to make sure that the script in which "foo" is defined is included by the point that encryptedMethod is first called.
_________________
Alastair

ionCube
Back to top
View user's profile Send private message
solodev



Joined: 02 Dec 2019
Posts: 3

PostPosted: Wed Dec 04, 2019 4:43 pm    Post subject: Reply with quote

Hi

it works now, the problem comes when "variable" is used instead of "function"

thanks for your input @Alastair
Back to top
View user's profile Send private message
alastair



Joined: 23 Feb 2010
Posts: 308

PostPosted: Thu Dec 05, 2019 9:30 am    Post subject: Reply with quote

Hi,

Variable-based dynamic keys should work but the value has to be the expected one at the point that the function is first called. So the following would not work:

<?php
$x = 5;

//@ioncube.dk $x -> "5" RANDOM
function protected_fun()
{
}

$x++;

protected_fun();
?>

That will fail because $x is actually 6 at the point that protected_fun is first called.
_________________
Alastair

ionCube
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    ionCube Forum Index -> ionCube PHP Encoder All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum