How do you protect a download file from leeching?Read plz.

Questions about programming languages and debugging
Post Reply
User avatar
bnbn1382
forum buddy
forum buddy
Posts: 13
Joined: 15 Aug 2009, 16:00
14

How do you protect a download file from leeching?Read plz.

Post by bnbn1382 »

Like I was going to sell my hacks, because it had been leeched.
My hack (game) contains about 9000 file edits, which will basically do not patch for a long time.


--
Is there any coding, or made codes that prevents a certain file to be viewed, unless it is approved IP address, and approved password, and one computer at a time etc?

User avatar
leetnigga
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 447
Joined: 28 Jul 2009, 16:00
14

Post by leetnigga »

DRM

It's the devil and I would strongly recommend you not to get into it. Everybody will hate you for it.

What exactly is it you're distributing here anyway?

User avatar
bnbn1382
forum buddy
forum buddy
Posts: 13
Joined: 15 Aug 2009, 16:00
14

Post by bnbn1382 »

I am just trying to prevent from leeching.
The program I share with, they leaked it to someone else, and I want to protect it now.

User avatar
bad_brain
Site Owner
Site Owner
Posts: 11636
Joined: 06 Apr 2005, 16:00
19
Location: In your eye floaters.
Contact:

Post by bad_brain »

pretty simple if mod_rewrite is available (check via phpinfo), simply create a .htaccess file:

Code: Select all

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^https?://(www\.)?yourdomain\.com/
RewriteRule \.(bmp|tif|gif|jpg|jpeg|jpe|zip|tar|iso|rar|gz|tar)$ /leech.html [F]
while "yourdomain" is the domain where valid download requests come from,
in the next line you set the file extensions to protect from offsite linking and a html document where blocked download attempts are redirected to.

:wink:

P.S. meh, stupid line breaks, check here: http://code.suck-o.com/192

User avatar
bnbn1382
forum buddy
forum buddy
Posts: 13
Joined: 15 Aug 2009, 16:00
14

Post by bnbn1382 »

You know I dont know anything. You have to feed me with a spoon that is right infront of me.
I dont get it. :( sorry man lol.
I see rewrite rule..
My file is .sff, which is a type of game packed file.
but about yourdomain.com thing, i dont get it.. rewrite cond.. idk what it is.. I can create .htaccess file, but do i just paste that in or what..

User avatar
Lundis
Distorter of Reality
Distorter of Reality
Posts: 543
Joined: 22 Aug 2008, 16:00
15
Location: Deadlock of Awesome
Contact:

Post by Lundis »

bnbn1382 wrote:I see rewrite rule..
Then google it. http://www.google.com/search?q=rewrite+rule
bnbn1382 wrote:but about yourdomain.com thing, i dont get it.. rewrite cond.. idk what it
http://www.google.com/search?q=domain
http://www.google.com/search?q=rewrite+cond
bnbn1382 wrote:I can create .htaccess file, but do i just paste that in or what..
http://www.google.com/search?q=.htaccess

Next time, look things up yourself. Saying "I don't know" is no excuse. You should make a habit of googling anything you don't know or haven't heard about before.

PS. you don't have to add "Read Plz." to the topic header, We (suck-o members) will read it anyway. Adding that makes us look like some assholes who don't read certain posts.

User avatar
IceDane
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 197
Joined: 12 Aug 2009, 16:00
14

Post by IceDane »

Lundis wrote:
bnbn1382 wrote:I see rewrite rule..
Then google it. http://www.google.com/search?q=rewrite+rule
bnbn1382 wrote:but about yourdomain.com thing, i dont get it.. rewrite cond.. idk what it
http://www.google.com/search?q=domain
http://www.google.com/search?q=rewrite+cond
bnbn1382 wrote:I can create .htaccess file, but do i just paste that in or what..
http://www.google.com/search?q=.htaccess

Next time, look things up yourself. Saying "I don't know" is no excuse. You should make a habit of googling anything you don't know or haven't heard about before.

PS. you don't have to add "Read Plz." to the topic header, We (suck-o members) will read it anyway. Adding that makes us look like some assholes who don't read certain posts.
If you ask me, it makes the poster look like an asshole who feels like putting it out there that his post is more important than someone else's post.

User avatar
bad_brain
Site Owner
Site Owner
Posts: 11636
Joined: 06 Apr 2005, 16:00
19
Location: In your eye floaters.
Contact:

Post by bad_brain »

sshhh...relax gentlemen... 8)

