Jesper Nielsen wrote:
>
> Hejsa!
>
> Jeg har af en kunde fået til opgave at sikre, at man ikke kan "hotlinke" til
> dennes content, og har på ApacheToday fundet følgende eksempel (skal
> indsættes i en .htaccess fil i det bibliotek der skal beskyttes mod
> hotlinking:
>
> -----------
> Options Includes FollowSymLinks
> AddType text/x-server-parsed-html .html .htm .shtml .htm
> AddType video/quicktime qt mov
>
> AuthUserFile /dev/null
> AuthGroupFile /dev/null
> RewriteEngine on
> RewriteOptions inherit
> RewriteCond %{HTTP_REFERER} !^$
> RewriteCond %{HTTP_REFERER} !^
http://.*domain.com/.*$ [NC]
> RewriteCond %{HTTP_REFERER} !^
http://.*domain.com:80/.*$ [NC]
> RewriteCond %{HTTP_REFERER} !^
http://xxx.xxx.xx.xx/.*$ [NC]
> RewriteCond %{HTTP_REFERER} !^
http://xxx.xxx.xx.xx:80/.*$ [NC]
> RewriteCond %{HTTP_REFERER} !^
http://localhost:8081/.*$ [NC]
> RewriteRule .*[Jj][Pp][Gg]$|.*[Gg][Ii][Ff]$
http://localhost:8081/badref.htm
>
> RewriteCond %{HTTP_USER_AGENT} ^DISCo\Pump.* [OR]
> RewriteCond %{HTTP_USER_AGENT} ^Drip.* [OR]
> RewriteCond %{HTTP_USER_AGENT} ^EirGrabber.* [OR]
> RewriteCond %{HTTP_USER_AGENT} ^ExtractorPro.* [OR]
> RewriteCond %{HTTP_USER_AGENT} ^EyeNetIE.* [OR]
> RewriteCond %{HTTP_USER_AGENT} ^FlashGet.* [OR]
> RewriteCond %{HTTP_USER_AGENT} ^GetRight.* [OR]
> RewriteCond %{HTTP_USER_AGENT} ^Gets.* [OR]
> RewriteCond %{HTTP_USER_AGENT} ^Go!Zilla.* [OR]
> RewriteCond %{HTTP_USER_AGENT} ^Go-Ahead-Got-It.* [OR]
> RewriteCond %{HTTP_USER_AGENT} ^Grafula.* [OR]
> RewriteCond %{HTTP_USER_AGENT} ^IBrowse.* [OR]
> RewriteCond %{HTTP_USER_AGENT} ^InterGET.* [OR]
> RewriteCond %{HTTP_USER_AGENT} ^Internet\Ninja.* [OR]
> RewriteCond %{HTTP_USER_AGENT} ^JetCar.* [OR]
> RewriteCond %{HTTP_USER_AGENT} ^JustView.* [OR]
> RewriteCond %{HTTP_USER_AGENT} ^MIDown\tool.* [OR]
> RewriteCond %{HTTP_USER_AGENT} ^Mister\PiX.* [OR]
> RewriteCond %{HTTP_USER_AGENT} ^NearSite.* [OR]
> RewriteCond %{HTTP_USER_AGENT} ^NetSpider.* [OR]
> RewriteCond %{HTTP_USER_AGENT} ^Offline\Explorer.* [OR]
> RewriteCond %{HTTP_USER_AGENT} ^PageGrabber.* [OR]
> RewriteCond %{HTTP_USER_AGENT} ^Papa\Foto.* [OR]
> RewriteCond %{HTTP_USER_AGENT} ^Pockey.* [OR]
> RewriteCond %{HTTP_USER_AGENT} ^ReGet.* [OR]
> RewriteCond %{HTTP_USER_AGENT} ^Slurp.* [OR]
> RewriteCond %{HTTP_USER_AGENT} ^SpaceBison.* [OR]
> RewriteCond %{HTTP_USER_AGENT} ^SuperHTTP.* [OR]
> RewriteCond %{HTTP_USER_AGENT} ^Teleport.* [OR]
> RewriteCond %{HTTP_USER_AGENT} ^WebAuto.* [OR]
> RewriteCond %{HTTP_USER_AGENT} ^WebCopier.* [OR]
> RewriteCond %{HTTP_USER_AGENT} ^WebFetch.* [OR]
> RewriteCond %{HTTP_USER_AGENT} ^WebReaper.* [OR]
> RewriteCond %{HTTP_USER_AGENT} ^WebSauger.* [OR]
> RewriteCond %{HTTP_USER_AGENT} ^WebStripper.* [OR]
> RewriteCond %{HTTP_USER_AGENT} ^WebWhacker.* [OR]
> RewriteCond %{HTTP_USER_AGENT} ^WebZIP.* [OR]
> RewriteCond %{HTTP_USER_AGENT} ^Web\Image\Collector.* [OR]
> RewriteCond %{HTTP_USER_AGENT} ^Web\Sucker.* [OR]
> RewriteCond %{HTTP_USER_AGENT} ^Webster.* [OR]
> RewriteCond %{HTTP_USER_AGENT} ^Wget.* [OR]
> RewriteCond %{HTTP_USER_AGENT} ^eCatch.* [OR]
> RewriteCond %{HTTP_USER_AGENT} ^ia_archiver.* [OR]
> RewriteCond %{HTTP_USER_AGENT} ^lftp.* [OR]
> RewriteCond %{HTTP_USER_AGENT} ^tAkeOut.*
> RewriteRule .[Jj][Pp][Gg]*$ /leeches.html [L]
>
> RewriteCond %{HTTP_REFERER} ^
http://.*adfilter.com.*$ [OR]
> RewriteCond %{HTTP_REFERER} ^
http://207.198.147.*$ [OR]
> RewriteCond %{HTTP_REFERER} ^
http://www.neocities.* [OR]
> RewriteCond %{HTTP_REFERER} ^
http://chat.passagen.s.* [OR]
> RewriteCond %{HTTP_REFERER} ^
http://volpi.sti.com.* [OR]
> RewriteCond %{HTTP_REFERER} ^
http://batepapo0.uol.com.* [OR]
> RewriteCond %{HTTP_REFERER} ^
http://batepapo1.uol.com.* [OR]
> RewriteCond %{HTTP_REFERER} ^
http://batepapo2.uol.com.* [OR]
> RewriteCond %{HTTP_REFERER} ^
http://batepapo3.uol.com.* [OR]
> RewriteCond %{HTTP_REFERER} ^
http://batepapo4.uol.com.* [OR]
> RewriteCond %{HTTP_REFERER} ^
http://batepapo6.uol.com.* [OR]
> RewriteCond %{HTTP_REFERER} ^
http://batepapo7.uol.com.* [OR]
> RewriteCond %{HTTP_REFERER} ^
http://209.2.137.* [OR]
> RewriteCond %{HTTP_REFERER} ^
http://207.126.121.*$ [OR]
> RewriteCond %{HTTP_REFERER} ^
http://.*bianca.com/.*$ [OR]
> RewriteCond %{HTTP_REFERER} ^
http://.*angelfire.com/.*$ [OR]
> RewriteCond %{HTTP_REFERER} ^
http://.*hotmail.*$ [OR]
> RewriteCond %{HTTP_REFERER} ^
http://.*yahoo.com.*$ [OR]
> RewriteCond %{HTTP_REFERER} ^
http://.*geocities.com.*$ [OR]
> RewriteCond %{HTTP_REFERER} ^
http://www.partyhouse.*$
> RewriteRule .[Jj][Pp][Gg]*$ /leeches.html [L]
>
Det er en umulig opgave din chef har sat dig på. Det er altid muligt at
spoofe
en http-haeder. Mange af de programmer der tjekkes for, har helt sikkert
den mulighed indbygget. Ellers kan du bare lave f.eks et perl-script der
gør det. Ovenstående beskytter kun mod banal hotlinkning.
Poul-Erik