krycek
11-04-2002, 04:59 PM
Scenario:
I have lots of javascripts, all of which I have written myself. Some of them are going to have to be installed onto a client's server soon, and the last thing I want is for them to be able to muck around with the scripts!
There is always some insecurity, but I think the first thing I need to do is to parse the files and remove all comments, unneccessary whitespace, and also carriage returns. I have seen a couple of scripts to do this but they are in Perl, and I have no idea how to run them! :o Does anyone know a script written in PHP that would do this???
Second, I would like to obfuscate the files, that is, change every variable and function name into letters starting a, b, c... etc. so that they take up less space and also are a lot harder to understand! :D
Again I have found Perl scripts to do this but no PHP ones... also, I would like the script to be as reliable, comprehensive, and automatic as possible - so I do not mind paying for a commercial one. :)
Now, the next thing is, is there any way to prevent people reading the scripts? I am pretty certain the answer is no, and tbh, the parsing and obfuscating will most likely be enough. But, I have seen some sites (ukreg for example) that have .exe files sat on the server handling requests, and I have no idea how etc. I assume they will be written in VB or C or summat, not JavaScript or PHP, but can anyone shed any light onto how to make these babies? If they are not cross-platform don't worry though ;) I think a much better idea would be to somehow compile my scripts into a DLL or summat, but I have no idea...
...any suggestions? :)
Cheers!
::] krycek [::
I have lots of javascripts, all of which I have written myself. Some of them are going to have to be installed onto a client's server soon, and the last thing I want is for them to be able to muck around with the scripts!
There is always some insecurity, but I think the first thing I need to do is to parse the files and remove all comments, unneccessary whitespace, and also carriage returns. I have seen a couple of scripts to do this but they are in Perl, and I have no idea how to run them! :o Does anyone know a script written in PHP that would do this???
Second, I would like to obfuscate the files, that is, change every variable and function name into letters starting a, b, c... etc. so that they take up less space and also are a lot harder to understand! :D
Again I have found Perl scripts to do this but no PHP ones... also, I would like the script to be as reliable, comprehensive, and automatic as possible - so I do not mind paying for a commercial one. :)
Now, the next thing is, is there any way to prevent people reading the scripts? I am pretty certain the answer is no, and tbh, the parsing and obfuscating will most likely be enough. But, I have seen some sites (ukreg for example) that have .exe files sat on the server handling requests, and I have no idea how etc. I assume they will be written in VB or C or summat, not JavaScript or PHP, but can anyone shed any light onto how to make these babies? If they are not cross-platform don't worry though ;) I think a much better idea would be to somehow compile my scripts into a DLL or summat, but I have no idea...
...any suggestions? :)
Cheers!
::] krycek [::