Avatar of Insoftservice
InsoftserviceFlag for India asked on

Encrypt php and js code and monitor file changes

I want to encrypt my php and js code .
Server: linux
Hosting: shared type.

I can't change server setting as its shared server.

Issue my client always complaints that there is issue in some functionality when checked it came to our notice that file has been updated. We are 100 % sure that one of clients member do such type of changes so as to cancel my deal as it had happened more than 3 times.
So , i want to monitor whether there is any changes in my code and secondly encrypt my php and js code
PHPAJAX

Avatar of undefined
Last Comment
Insoftservice

8/22/2022 - Mon
SOLUTION
Ray Paseur

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Ray Paseur

Sidebar note... I tried this and had no success.  Seemed like a good idea, too bad it did not work.
http://fopo.com.ar/
ASKER
Insoftservice

PHP Obfuscator  i hope all encoding tool has to be first installed on server for decoding it right?
SOLUTION
Dave Baldwin

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
Insoftservice

Inquired they don't have such facility. Is there some other solution for the same
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
ASKER
Insoftservice

Any php or tool script to minimize all php and js scripts
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Member_2_248744

?????, , maybe I look at your stated problem differently? As you say -
    "one of clients member do such type of changes"

I take this as this - "clients member", has full read and write access to the specific PHP file-script on your server? And for this "clients member" to "cancel my deal" they Overwrite your specific PHP file-script on your server?

As To your - "want to monitor whether there is any changes", you might consider a linux CRON, that checks this PHP file every 15 minutes or so with some sort of checksum HASH value. If the file HASH does not match the stored HASH, then rename the file, move the file, or delete the file (or other file disable thing). But this will be some extra work for you!


As to limiting others access to the file, there may be a solution, but since you mention "encrypt", I will talk about that. ALL, and I mean ALL encrypt methods only help, if there is a secrete "Key" value that the encryption and the decryption agents (php scripts in this case) use, , that No One else knows! !  If your threat as this "clients member" can read your PHP file and-or javascript with the "Key" in that file, then encrypt, Will NOT Help.

What I would suggest, is that you have a type of "Log-In" to access this Info (your deal, I guess), where you have to know a secrete "Key" value entered into a <form> input, which is used to decrypt the deal information from an "encrypted file" or other PHP string source. That way only you, or someone that knows the secrete "Key" can get access to the hidden info. You can not have this secrete "Key" on your server in a file!

It may be possible to use a javascript decryption , where you have to enter a secrete "Key" to <input> and then get the info, , But this may be a complex multi-platform (php- javascript) code headache.

You may need to see about your user-member PHP file access, and why a member that is a threat (malicious) has access to your Deal data file?

Ask questions if you need more info, but a simple solution may not be possible? Again someone that is not authorized should NOT have access to your important files! ! !
ASKER
Insoftservice

Thx for all comments.
I was thinking to decrypt some imp php - javascript code and then minimize all js and php code keeping original copy at my end.
Is there any tool to do so. or php script for the same
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ASKER
Insoftservice

"imp php"? - means important php files. i.e files beside standard files of framework.
I can't use ioncube or zendguard as server does not supports it and i can't shift to other hosting server for the same.
I meant by encrypting the code and then minimizing it is because, intruder will not be able to use the code or change it easily.

I want to script or tool which could remove space and minimize php code.
I hope my points are now clear
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ASKER
Insoftservice

Thanx @Slick812 .
Is there any tool to minimise js. i don't want to do it online as i have got site which captures one js at a time and i have lot of js files and i dont want to do it one by one.
It would be great if i have some script to do it offline.
ASKER CERTIFIED SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ASKER
Insoftservice

Thanx ton to all
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23