News:

Wondering if this will always be free?  See why free is better.

Main Menu

hidden marking

Started by mikee93, April 03, 2021, 02:34:06 PM

Previous topic - Next topic

mikee93

Hi!

How can I make the systen to put some sort of tracking in a file that was downloaded (user name, or something like that) ?

Thanks in advance for the reply


shadav

um....pretty sure that's unethical....but, for what purpose? and version of smf? and which mod are you using for downloads?

mikee93

Workplace website. Files are constantly leaking and I want to know who it was. I don't use any way
. 2.0.17

shawnb61

The practice is called dynamic watermarking.  There are a lot of commercial products that help you do that.  I'm not aware of any SMF mod to integrate with any of them.

Pretty common in highly competitive businesses for things like pricebooks, pre-release marketing materials.  At the very least, if you find a sensitive doc in the wild, you know which logon was used to download the doc.

The watermarks can even be hidden & imperceptable. 
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Sir Osis of Liver

Do you want to track only attachment downloads?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

mikee93

Quote from: Sir Osis of Liver on April 03, 2021, 03:56:01 PM
Do you want to track only attachment downloads?

The point is, if something comes out of the forum, I know who it was. That's why I wanted some kind of solution so that when someone downloads something, they put in some signal for each member

Sir Osis of Liver

You didn't answer my question, are we talking about attachment files?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

mikee93

Quote from: Sir Osis of Liver on April 03, 2021, 04:09:05 PM
You didn't answer my question, are we talking about attachment files?

Yes!

Sir Osis of Liver

Display.php



// Download an attachment.
function Download()
{
global $txt, $modSettings, $user_info, $scripturl, $context, $sourcedir, $topic, $smcFunc;

log_error('Attachment download');

// Some defaults that we need.



Every download attempt will log an error, giving you username, ip, timestamp, and id_attach.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

mikee93

Quote from: Sir Osis of Liver on April 03, 2021, 04:14:44 PM
Display.php



// Download an attachment.
function Download()
{
global $txt, $modSettings, $user_info, $scripturl, $context, $sourcedir, $topic, $smcFunc;

log_error('Attachment download');

// Some defaults that we need.



Every download attempt will log an error, giving you username, ip, timestamp, and id_attach.

syntax error, unexpected end of file

Sir Osis of Liver

You just add the one line as shown, don't change anything else.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

shadav

sorry I thought you meant as in placing something on their system....not as in for your end to know who downloaded the file

to show who downloaded attachments: https://custom.simplemachines.org/mods/index.php?mod=4146

though this isn't going to really help if you find it uploaded somewhere else...but you could always send a DMCA to where it's uploaded at.

mikee93

Thank you all for help but you might have misunderstood me. I want the mark on the file itself. If a person downloads them and it gets out on the net, i could see who was it. I want to see a solution for this.

@rjen

That would require some sort of watermark being automatically applied to a file on download. Pretty sure no such solution exists. Mind you: you did not mention a file format, so theoretically a download could be anything: pdf jpg doc xls exe zip etc....

How do you expect any tool to watermark any file type ?
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

mikee93

i ended up solving it with this code:

Quote$filename = getAttachmentFilename($real_filename, $_REQUEST['attach'], $id_folder, false, $file_hash);

$h=fopen($filename,"r");
      $tartalom = fread($h, filesize($filename));
      fclose($h);
      //$file["type"] = "application/pdf";
      
      $file["name"] = $real_filename;
      $file["content"] = $tartalom."*".$context['user']['id'];
      
      pushfile($file);

}

But if they convert the file, the ID disappears. Is there any idea to sove this?

Advertisement: