clamav-wrapper.app v3.4.6_2 for Mac(付録改修

clamav-wrapper.app v3.4.6_2 for Mac OS X 10.5 Leopard (Xcode 3.1 project files)

open source (GPL)のanti-virus toolkit:Clam AntiVirus を用いて手軽にウィルススキャンを実施したい。そんな俺を支援するためのApplicationのソースファイルです。ビルド後、アプリが使用するClamAVプロダクツはclamdscanとfreshclamで、clamdは_clamavアカウントにてlaunchdデーモンとして運用します。また、Finderツールバーの「情報を見る」ボタンを模倣した、本アプリをキックするためのAppleScriptもオマケで付いています。アプリの動作環境はMacOS X 10.5 Leopardです。あと、過激派による実戦投入例はhttp://d.hatena.ne.jp/bootblack/20090208/p1 に掲載されています。


v 3.4.6_2 and v 3.3.4_11_2

  • 付録のclamav-wrapper.app/Contents/Resources/etc/selectItems_scan.appが巧妙な騙しのえん罪を着せられそうなので(苦笑)改修しました。想定外ですよ(苦笑)。常に戦場にいるつもりの俺は騙されませんでしたけど(苦笑)


具体的には、以下のダイアログはFinder専用で?

tell application "Finder" to open selection using application file "/opt/local/etc/clamav-wrapper.app" as POSIX file

の実力では、ダイアログは一回しか出ず選択アイテムリストに新着アプリが複数ある場合、2つ目はシカトされる。の修正です。

FinderPopでキックするとclamav-wrapper.appウインドゥが上がり、キャラがかぶるので添付のものは上がらないようになっていますが、以下のようにそれっぽいところでactivateを撃てばclamav-wrapper.appウインドゥは上がります。どちらも上記の激ヤバダイアログは出ません。

tell application "Finder" to set SelectedFinderItems to selection

set NamesList to {}
repeat with tgFile in SelectedFinderItems
	set end of NamesList to tgFile as alias
end repeat

tell application "/opt/local/etc/clamav-wrapper.app"
	activate
	open NamesList
end tell