Advertisement:

Author Topic: hidden marking  (Read 5317 times)

Offline mikee93

  • Newbie
  • *
  • Posts: 8
hidden marking
« on: April 03, 2021, 02:34:06 PM »
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


Online shadav

  • Support Specialist
  • Sophist Member
  • *
  • Posts: 1,295
  • Gender: Female
    • shadav on Facebook
    • leashadav on GitHub
    • Ask The Muslims: A Place To Ask Honest Questions and Receive Respectful Answers
Re: hidden marking
« Reply #1 on: April 03, 2021, 02:45:51 PM »
um....pretty sure that's unethical....but, for what purpose? and version of smf? and which mod are you using for downloads?

Offline mikee93

  • Newbie
  • *
  • Posts: 8
Re: hidden marking
« Reply #2 on: April 03, 2021, 03:15:27 PM »
Workplace website. Files are constantly leaking and I want to know who it was. I don't use any way
. 2.0.17

Offline shawnb61

  • Dev. Team Mentor
  • Developer
  • SMF Hero
  • *
  • Posts: 3,116
    • sbulen on GitHub
Re: hidden marking
« Reply #3 on: April 03, 2021, 03:26:59 PM »
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

Offline Sir Osis of Liver

  • SMF Super Hero
  • *******
  • Posts: 10,949
  • We were all equal in the end.
Re: hidden marking
« Reply #4 on: April 03, 2021, 03:56:01 PM »
Do you want to track only attachment downloads?
“The best laid schemes o' mice an' men / Gang aft a-gley.” - Robert Burns

Offline mikee93

  • Newbie
  • *
  • Posts: 8
Re: hidden marking
« Reply #5 on: April 03, 2021, 04:06:23 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

Offline Sir Osis of Liver

  • SMF Super Hero
  • *******
  • Posts: 10,949
  • We were all equal in the end.
Re: hidden marking
« Reply #6 on: April 03, 2021, 04:09:05 PM »
You didn't answer my question, are we talking about attachment files?
“The best laid schemes o' mice an' men / Gang aft a-gley.” - Robert Burns

Offline mikee93

  • Newbie
  • *
  • Posts: 8
Re: hidden marking
« Reply #7 on: April 03, 2021, 04:10:44 PM »
You didn't answer my question, are we talking about attachment files?

Yes!

Offline Sir Osis of Liver

  • SMF Super Hero
  • *******
  • Posts: 10,949
  • We were all equal in the end.
Re: hidden marking
« Reply #8 on: April 03, 2021, 04:14:44 PM »
Display.php

Code: [Select]

// 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.
“The best laid schemes o' mice an' men / Gang aft a-gley.” - Robert Burns

Offline mikee93

  • Newbie
  • *
  • Posts: 8
Re: hidden marking
« Reply #9 on: April 03, 2021, 04:35:20 PM »
Display.php

Code: [Select]

// 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

Offline Sir Osis of Liver

  • SMF Super Hero
  • *******
  • Posts: 10,949
  • We were all equal in the end.
Re: hidden marking
« Reply #10 on: April 03, 2021, 04:38:28 PM »
You just add the one line as shown, don't change anything else.
“The best laid schemes o' mice an' men / Gang aft a-gley.” - Robert Burns

Online shadav

  • Support Specialist
  • Sophist Member
  • *
  • Posts: 1,295
  • Gender: Female
    • shadav on Facebook
    • leashadav on GitHub
    • Ask The Muslims: A Place To Ask Honest Questions and Receive Respectful Answers
Re: hidden marking
« Reply #11 on: April 03, 2021, 05:07:47 PM »
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.

Offline mikee93

  • Newbie
  • *
  • Posts: 8
Re: hidden marking
« Reply #12 on: April 04, 2021, 04:57:23 AM »
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.

Online @rjen

  • Sr. Member
  • ****
  • Posts: 712
  • Gender: Male
    • FJR-club Nederland
Re: hidden marking
« Reply #13 on: April 04, 2021, 05:23:38 AM »
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.0 with Tinyportal 2.0.1 at www.fjr-club.nl
Testing SMF 2.1 with Tinyportal 2.1.0 at test2.fjr-club.nl

Offline mikee93

  • Newbie
  • *
  • Posts: 8
Re: hidden marking
« Reply #14 on: April 05, 2021, 06:48:34 AM »
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?