0

I am going to create a website where I will show some images and pdf files. After having searched for several solutions on a way to make impossible to download/copy these files by the visitors (and not finding a solution), I had this idea: as the website will be password protected and visitors will have to accept an agreement before enter, I was thinking about the possibility to serve to each visitor files marked or signed with a hidden "stamp" based on the credentials used to access the website. I.e. I wish to know if someone knows a way to serve dinamically, maybe through php, marked files before bytes reach the client's browsers. In that way, if someone used or shared files downloaded without permission, it would be possible to find the source who did it. Thank you, Federico

  • Did you try it with SQL? – Luca Jung Jul 30 '16 at 15:37
  • what you have tried so far – Rahman Qaiser Jul 30 '16 at 15:46
  • Only for pdf I found FPDF, but it seems to be able to add watermarks, while I would like to add a hidden sign, in the same way this tool http://www.adptools.com/en/signmyimage-description.html does just for images. One way could be buying a tool like that and serving different images to each visitor. Anyway, even if visitors of my website will not be a lot, I think it will be unpractical; furthermore this is just for images. I was guessing if there is a function of php or other languages that can be used in a website to do that for any kind of files. – Federico Tomasi Jul 30 '16 at 16:10

1 Answers1

1

an invisible iframe would do the trick,

<iframe src="">

I had a similar thought a while ago... You could just make a clever 404 page that redirects non subscribers to it.

Their is methods to prevent people downloading the files ...

I used 2 methods but there simple ! - 1. After Adding an Image with

<img src"">

i figured out a neat little workaround to capture the IP's of whoever views that image directly on the page ... Here's exactly how you do it

• Add an ordinary

<img src="/Background" style="width: 50%"> 

Now instead of having the source "src" directly at root "/" , You need to get it's exact location - Like

http://example. com/background

Copy the exact location into clipboard

Now Add this address to a URL Shortening service like is.gd Or a better statistics site with all IP Accesses ... Using a private cloud with monitoring would be easiest to direct it to...

After you have the address shortened, You can check statistics on whoever has accessed the image directly, or just opening the page...

The main reason i point this out is because most Website savers or Offline website viewers will not save your actual file, But a bin file of the url shortening site instead...

I found this extremely annoying trying to retrieve my original images from old hosts because it removes what Website it is from when it becomes a Shortened link... This means the above code is all they see of your file ... just that its hosted at /background... This is because i shortened a direct link, It thought it was downloading a direct file at root " / " .. not http://is. gd/ background - Actually i. imgur. com/etc...


  1. Cloaking
    After realising i could manually reverse the original URL if i new what URL Shortening service had been used " i remembered luckily ", I thought it's not that secure, soo I looked into using Cloaking as a method of shortening the url ... Cloaking is placing a direct file as a sub domain inside a <iframe> If the person tried to open the sub domain, They would get an immediate download of the file however... So if you use the sub domain like impossible pass585777%6%6%6%534%4yhyyyy.awesome.com .. It would make it harder to download, Alot harder ...

I personally like URL shortening for this.. If you had your own shortening service that only showed you who accessed direct file links, you would have a protection method of the files Also another method would be to Encrypt an Iframe for the page... Unfortunately most of the Encryption is converting to java script, So your page will only work on a javascript compatible device ...

. To add encryption to your site it'll look like this

Before

 <div align="center">
 <iframe  style="width: 100%; height: 100%" scrolling="no" frameborder="0" src="https://Example.com"></iframe>
  </div>  

After

<script type="text/javascript">
<!-- HTML Encryption provided by            www.webtoolhub.com For Example -->
 <!--
 document.write(unescape('%3c     %64%69%76%20%61%6c%69%67%6e%3d  %22%63%65%6e%74%65%72%22%3e%0d%0a%20%3c%69%66%72%61%6d%65%20%20%73%74%79%6c%65%3d%22%77%69%64%74%68%3a%20%31%30%30%25%3b%20%68%65%69%67%68%74%3a %20%31%30%30%25%22%20%73%63%72%6f%6c%6c%69%6e%67%3d%22%6e%6f%22%20%66%72%61%6d%65%62%6f%72%64%65%72%3d%22%30%22%20%73%72%63%3d%22%68%74%74%70%73%3a%2f%2f%45%78%61%6d%70%6c%65%2e%63%6f%6d%22%3e%3c%2f%69%66%72%61%6d%65%3e%0d%0a%3c%2f%64%69%76%3e'));    //-->


To add this to your site, By WebToolHub

    <table cellpadding="5" cellspacing="0" border="0" style="width: 100%; border-collapse: collapse">
  <tr>
  <td>
  <table cellpadding="2" cellspacing="0" style="border-collapse: collapse; text-align:center; width:500px;">
      <tr>
      <td>
        <b>Insert HTML Code to Encrypt</b>
      </td>
   </tr>
   <tr>
      <td>
        <textarea type="text" name="inputdata" value="" style="width:98%; height:120px" ></textarea>
      </td>
   </tr>
   <tr>
      <td>
        <input type="button" value="Encrypt" onclick="OnSubmitPluginInput(this,'http://www.webtoolhub.com/plugins/wt561359-html-encrypter.aspx');" />
      </td>
   </tr>
  </table>
</td>
  </tr>
   <tr>
<td>
  <iframe name="pluginframe561359" frameborder="0" style="width: 100%; height: 300px"></iframe>
</td>
</tr>
<tr>
<td style="font-size: 9pt; font-family: Verdana, Arial;">
  Powered by: <a href="http://www.webtoolhub.com/tn561359-html-encrypter.aspx" title="Free Webmaster Tools">WebToolHub.com</a>
</td>
  </tr>
 </table>
 <script type="text/javascript" src="https://secure.webtoolhub.com/plugin.axd"></script>
Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
Empire of E
  • 588
  • 6
  • 12