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

protecting javascript files in a Laravel application

Author Message
Nischay



Joined: 24 May 2018
Posts: 2

PostPosted: Mon May 28, 2018 7:29 pm    Post subject: protecting javascript files in a Laravel application Reply with quote

Hello!

I use Laravel 5.4 with PHP 7.0.

Is it possible to encode, encrypt or obfuscate javascript files with IonCube? I did try the regular non-php encryption but failed as the client side javascript was not recognized.
How do I call the 'ioncube_read_file()' method inside the 'src' attribute of a script tag to my .js file? Another hurdle being, all my .blade.php files are encrypted, not encoded.
I am keen on using IonCube to protect my javascript rather than an external obfuscator/encryption tool just for javascript.

Thanks in advance
Back to top
View user's profile Send private message
liaison
ionCube Support


Joined: 16 Dec 2004
Posts: 2788

PostPosted: Tue May 29, 2018 1:09 pm    Post subject: Reply with quote

In short no Smile

The browser has no way to read mangled JS or CSS (IE had such a mechanism briefly but I suspect that few knew about it and microsoft removed it years ago). So if you serve up encrypted versions, what is going to decrypt it? A browser plugin might be able to do this. but would you want end users having to modify their browser in order to be able to use your product?

Further, even if JSS/CSS were protected, hit F12 and it's going to be revealed with the debugger.

It's a good idea to use a processor to minimise your JS/CSS, which can make it somewhat hard to reverse engineer, so I'd go that route.
_________________
Community Admin
Back to top
View user's profile Send private message
Nischay



Joined: 24 May 2018
Posts: 2

PostPosted: Wed May 30, 2018 6:31 am    Post subject: Reply with quote

Thank you for your quick response. I like your suggestion i.e. to minify/scramble the JS files before serving. Can I not use the inbuilt obfuscator for this? Seems like only the server side PHP is being obfuscated. It would have been a great feature to allow obfuscation of JS.
Back to top
View user's profile Send private message
liaison
ionCube Support


Joined: 16 Dec 2004
Posts: 2788

PostPosted: Wed May 30, 2018 9:49 am    Post subject: Reply with quote

The obfuscator works on the compiled code rather than source so is completely different to what would be required, but we do get your point Smile
_________________
Community Admin
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