vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Miscellaneous Hacks - Anti-Leech Attachments - prevent hotlinking and bandwidth theft! (https://vborg.vbsupport.ru/showthread.php?t=149666)

steadicamop 06-13-2007 10:00 PM

Anti-Leech Attachments - prevent hotlinking and bandwidth theft!
 
1 Attachment(s)
Title : Anti-Leech Attachments

Version : 1.1

Coder : Jason Williams

Purpose : Prevent your forum attachments from being directly linked to - prevent bandwidth abuse.

Why : Bandwidth can be expensive, plus I was frustrated with one of my members linking to three video clips on my forum from his own site, effectively abusing the bandwidth I pay for, so I set about a system that stops hotlinking, but at the same time, as a courtesy, providing a dynamic link to the post containing the attachment.

How : This could be replicated very easily using .htaccess but the one thing that it can't do is give you the link to the attachment itself. This mod displays a message informing the user that hotlinking is not allowed, then giving them the link to the post to view the attachment directly.

Known Issues : The security can be defeated by using the drop down style menu on the Anti Leech page - this has only been confirmed as an issue on Firefox. I have unsucessfully tried to find a way of removing the drop down on that page only.

Confirmed working with vBSEO 3.2.0.

Important : This has been tested on 3.6.2 and 3.8, I can presume it will be compatible with 3.7.x because it works on 3.8 - as always BACKUP FIRST!

Demo : http://www.steadiforum.com/attachmen...9&d=1180779148

Installation :

1. Import Product - product-antileech.xml
2. Save bandwidth!

File uploads : 0
Files to Import : 1
New Templates : 1
New Phrases : 2
Uses Hooks : 1
Uses Queries : 1

History :
v1.0 - Original release

v1.1 - Added enable/disable option, tested on VB 3.8

Done - if you like please click install! (and click Nominate for MOTM!)

steadicamop 06-13-2007 10:43 PM

Reserved for future use

rjmjr69 06-13-2007 11:17 PM

Sweet I'll test it out

Are there any settings or anything to adjust?

Barakat 06-13-2007 11:23 PM

i love your hacks man ...

installed

rjmjr69 06-13-2007 11:28 PM

http://www.isosdcftp.com/forums/atta...3&d=1181780809


I dont know if its working thats a link to an attachment at my site


http://www.isosdcftp.com/forums/show...?p=388#post388

steadicamop 06-13-2007 11:55 PM

Quote:

Originally Posted by rjmjr69 (Post 1268016)

This is something I forgot to mention - the attachments on my site are guest viewable - yours require login - so unless they're a member who's already logged in using cookies, it won't make any difference.

The best way to test if it's working is copy the attachment.php link and test it in a new browser window - this is how I tested it on mine.

Barakat 06-14-2007 12:06 AM

its works good but if you click on the "Click here to visit the post with the attachment"

its not functioned as well with the right link ...

showthread.php?p=%1$s

steadicamop 06-14-2007 12:17 AM

Quote:

Originally Posted by Barakat (Post 1268049)
its works good but if you click on the "Click here to visit the post with the attachment"

its not functioned as well with the right link ...

showthread.php?p=%1$s

Ok, I've reuploaded the product xml - if you download the new version and overwrite the old one, the template should now have the necessary code to parse the url.

Sorry for the hassle,

Jason

Barakat 06-14-2007 12:25 AM

yes thanks .... works good now .....

rjmjr69 06-14-2007 12:29 AM

Works like a charm if I do as you say. I opened it in IE and got the message thanks this works great now

CMGU 06-14-2007 12:33 AM

thanks..

dope15gd 06-14-2007 01:09 AM

this is quite awesome, thanks

mtlcore 06-14-2007 01:14 AM

Would one be able to view attachments if one is not a member of the site?

puertoblack2003 06-14-2007 01:34 AM

so if i understand this hack will work all browser??

steadicamop 06-14-2007 01:36 AM

Quote:

Originally Posted by mtlcore (Post 1268103)
Would one be able to view attachments if one is not a member of the site?

That is defined by your usergroups, this does not change that, merely check the referring url and if it matches carry on - but firstly it checks user permissions.

steadicamop 06-14-2007 01:37 AM

Quote:

Originally Posted by puertoblack2003 (Post 1268117)
so if i understand this hack will work all browser??

I cannot guarantee every single browser will support it - but I'd like to know if one does not work so I can investigate why.

DJ XtAzY 06-14-2007 02:02 AM

Is it possible to limit Download Accelerators or Managers to download the attachments with just one connection? Most people will use these attachment links and use the download manager and abuse it, causing more bandwidth wastage.

RvG2 06-14-2007 02:04 AM

HI,

I am using this mod VB Image hosting and I am not sure if the images can be hotlinked to other sites. Will your mod will work also on this?

https://vborg.vbsupport.ru/showthread.php?p=1048212
VB image Hosting
Mod Information
Add A Comment
Mark as Installed
Nominate for MOTM
Jump To Comments
The Developer
About Developer
Support Developer
Paypal verification - you must have an account. PayPal Verification
Visit Web Site

Version: 1.0.1, by Ranma2k (Coder) Ranma2k is offline

steadicamop 06-14-2007 02:22 AM

Quote:

Originally Posted by RvG2 (Post 1268134)
HI,

I am using this mod VB Image hosting and I am not sure if the images can be hotlinked to other sites. Will your mod will work also on this?

https://vborg.vbsupport.ru/showthread.php?p=1048212
VB image Hosting
Mod Information
Add A Comment
Mark as Installed
Nominate for MOTM
Jump To Comments
The Developer
About Developer
Support Developer
Paypal verification - you must have an account. PayPal Verification
Visit Web Site

Version: 1.0.1, by Ranma2k (Coder) Ranma2k is offline

I have that installed myself and it does not work on that - only forum attachments, it may be possible to make a plugin which will be supported, if I get a chance I will see what can be done.

Jason

steadicamop 06-14-2007 02:23 AM

Quote:

Originally Posted by XtAzY (Post 1268132)
Is it possible to limit Download Accelerators or Managers to download the attachments with just one connection? Most people will use these attachment links and use the download manager and abuse it, causing more bandwidth wastage.

Not really, that's more server side, plus download accelerators just connect 10+ times, you could limit one connection per IP but this could give problems elsewhere.

HTH

Jason

Mrdby 06-14-2007 02:43 AM

3.6.7?

steadicamop 06-14-2007 06:02 AM

Quote:

Originally Posted by Mrdby (Post 1268146)
3.6.7?

Untested - but I think in all honesty it should work, but feedback appreciated so I can update the most up to date version.

Cheers

Jason

Hornstar 06-14-2007 07:51 AM

Can I also request a couple extra features ^^

1. captcha - To ensure a use does not make a bot to download the image over and over to waste my bandwidth on the site, this will make each user who goes to download the image, to verify they are human first (kinda similar to rapidshare ^^ )

2. A count down time, which can be set from the admincp per usergroup, eg. this usergroup can be 10 seconds, this usergroup can be 60 seconds, this usergroup can be no count down timer etc. (kind of similar to rapidshare ^^ )

These 2 extra features integrated into this modification would defantly get my vote for mod of the month!

Barakat 06-14-2007 11:56 AM

Quote:

Originally Posted by Mrdby (Post 1268146)
3.6.7?

works perfect.

projectego 06-14-2007 02:49 PM

Great idea! This should be a default vBulletin feature! Thanks a bunch! :)

