Page 1 of 1

Lister plugins adv. setup [solved] and 2 other plugin issues

Posted: 2009-04-21, 04:41 UTC
by namorip
:idea: UPDATE First issue solved.
fenix_productions:
PS. I recomend to download Content-Plugin writer's guide. It has nice description of detect string (in ContentGetDetectString() chapter)..
I've searched the net through and through and didn't find any intelligent solution.

Case: SynPlus taking .doc, .exe, .PDF etc.
Goal: prevent SynPlus from doing this without creating elaborate inclusive list:

Code: Select all

(EXT="TXT"|EXT="HTML"|...EXT="***")
[/size]
I guess it can be done by introducing a negative modifier in the settings, i.e.

Code: Select all

!EXT="EXE"|!([0]="%"&[1]="!"&[2]="P"&[3]="S")... etc
[/size]
:arrow: It would also be very convenient to be able to see inside the Lister window which plugins can handle the file - they are checked anyway, aren't they? - and switch between them knowingly and not blindly, because some plugins crash TC or even other programs like antiviruses or even not-so-stable systems. There was an external utility for for checking which plugin handles what but it was very buggy and incomplete, and i gave it up years ago.

:arrow: Another thing, other type of plugins but the same idea, if one could review the list of packer plugins handling an unknown/uncommon/incorrectly named file and choose the one by wich an archive is handled, it could save a lot of pain.

Posted: 2009-04-21, 09:12 UTC
by fenix_productions
2namorip
No need for "introducing, it's already implemented:
content plugin help wrote:!() NOT: The expression inside the braces will be inverted. Note that the braces are necessary!
I might be wrong but I think your expression is incorrect for your needs: for OR operator (pipe |) if at least one part of expression is true, than whole is. You should use AND (&).

So:

Code: Select all

!( EXT="EXE" ) & !( [0]="%"&[1]="!"&[2]="P"&[3]="S" )
Using De Morgan's laws it could be simplified:
So:

Code: Select all

!( EXT="EXE"  | ( [0]="%"&[1]="!"&[2]="P"&[3]="S" ) )
PS. I recomend to download Content-Plugin writer's guide. It has nice description of detect string (in ContentGetDetectString() chapter)..

Posted: 2009-04-21, 15:58 UTC
by Hacker
fenix_productions,
Hm, we are talking about Lister plugins. Is it the same?

Roman

Posted: 2009-04-21, 17:16 UTC
by fenix_productions
2Hacker
I've just compared pages for ListGetDetectString (from WLX help) and ContectGetDetectString (from WDX help).

They are almost the same. The only differences are: methods names (Lister/Content) and that no value is returned for lister (it's void instead of int).

Posted: 2009-04-21, 18:08 UTC
by namorip
2fenix_productions

Ah, great, thank you! It has even greater usability than I implied. Somehow, it doesn't get googled anywhere.

It doesn't, though, negate the other things I mentioned