Detect ADS For A File

Is there any way I can tell whether a file has ADS associated with it? I am concerned about the nefarious uses of ADS not just saving comments for a file. If not, can a future enhancement allow such files to be found and indicated (like with a different color)?

For a quick overview, you could use a column that shows the number of streams:

function OnInit(initData) {
    initData.name = 'CountADS';
    initData.version = '2022-05-22';
    initData.url = 'https://resource.dopus.com/t/detect-ads-for-a-file/41306';
    initData.desc = 'Show the number of ADS per item';
    initData.default_enable = true;
    initData.min_version = '12.0';
}

function OnAddColumns(addColData) {
    var col = addColData.AddColumn();
    col.name = 'CountADS';
    col.method = 'OnColumn';
    col.type = 'number';
}

function OnColumn(scriptColData) {
    scriptColData.value = DOpus.FSUtil().GetADSNames(scriptColData.item).count;
}

ColumnCountADS.js.txt


For an in-depth analysis, try Nirsoft's AlternateStreamView:

1 Like

Are there many things that use ADS in a way that would cause harm? I think antivirus knows to look in ADS when/where it matters these days, and it's not something I've heard is a problem (beyond doing the occasional check if something seems amiss, like a drive has less space than it should). But maybe there's something out there I'm not aware of.

1 Like

It is not harmfull (at least for me), but Dopus is adding ADS after performing SetAttr META *. Is this an expected behavior?


I expect those are empty metadata structures (just a header in one case and completely empty in the other). It's nothing to worry about.

1 Like

Note also that neither of those are the ADS stream that Opus adds; ours is called "OpusMetaInformation".

1 Like