Videogamer555 Posted September 6, 2014 Share Posted September 6, 2014 (edited) This would be great for preventing bots from stealing your links by stealing the HTML code alone (and also keeping the prying eyes of reverse-engineers from figuring out how the links worked, unless they put in considerable effort to de-obfuscate all the vars). Why does this forum keep preventing me from posting this code? Every time I post it, it disappears from the code box! Maybe I'll try it without the code box this time. <html><head><title>index</title><script type="text/javascript">var x = 'http';var a;var b = 'www';var c = '.';var d = 'amazon';var e = c;var f = 'com';function z(g,h,i) {window.location.href=(a + b + g + h + i);}</script></head><body>This is <a href="#" onclick="a=x+y; z(c,d+e,f); return false;">a</a> test.</body></html> Ok, I see, it doesn't like the line that creates the y var. What's going on here? Your forum software appears to be buggy as heck. Edited September 6, 2014 by Videogamer555 Link to comment Share on other sites More sharing options...
Ingolme Posted September 6, 2014 Share Posted September 6, 2014 Why would you want to hide a link from robots? I understand hiding an e-mail address. Search engines use links to determine your page rank, having your links easily available to robots is helpful. Link to comment Share on other sites More sharing options...
davej Posted September 6, 2014 Share Posted September 6, 2014 Scammers and spoofers often want to obfuscate links to malicious websites. Why else would you want to hide a link? Link to comment Share on other sites More sharing options...
dsonesuk Posted September 7, 2014 Share Posted September 7, 2014 The only time you would want to hide links from bots are those that link to another domain which you don't wish search engines listing, in that situation you would use rel="nofollow". Link to comment Share on other sites More sharing options...
Videogamer555 Posted September 7, 2014 Author Share Posted September 7, 2014 Also useful for copyprotection, if for example you you are linking to a resource you don't want to have individules to find out the URL of (to prevent them from stealing it). More often than for hyperlinks, it's used with embedded content (like EMBED, IMG, or OBJECT tags), or in combination with more complex schemess of displaying copyprotected media, in order to make it difficult to directly get the URL. This will force anybody who wants to rip your content from your site to have to go through the ordeal of trying to de-obfuscate the URL. Link to comment Share on other sites More sharing options...
Videogamer555 Posted September 7, 2014 Author Share Posted September 7, 2014 And by the way, forum admin, fix your forum software, so that it doesn't keep wrecking the code I try to post. It took out an important line of code in my OP post, when just having the code the regular part of the post text. And it completely disappeared when it was placed inside CODE tags. Link to comment Share on other sites More sharing options...
Ingolme Posted September 7, 2014 Share Posted September 7, 2014 Deobfuscating the URL takes at most one minute. There isn't even a need to deobfuscate, the browser has a list of links to all the media on the page: Right-click -> View Page Info We're not in charge of the forum software, the forum software is created by InvisionPower, send complaints to them. Link to comment Share on other sites More sharing options...
davej Posted September 7, 2014 Share Posted September 7, 2014 Also useful for copyprotection, if for example you you are linking to a resource you don't want to have individules to find out the URL of (to prevent them from stealing it). No, if you want security then you use a server-side language such as Php to selectively render the protected material. Link to comment Share on other sites More sharing options...
justsomeguy Posted September 8, 2014 Share Posted September 8, 2014 Also useful for copyprotection, if for example you you are linking to a resource you don't want to have individules to find out the URL of (to prevent them from stealing it).How exactly does Javascript help that? They click the link and see the URL right there in their address bar. There are about a thousand ways to find out the URLs of every resource on a page, trying to hide things in Javascript is not security. There is real security if you want to try and protect things like that from unauthorized access; what you're doing is not security.This will force anybody who wants to rip your content from your site to have to go through the ordeal of trying to de-obfuscate the URL.No it won't. They open their browser's developer tools, click on the Network tab, and the URLs of everything having to do with the page are right there, headers and everything. They don't even have to look at the code on the page. Link to comment Share on other sites More sharing options...
thescientist Posted September 8, 2014 Share Posted September 8, 2014 There's really no point in trying to secure things from the user in the client, that's what the server is for. Or use HTTPS is client / server communication is involved. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now