steadicamop 06-14-2007 07:04 PM

Quote:

Originally Posted by hornstar1337 (Post 1268264)
Can I also request a couple extra features ^^

1. captcha - To ensure a use does not make a bot to download the image over and over to waste my bandwidth on the site, this will make each user who goes to download the image, to verify they are human first (kinda similar to rapidshare ^^ )

2. A count down time, which can be set from the admincp per usergroup, eg. this usergroup can be 10 seconds, this usergroup can be 60 seconds, this usergroup can be no count down timer etc. (kind of similar to rapidshare ^^ )

These 2 extra features integrated into this modification would defantly get my vote for mod of the month!

Will see what I can do - will release it as a sub-release if I can do this.....

Jason

kether1 06-15-2007 01:54 AM

I just gave this a try, but it would not work with my forum. 3.6.7 (VBSEO). I am guessing it was because my urls are rewritten? Not sure. It sure looks like a nice modification. Thanks for developing it Jason. If you think there is a way to make it work with re-written URLs, I will be installing it!

Regards,
Kether

steadicamop 06-15-2007 02:29 PM

Quote:

Originally Posted by kether1 (Post 1268754)
I just gave this a try, but it would not work with my forum. 3.6.7 (VBSEO). I am guessing it was because my urls are rewritten? Not sure. It sure looks like a nice modification. Thanks for developing it Jason. If you think there is a way to make it work with re-written URLs, I will be installing it!

