56 lines
2.1 KiB
Ruby
56 lines
2.1 KiB
Ruby
cask 'wireshark' do
|
|
version '2.6.1'
|
|
sha256 'bf5f9a0e810a7cfb360ea69b1b587126432adffe5fa65db902fa761842b55a6a'
|
|
|
|
url "https://www.wireshark.org/download/osx/Wireshark%20#{version}%20Intel%2064.dmg"
|
|
appcast 'https://www.wireshark.org/download/osx/',
|
|
checkpoint: '04ca8c8ffb9f5b6a03a2f97cf6c756a1cbac6a0f91269dfd3597a58fb9a1b8f3'
|
|
name 'Wireshark'
|
|
homepage 'https://www.wireshark.org/'
|
|
|
|
conflicts_with cask: 'wireshark-chmodbpf'
|
|
depends_on macos: '>= :mountain_lion'
|
|
|
|
pkg "Wireshark #{version} Intel 64.pkg"
|
|
|
|
postflight do
|
|
system_command '/usr/sbin/dseditgroup',
|
|
args: [
|
|
'-o', 'edit',
|
|
'-a', Etc.getpwuid(Process.euid).name,
|
|
'-t', 'user',
|
|
'--', 'access_bpf'
|
|
],
|
|
sudo: true
|
|
end
|
|
|
|
uninstall_preflight do
|
|
set_ownership '/Library/Application Support/Wireshark'
|
|
end
|
|
|
|
uninstall pkgutil: 'org.wireshark.*',
|
|
launchctl: 'org.wireshark.ChmodBPF',
|
|
delete: [
|
|
'/private/etc/manpaths.d/Wireshark',
|
|
'/private/etc/paths.d/Wireshark',
|
|
'/usr/local/bin/capinfos',
|
|
'/usr/local/bin/dftest',
|
|
'/usr/local/bin/dumpcap',
|
|
'/usr/local/bin/editcap',
|
|
'/usr/local/bin/mergecap',
|
|
'/usr/local/bin/randpkt',
|
|
'/usr/local/bin/rawshark',
|
|
'/usr/local/bin/text2pcap',
|
|
'/usr/local/bin/tshark',
|
|
'/usr/local/bin/wireshark',
|
|
],
|
|
script: {
|
|
executable: '/usr/sbin/dseditgroup',
|
|
args: ['-o', 'delete', 'access_bpf'],
|
|
must_succeed: false,
|
|
sudo: true,
|
|
}
|
|
|
|
zap trash: '~/Library/Saved Application State/org.wireshark.Wireshark.savedState'
|
|
end
|