This question already has answers here:
How can I hide or encrypt JavaScript code? [duplicate]
(7 answers)
Closed 4 years ago.
I don't find any info about that,so asking here.
Is somebody ever used some tool to protect javascript files? And totaly encrypt them?
Because I found this tool that seems like can totaly encrypt JS?
What do you think?
http://webtools.securitygeeks.net/p/blog-page_26.html?
That tool is useless. It declares a global variable called teksasli which contains your original script in a plain string. just look at the value of that variable in any console to see the original source.
There is no point in trying to encrypt Javascript, because the user/browser needs to decrypt it in order to run it.
If you want to obfuscate the source code, You could try GWT http://mojo.codehaus.org/gwt-maven-plugin/ (The Google Web Toolkit ).
Related
This question already has answers here:
Using Node.JS, how do I read a JSON file into (server) memory?
(13 answers)
Closed 2 years ago.
This is not for a browser.
I intend to make a "blacklist" array for my bot, which will prevent users from running commands. However, I can only seem to do this on the actual bot file as I haven't found a way to do an external method.
What I'd want to do is have my main bot file as normal, but have a blacklist.txt with an array including their username, discord account ID and extra notes which can be accessed at any time by admins using a command.
This is what I'm using:
var blacklist=[
{username:'',userid:'',notes:''},
]
It's possible with node.js(a platform based on javascript)
Here is an example how to do that Using Node.JS, how do I read a JSON file into (server) memory?
This question already has answers here:
UTF-8 all the way through
(13 answers)
How to store other languages (unicode) in cookies and get it back again
(1 answer)
Closed 5 years ago.
I'm building a references generator and I need to keep track of the generated references. To achieve this, I'm currently using Javascript to store a cookie containing the raw data, then a PHP page embedded on the result page takes the cookie and logs it into an HTML page, however, some characters appears like this : �. I really don't know which way to go to solve this (base64 encoding, unicode encoded characters...)
Here's the link to the website : http://louisfelixberthiaume.000webhostapp.com/source_siteweb.php
[It's in french]
I can't give you the link to the HTML page for obvious confidentiality reasons, however I'll provide a screenshot :
Generated references screenshot
This question already has answers here:
How to get client's IP address using JavaScript? [closed]
(31 answers)
Closed 9 years ago.
I want to find client's IP Address when accessing my app..How to find using javascript code..kindly provide help with sample code..I tried wit tis code but m not getting
function getip(json){
alert(json.ip); // alerts the ip address
}
You can't using ONLY JavaScript on it's own. You need to use a server side script ans call it using Ajax to perform this task.
For example in PHP script, you can do the following to get the client's ip address:
echo $_SERVER["REMOTE_ADDR"];
Next call this script using Ajax and display/use it in your page.
At least there used to be a way using Java to do this, but Javascript alone cannot find a machines IP.
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How to encrypt HTML, CSS and JavaScript to prevent theft
Please tell how to encrypt html page surce code for any webpage using javascript function if not possible then please tell alternative ways..
In order for the source to be rendered, it has to be decrypted in the browser and a DOM constructed, which which point the user can use a DOM inspector to access the DOM and serialize it back to HTML (thus creating a reasonable facsimile of the original HTML).
Thus there is no way, alternative or otherwise.
This question already has answers here:
Where can I find javascript native functions source code? [duplicate]
(3 answers)
Javascript native sort method code
(3 answers)
Closed 8 years ago.
Is there a way to know how test (for regex) or cos (for math) or substring (for string) or splice (for array) have been coded in the exact syntax either by a way in Javascript (like alert(function)) or by seeking in the files that come with Firefox?
Well, the source code of javascript likely isn't written in javascript itself, so you would be unable to just print it to the browser console or alert.
You can browse the source code of google's V8 engine, and see if it helps you ;)
http://code.google.com/p/v8/
These functions are actually implemented differently by browsers in one of the OS native languages.
So these algorithms are written in c, c++, c#, java etc. but not in JavaScript.