Regards,
Kether

Can you copy and paste me a link to one of your attachments as it shows with VBSEO please? I will see what happens with the link and url....

Jason

kether1 06-15-2007 06:23 PM

Quote:

Originally Posted by steadicamop (Post 1269037)
Can you copy and paste me a link to one of your attachments as it shows with VBSEO please? I will see what happens with the link and url....

Jason

Hi Jason,

The attachment did not show with the modification enabled. Nothing showed. I already removed the modification from my board and was hoping that you would have a solution so that I could re-install when it was working correctly. Sorry to not have it installed any longer.

Thanks,
K

steadicamop 06-15-2007 06:44 PM

Hmmmm strange, I may install it to see what happens, it does sound like a rewrite issue though, but I'm just not too sure as it may be different for attachments as it is for threads and posts.

I've added this as a Known Issue for the moment while I look into it.

Jason

steadicamop 06-15-2007 06:53 PM

Quote:

Originally Posted by kether1 (Post 1269206)
Hi Jason,

The attachment did not show with the modification enabled. Nothing showed. I already removed the modification from my board and was hoping that you would have a solution so that I could re-install when it was working correctly. Sorry to not have it installed any longer.

Thanks,
K

I don't have VBSEO but I have just installed and tested Zoints SEO and that works fine - it does not rewrite the attachment url, only the thread/post ones - I am very curious to find out what it did to this mod ..... can you give me more of an idea what was happening?

Cheers

Jason

kether1 06-16-2007 01:45 AM

Quote:

Originally Posted by steadicamop (Post 1269227)
I don't have VBSEO but I have just installed and tested Zoints SEO and that works fine - it does not rewrite the attachment url, only the thread/post ones - I am very curious to find out what it did to this mod ..... can you give me more of an idea what was happening?

Cheers

Jason

Hi Jason,

I will install it again tomorrow and make sure to detail the total process and effect. Thanks for working on this. I would really like for this to work! I hope it is not me being an idiot and screwing up the install. :eek:

Thanks,
K

goyo 06-16-2007 05:53 AM

Sorry...I don't get it.

In our board attachments will show only to registered users. It's impossible to hotlink as they'll only "come up" to registered users. It's a vBulletin setting for a long time. Am I missed something here ? :confused:

steadicamop 06-16-2007 06:08 AM

Quote:

Originally Posted by goyo (Post 1269551)
Sorry...I don't get it.

In our board attachments will show only to registered users. It's impossible to hotlink as they'll only "come up" to registered users. It's a vBulletin setting for a long time. Am I missed something here ? :confused:

Not at all - I designed this with my forum in mind and decided to release it, if you set your forum to allow only members to download attachments then you don't need this.

I just felt my forum was best have guest viewable attachments so that's why I made this to prevent my bandwidth being leeched.

steadicamop 06-16-2007 06:10 AM

Quote:

Originally Posted by kether1 (Post 1269436)
Hi Jason,

I will install it again tomorrow and make sure to detail the total process and effect. Thanks for working on this. I would really like for this to work! I hope it is not me being an idiot and screwing up the install. :eek:

Thanks,
K

You certainly can't screw up the install - unless I screwed up the code!

I'm just very curious if it does rewrite the attachment url.

If you PM me your site details I will sign up and can test this out if you would prefer.

Cheers

Jason

badboy_29 06-16-2007 03:13 PM

Very easy to install and it works very well. I already had 2 people email me saying when they clicked files on there site it sent them to my forums.

Triky 06-18-2007 12:00 PM

Nice idea. :)
Installed.

Mrdby 09-23-2007 01:13 PM

this even work with photoplog?

steadicamop 09-28-2007 06:33 PM

Quote:

Originally Posted by Mrdby (Post 1345156)
this even work with photoplog?

Good question ... I see you have it installed, as long as it uses the standard attachment system it should be compatible as that's where the hook is.

Taking this off Beta stage as it's been in use long enough with very few issues.

Mrdby 10-01-2007 11:36 PM

does this work with photoplog?


All times are GMT. The time now is 06:19 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01540 seconds
  • Memory Usage 1,830KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (16)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete