Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 03-29-2011, 04:29 PM   #1
HighlyIntoxicated
Confirmed User
 
Join Date: Dec 2009
Posts: 542
Any way to block access to my site if users are blocking javascript?

One of the functions on my site relies on javascript, and people have been getting around it, by disabling js.

Is there any way to block users from my site/redirect them to a page, if they have javascript disabled?
HighlyIntoxicated is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-29-2011, 04:30 PM   #2
seeandsee
Check SIG!
 
seeandsee's Avatar
 
Industry Role:
Join Date: Mar 2006
Location: Europe (Skype: gojkoas)
Posts: 50,945
yes there is, i dont know how, but i saw content lockers have protection against it so there is some working solution
__________________
BUY MY SIG - 50$/Year

Contact here
seeandsee is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-29-2011, 04:34 PM   #3
HighlyIntoxicated
Confirmed User
 
Join Date: Dec 2009
Posts: 542
I've seen something similar with a content locker, except it blocked users access to the site if they had adblock enabled.

Both of these features would be awesome if anyone knows where I could find em.
HighlyIntoxicated is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-29-2011, 04:35 PM   #4
rowan
Too lazy to set a custom title
 
Join Date: Mar 2002
Location: Australia
Posts: 17,393
Can you explain the particular functionality on your site in more detail? Does it involve fetching something from the server? If so, you could do that through j/s.

Another option would be to redirect to the content/function via j/s, and use <noscript>sorry, you need j/s enabled</noscript> kinda thing.

Both could be worked around by someone viewing the source, unless your j/s does some tricky obfuscated calculations to come up with a valid key that your server is expecting...
rowan is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-29-2011, 04:39 PM   #5
HighlyIntoxicated
Confirmed User
 
Join Date: Dec 2009
Posts: 542
My site isnt doing anything too complicated. I am using a content locker which relies on javascript, if users disable js they are able to get to the content, which is what im trying to fix.
HighlyIntoxicated is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-29-2011, 05:07 PM   #6
prezzz
Confirmed User
 
Industry Role:
Join Date: Jul 2004
Posts: 959
I found this solution on StackOverflow a while ago while I was searching for something completely unrelated.

Whenever a user has Javascript disabled, the <noscript> tags come into play. Among other things, you can put some CSS code within those tags and it'll be fully processed. In this case, you could wrap your entire site into a specific <div> like this:

<div id="sitewrapper">
...your site content...
</div>

and then activate a special CSS definition for those that have Javascript disabled:

<noscript>
<style type="text/css">#sitewrapper {display: none;}</style>
</noscript>
__________________

TEMPLATEHYPE.COM - PREMIUM MECHBUNNY TEMPLATES
Responsive Mechbunny templates now available - NEAT TUBE - REDDY TUBE
prezzz is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-29-2011, 05:15 PM   #7
TripleXPrint
Confirmed User
 
TripleXPrint's Avatar
 
Join Date: Apr 2007
Posts: 983
Quote:
Originally Posted by prezzz View Post
I found this solution on StackOverflow a while ago while I was searching for something completely unrelated.

Whenever a user has Javascript disabled, the <noscript> tags come into play. Among other things, you can put some CSS code within those tags and it'll be fully processed. In this case, you could wrap your entire site into a specific <div> like this:

<div id="sitewrapper">
...your site content...
</div>

and then activate a special CSS definition for those that have Javascript disabled:

<noscript>
<style type="text/css">#sitewrapper {display: none;}</style>
</noscript>
This will work only if you're using it to "hide" the content, not block access.
__________________
Skype: Triplexprint
TripleXPrint is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-29-2011, 05:26 PM   #8
Varius
Confirmed User
 
Industry Role:
Join Date: Jun 2004
Location: New York, NY
Posts: 6,890
You should not be relying on client-side code to protect your content/control access

If you really want to, you can look into javascript and/or html obfuscation, but know all of them are breakable fairly easily and may cause some browser trouble.

If you just want a solution that works against the "average" surfer, make an Ajax call via jQuery which then outputs the HTML needed to show the content; in other words, don't have it embedded in your HTML source.
__________________
Skype variuscr - Email varius AT gmail
Varius is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-29-2011, 05:31 PM   #9
Tempest
Too lazy to set a custom title
 
Industry Role:
Join Date: May 2004
Location: West Coast, Canada.
Posts: 10,217
Difficult to do... Could have some PHP on every page that checks a block IP list... Using the noscript tags, you could call an iframe that adds the IP to the list or maybe set something in a session.. The PHP would have to clear out old IPs/session every so often as well. The check might have to be in an iframe after the noscript one so that the IP/session gets recorded first. Just off the top of my head, something like that.

But yeah, the content protection should default to NO ACCESS unless they have javascript enabled.
Tempest is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-29-2011, 05:51 PM   #10
DangerX !!!
Confirmed User
 
DangerX !!!'s Avatar
 
