View Full Version : hacking functions ?

07-14-2012, 09:48 PM
hi all. i'm currently building an application that utilizes JavaScript. I am no very fluent in this programming language but i do read when i know what i am looking for. now, i am not sure where to look, without reading an entire chapter on functions and probably not find my answer so i'd like to ask; can a user, that views the source code of a website trigger a javascript function, if the function is only called from a button click and pass, for example, diferent arguments, without clicking said calling button?


07-14-2012, 10:07 PM
Of course. You just have to bring up the JS console (usually with F12) and call the function. You can write the code such that the function is not accessible from the console but the user can still download the website and modify the code. So in short - only code that's on the server is safe. Client code can always be messed with by the user.

07-14-2012, 10:22 PM

one question - how do i write my code on the server?

07-15-2012, 06:17 AM
PHP is the most popular language for that purpose. But since I don't know what exactly you are planing to do I can't tell you if you really need to put your code on the server.