let's assume your site is named foobar.com, and there are also the download links for your files, then simply replace "yourdomain" with "foobar" (also edit "com" if your site has a .org or .net TLD for example).
by doing this only download requests that come from foobar.com are allowed, if I would place a link to a file on my site for example the download would be blocked, because the request would come from suck-o.com and not from foobar.com.
to protect .ssf files you simply have to replace (bmp|tif|gif|jpg|jpeg|jpe|zip|tar|iso|rar|gz|tar) with (ssf), if you want to protect ssf and zip files for example use (ssf|zip) and so on.

you can create a .htaccess file with your usual text editor, simply copy&paste the code and edit it for your needs as explained above, then upload it to the directory you want to protect from leeching and hotlinking.
notice .htaccess is a hidden file on Linux systems (the dot makes it a hidden file to be exact), so after uploading it you will not see it in your ftp client until you enable to show hidden files too in the ftp client settings.... :wink:

User avatar
leetnigga
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 447
Joined: 28 Jul 2009, 16:00
14

Post by leetnigga »

He's not talking about leeching in the way that people post direct download links to his files. He probably doesn't even have the files up on his own website.

His problem is that when he receives money and sends his files to someone, there's nothing stopping his customers from distributing his files for free.

User avatar
bnbn1382
forum buddy
forum buddy
Posts: 13
Joined: 15 Aug 2009, 16:00
14

Post by bnbn1382 »

I do have the download up on my site, but with password enabled.
That will block the indirect linking, but not certain IPs, and leeching problem. The person can just repost the file, and it will be public for to leech.
Lundis wrote:
bnbn1382 wrote:I see rewrite rule..
Then google it. http://www.google.com/search?q=rewrite+rule
bnbn1382 wrote:but about yourdomain.com thing, i dont get it.. rewrite cond.. idk what it
http://www.google.com/search?q=domain
http://www.google.com/search?q=rewrite+cond
bnbn1382 wrote:I can create .htaccess file, but do i just paste that in or what..
http://www.google.com/search?q=.htaccess

Next time, look things up yourself. Saying "I don't know" is no excuse. You should make a habit of googling anything you don't know or haven't heard about before.

PS. you don't have to add "Read Plz." to the topic header, We (suck-o members) will read it anyway. Adding that makes us look like some assholes who don't read certain posts.
I am not that dumb. I know what .htaccess and what domain is.
But using your google links, will not probably help me solve things that I do not know.

Look what I said.
Not sure if you are American or fluent English speaker or not, but obviously, that is not what I have asked for.

User avatar
Lundis
Distorter of Reality
Distorter of Reality
Posts: 543
Joined: 22 Aug 2008, 16:00
15
Location: Deadlock of Awesome
Contact:

Post by Lundis »

bnbn1382 wrote:I am not that dumb. I know what .htaccess and what domain is.
But using your google links, will not probably help me solve things that I do not know.

Look what I said.
Not sure if you are American or fluent English speaker or not, but obviously, that is not what I have asked for.
That's better, skip the I'm-stupid attitude :wink:

User avatar
DNR
Digital Mercenary
Digital Mercenary
Posts: 6114
Joined: 24 Feb 2006, 17:00
18
Location: Michigan USA
Contact:

Post by DNR »

Since the internet is insecure, why don't you have a webbug?
You can have a 1x1 pixel image, a period, that has to be requested from a webserver. Anyone opening the document will make the web bug request the 1x1 pixel item and therefore give you the IP of the computer.
This will allow you to track the proliferation of your document. You could even craft webbugs to be different - so you know who in your group is leaking the documents - same webbug.

DNR
-
He gives wisdom to the wise and knowledge to the discerning. He reveals deep and hidden things; he knows what lies in Darkness, and Light dwells with him.

Post Reply