Industry Role:
Join Date: Feb 2011
Location: La Isla Bonita Power Level: ❤❤❤❤❤❤❤❤❤❤
Posts: 886
You can only block users with very little computer knowledge in this way, every more advanced user will pass this blockade in a matter of minutes.
__________________
This is sig area!
DangerX !!! is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-29-2011, 05:57 PM   #11
HighlyIntoxicated
Confirmed User
 
Join Date: Dec 2009
Posts: 542
Thanks for the information.

At the moment the content locker is doing a fairly good job, with only a few people getting around it, perhaps i'll just ride it out.
HighlyIntoxicated is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-29-2011, 07:27 PM   #12
camperjohn64
Confirmed User
 
Industry Role:
Join Date: Feb 2005
Location: Los Angeles
Posts: 1,531
You can ONLY deliver this page:

<html>
<script>
document.location = "realpage.html";
</script>
You must enable javascript to see this
</html>

If the person doesn't have javascript active, it never gets to realpage.html
__________________
www.gimmiegirlproductions.com
camperjohn64 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-29-2011, 07:30 PM   #13
camperjohn64
Confirmed User
 
Industry Role:
Join Date: Feb 2005
Location: Los Angeles
Posts: 1,531
If you wanted to get fancy, you could obfuscate the javascript target to go to index.php?page=fbdbe7277d7a77&md5=abb5b2bfbdbe7277 d7a77f7e.php and that page could then do an MD5 checksum on the md5 to confirm it's a valid target page.

This would make the hardest of hackers give up and just turn on javascript.
__________________
www.gimmiegirlproductions.com
camperjohn64 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-30-2011, 05:34 AM   #14
InfoGuy
80/20 Rule
 
InfoGuy's Avatar
 
Industry Role:
Join Date: Apr 2010
Location: Los Angeles
Posts: 3,051
Access to your content may not be the primary motive of everyone that blocks scripts. Have you considered the possibility that some surfers block scripts by default to protect themselves from malware?
InfoGuy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-30-2011, 06:06 AM   #15
HighlyIntoxicated
Confirmed User
 
Join Date: Dec 2009
Posts: 542
Quote:
Originally Posted by InfoGuy View Post
Access to your content may not be the primary motive of everyone that blocks scripts. Have you considered the possibility that some surfers block scripts by default to protect themselves from malware?
I am aware there are legitimate reasons to block scripts, however I know for certain people are turning off js to get around my content locker, as i have seen it discussed on forums.
HighlyIntoxicated is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-30-2011, 06:14 AM   #16
u-Bob
there's no $$$ in porn
 
u-Bob's Avatar
 
Industry Role:
Join Date: Jul 2005
Location: icq: 195./568.-230 (btw: not getting offline msgs)
Posts: 33,063
1. Client side 'protection' can always be circumvented.
2.
using Javascript print an <img src="/somephp.php">

have somephp.php set a cookie.

have your other pages check if the user came from your site (referrer) and if they have the cookie that is set by somephp.php. If they don't have the cookie, they are probably blocking js.
u-Bob is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-30-2011, 07:45 AM   #17
SmokeyTheBear
►SouthOfHeaven
 
SmokeyTheBear's Avatar
 
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
i dont get why you dont use css to hide the content.. explain what you are trying to protect ?
__________________
hatisblack at yahoo.com
SmokeyTheBear is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-30-2011, 08:07 AM   #18
redwhiteandblue
Bollocks
 
redwhiteandblue's Avatar
 
Industry Role:
Join Date: Jun 2007
Location: Bollocks
Posts: 2,792
Quote:
Originally Posted by camperjohn64 View Post
You can ONLY deliver this page:

<html>
<script>
document.location = "realpage.html";
</script>
You must enable javascript to see this
</html>

If the person doesn't have javascript active, it never gets to realpage.html
That'll work right up until they view the source and type "realpage.html" into their browser.
redwhiteandblue is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-30-2011, 08:21 AM   #19
cam_girls
So Fucking Banned
 
Industry Role:
Join Date: Apr 2009
Posts: 2,968
Really basic method if you have a page where they come from, use onclick on the button.

Quote:
<img src="readmymind.png" height=54 onclick="window.location='http://www.mindreading.com/Question.php';">

Last edited by cam_girls; 03-30-2011 at 08:22 AM.. Reason: ONLICK hahah
cam_girls is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-30-2011, 08:24 AM   #20
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,283
Quote:
Originally Posted by cam_girls View Post
Really basic method if you have a page where they come from, use onclick on the button.
bad advice homie
fris is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-30-2011, 08:25 AM   #21
iamtam
So Fucking Banned
 
Join Date: Feb 2010
Posts: 1,211
on their first page, use javascript to write a cookie. as they hit enter, read the cookie with php on the inside page. if there is no cookie set, redirect them back to the front page. if they have java turned off, there will never be a cookie, so java is likely disabled.
iamtam is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.