The Forum has been Updated
The code has been upgraded to the latest .NET core version. Please check instructions in the Community Announcements about migrating your account.
Does any know of an anti leach script that can be integrated in to the snitz forum primarily to stop hot linking of images and be able to replace the hot linked image with a custom image for example "this image has been hotlink from site name"
Ideally I would like it to be able to work on subdirectories too, really for members photo gallery's.
any help, advice would be appreciated.<
Ideally I would like it to be able to work on subdirectories too, really for members photo gallery's.
any help, advice would be appreciated.<
Sist redigert av
Postet den
the only way to do this effectively is either using a .net httphandler or an isapi dll<
Postet den
Free dll - http://www.michaelbrumm.com/leechblocker.html<
Podge.
The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)
My Mods: CAPTCHA Mod | GateKeeper Mod Tutorial: Enable subscriptions on your board
Warning: The post above or below may contain nuts.
My Mods: CAPTCHA Mod | GateKeeper Mod Tutorial: Enable subscriptions on your board
Warning: The post above or below may contain nuts.
Postet den
What a great find!<
Postet den
unfortunate problem is that to work effectively it usese the http referrer which as we all know to well nasty programs like Norton don't transmit, so you may end up hiding your images from your own users<
Postet den
here is a light version of my anti leach script i use...
(i use it for the file attachment, picture album, images and downloads)
- it is the light version only for images
make a new file called: getfile.asp store these lines in it:
<%
If InStr(Request.ServerVariables("HTTP_REFERER"),"topic.asp") or _
InStr(Request.ServerVariables("HTTP_REFERER"),"pop_preview.asp") or _
InStr(Request.ServerVariables("HTTP_REFERER"),"post.asp") then
FileName = Request.QueryString("FName")
Response.Redirect ("../img/folder_with_stored_images/" & FileName & "")
else
Response.Redirect ("../img/leacher.jpg")
end if
%>
and place the img tag to where you need:
<img src="getfile.asp?FName=imagetoshow.jpg">
if somebody view e.g. the topic page the image will displayed
if somebody copy the url he will get the leacher image...
=========================================================
if somebody like to have the full version of the antileacher mod (not published yet!) let me know
<
- it is the light version only for images
make a new file called: getfile.asp store these lines in it:
<%
If InStr(Request.ServerVariables("HTTP_REFERER"),"topic.asp") or _
InStr(Request.ServerVariables("HTTP_REFERER"),"pop_preview.asp") or _
InStr(Request.ServerVariables("HTTP_REFERER"),"post.asp") then
FileName = Request.QueryString("FName")
Response.Redirect ("../img/folder_with_stored_images/" & FileName & "")
else
Response.Redirect ("../img/leacher.jpg")
end if
%>
and place the img tag to where you need:
<img src="getfile.asp?FName=imagetoshow.jpg">
if somebody view e.g. the topic page the image will displayed
if somebody copy the url he will get the leacher image...
=========================================================
if somebody like to have the full version of the antileacher mod (not published yet!) let me know
ich finds genial...
bei uns ist es ratzekuz dunkel und bei dene alle heller nachmittag 
Sist redigert av
Postet den
see my post above yours for cautions on using such scripts<
Postet den
All the same, I think the same advice should apply here as did for a fair while until the referer mod was incorporated into the main release... if any users have problems and complain tell them to "stop using crap software" or words to that effect anyway
<
Postet den
Sorry for not replying sooner I've been busy. Many thanks for all your replies, I will have a closer look when I get home tomorrow, thanks once again
Sonic, at a quick look the only problem I can see with it being used for a members gallery are the folders names for all members "folder_with_stored_images" since images are stored in individual folder names for each member ie /uploaded/rasure/ for my member name.
Unfortunately I don't have access to the server for DLL files<
Sonic, at a quick look the only problem I can see with it being used for a members gallery are the folders names for all members "folder_with_stored_images" since images are stored in individual folder names for each member ie /uploaded/rasure/ for my member name.
Unfortunately I don't have access to the server for DLL files<
Sist redigert av
Postet den
for the showing fotos use this:
make a file called getfile.aspand insert this:
check the file pathes for your files (red marked)
==========================================
make a file called base64.aspand insert this:
i use it to encode the member id so it is not so easy to decode the real folder of a file. further i use a "file_save_path" (a another folder) so the real path of a file looks like this http://192.168.0.9/files/ds9f7sda9f70asd5chu/1/file.txt
==========================================
on the page you want to see the image
include the base 64 for encode the "member folder"
and replace the <img ....... > tag with the "getfile.asp......" tag
to show the image only if you come from a page witch are allowed to show the image
e.g.
<!--#INCLUDE FILE="base64.asp"-->
<img name='img' src="getfile.asp?view=img&FName=<% = Base64Encode(M_Name) %>/image_file_name.jpg>
<
make a file called getfile.aspand insert this:
Code:
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="base64.asp"-->
<%
'############### site pass beginn
If InStr(Request.ServerVariables("HTTP_REFERER"),"pop_photo_view.asp") or _
InStr(Request.ServerVariables("HTTP_REFERER"),"photo_album_view.asp") then
'############### site pass end
select case Request.QueryString("view")
'############### get image beginn
case "img"
FName = Request.QueryString("FName")
if Instr(FName,"/") then
UserFolder = Base64Decode(left(FName, Instr(FName,"/")-1))
FileName = right(FName, len(FName)-Instr(FName,"/"))
Response.Redirect ("../uploaded/" & UserFolder & "/" & FileName & "")
else
Response.Redirect ("../img/page/not_found.jpg")
end if
'############### get image end
'############### leacher beginn
case else
Response.Redirect ("../img/page/leacher.jpg")
end select
else
Response.Redirect ("../img/page/leacher.jpg")end If
'############### leacher end
%>check the file pathes for your files (red marked)
==========================================
make a file called base64.aspand insert this:
Code:
<%
Const Base64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789~_"
Function Base64Encode(inData)
Dim cOut, sOut, I
For I = 1 To Len(inData) Step 3
Dim nGroup, pOut, sGroup
nGroup = &H10000 * Asc(Mid(inData, I, 1)) + _
&H100 * MyASC(Mid(inData, I + 1, 1)) + MyASC(Mid(inData, I + 2, 1))
nGroup = Oct(nGroup)
nGroup = String(8 - Len(nGroup), "0") & nGroup
pOut = Mid(Base64, CLng("&o" & Mid(nGroup, 1, 2)) + 1, 1) + _
Mid(Base64, CLng("&o" & Mid(nGroup, 3, 2)) + 1, 1) + _
Mid(Base64, CLng("&o" & Mid(nGroup, 5, 2)) + 1, 1) + _
Mid(Base64, CLng("&o" & Mid(nGroup, 7, 2)) + 1, 1)
sOut = sOut + pOut
Next
Select Case Len(inData) Mod 3
Case 1: '8 bit final
sOut = Left(sOut, Len(sOut) - 2) + "--"
Case 2: '16 bit final
sOut = Left(sOut, Len(sOut) - 1) + "-"
End Select
Base64Encode = sOut
End Function
Function MyASC(OneChar)
If OneChar = "" Then MyASC = 0 Else MyASC = Asc(OneChar)
End Function
Function Base64Decode(ByVal base64String)
Dim dataLength, sOut, groupBegin
base64String = Replace(base64String, vbCrLf, "")
base64String = Replace(base64String, vbTab, "")
base64String = Replace(base64String, " ", "")
dataLength = Len(base64String)
If dataLength Mod 4 <> 0 Then
Err.Raise 1, "Base64Decode", "Bad Base64 string."
Exit Function
End If
For groupBegin = 1 To dataLength Step 4
Dim numDataBytes, CharCounter, thisChar, thisData, nGroup, pOut
numDataBytes = 3
nGroup = 0
For CharCounter = 0 To 3
thisChar = Mid(base64String, groupBegin + CharCounter, 1)
If thisChar = "-" Then
numDataBytes = numDataBytes - 1
thisData = 0
Else
thisData = InStr(1, Base64, thisChar, vbBinaryCompare) - 1
End If
If thisData = -1 Then
Err.Raise 2, "Base64Decode", "Bad character In Base64 string."
Exit Function
End If
nGroup = 64 * nGroup + thisData
Next
nGroup = Hex(nGroup)
nGroup = String(6 - Len(nGroup), "0") & nGroup
pOut = Chr(CByte("&H" & Mid(nGroup, 1, 2))) + _
Chr(CByte("&H" & Mid(nGroup, 3, 2))) + _
Chr(CByte("&H" & Mid(nGroup, 5, 2)))
sOut = sOut & Left(pOut, numDataBytes)
Next
Base64Decode = sOut
End Function
%>i use it to encode the member id so it is not so easy to decode the real folder of a file. further i use a "file_save_path" (a another folder) so the real path of a file looks like this http://192.168.0.9/files/ds9f7sda9f70asd5chu/1/file.txt
==========================================
on the page you want to see the image
include the base 64 for encode the "member folder"
and replace the <img ....... > tag with the "getfile.asp......" tag
to show the image only if you come from a page witch are allowed to show the image
e.g.
<!--#INCLUDE FILE="base64.asp"-->
<img name='img' src="getfile.asp?view=img&FName=<% = Base64Encode(M_Name) %>/image_file_name.jpg>
<
ich finds genial...
bei uns ist es ratzekuz dunkel und bei dene alle heller nachmittag 
Postet den
Many thanks Sonic, I will let you know how it all goes once I've implemented it, I haven't had a great deal of time lately, but I appreciate all your replies and suggestions
<
Email Member
Message Member
Post Moderation
Filopplasting
If you're having problems uploading, try choosing a smaller image.
Forhåndsvis post
Send Topic
Loading...