/ Forside / Teknologi / Operativsystemer / Linux / Nyhedsindlæg
Login
Glemt dit kodeord?
Brugernavn

Kodeord


Reklame
Top 10 brugere
Linux
#NavnPoint
o.v.n. 11177
peque 7911
dk 4814
e.c 2359
Uranus 1334
emesen 1334
stone47 1307
linuxrules 1214
Octon 1100
10  BjarneD 875
Apache Referers
Fra : Jesper Nielsen


Dato : 02-07-01 18:21

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 virker desværre ikke, er der nogen der har et forslag?

Serveren er forresten Windows 2000 Server med Apache 1.3.11

/jesper/



 
 
Jacob Bunk Nielsen (02-07-2001)
Kommentar
Fra : Jacob Bunk Nielsen


Dato : 02-07-01 18:51

"Jesper Nielsen" <jn@nielsenit.dk> writes:

> Det virker desværre ikke, er der nogen der har et forslag?

Jeg har ikke lige så mange forslag, men prøv at checke at mod_rewrite
er tilgængeligt på serveren. Det er det ikke som standard på en
hjemmecompiled Apache så vidt jeg husker.

> Serveren er forresten Windows 2000 Server med Apache 1.3.11

Hmmm, lidt skævt ramt gruppe vil jeg så tillade mig at sige. Måske
news:dk.edb.internet.software havde været sagen? Eller måske endda en
af Windows-grupperne.

--
Jacob
Computer Lie #1: You'll never use all that disk space.

http://www.bunk.cc - nu med Emacs effekt

Jesper Nielsen (02-07-2001)
Kommentar
Fra : Jesper Nielsen


Dato : 02-07-01 18:58

> Jeg har ikke lige så mange forslag, men prøv at checke at mod_rewrite
> er tilgængeligt på serveren. Det er det ikke som standard på en
> hjemmecompiled Apache så vidt jeg husker.

mod_rewrite er slået til. Der stod i artiklen, at man skulle huske
mod_rewrite.


> Hmmm, lidt skævt ramt gruppe vil jeg så tillade mig at sige. Måske
> news:dk.edb.internet.software havde været sagen? Eller måske endda en
> af Windows-grupperne.

Ikke umiddelbart. Man må formode, at de fleste Apache brugere befinder sig i
denne gruppe.

/jesper/



Jakob Færch (06-07-2001)
Kommentar
Fra : Jakob Færch


Dato : 06-07-01 15:48

In article <nD207.2784$DJ5.274903@news010.worldonline.dk>,
"Jesper Nielsen" <jn@nielsenit.dk> wrote:

> > Hmmm, lidt skævt ramt gruppe vil jeg så tillade mig at sige. Måske
> > news:dk.edb.internet.software havde været sagen? Eller måske endda en
> > af Windows-grupperne.
>
> Ikke umiddelbart. Man må formode, at de fleste Apache brugere befinder sig i
> denne gruppe.

Det er da en dårlig undskyldning - bare fordi man tilfældigvis er
Apache-bruger, skal man vel ikke overfaldes af Apache-spørgsmål i sin
yndlings-unix-gruppe? Altså sådan rent principielt

Hvad med at prøve dk.edb.internet.webdesign.serverside i stedet?

/Jakob

Poul-Erik Andreasen (05-07-2001)
Kommentar
Fra : Poul-Erik Andreasen


Dato : 05-07-01 15:43

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

Søg
Reklame
Statistik
Spørgsmål : 177513
Tips : 31968
Nyheder : 719565
Indlæg : 6408605
Brugere : 218887

Månedens bedste
Årets bedste
Sidste års bedste