Manual merge of abusehelper and abusesa from parameterize branch
This commit is contained in:
parent
f517230310
commit
09ae1aa84b
10 changed files with 501 additions and 354 deletions
|
@ -1,15 +1,15 @@
|
|||
Facter.add(:botnets) do
|
||||
setcode do
|
||||
botnets = []
|
||||
if File.executable?("/usr/bin/botnet")
|
||||
listcmd = "su -s /bin/sh - nobody -c '/usr/bin/botnet list'"
|
||||
output = Facter::Util::Resolution.exec(listcmd)
|
||||
output.each_line do |line|
|
||||
if m = line.match(/^\[\d+\]\s+(.*\.py)/)
|
||||
botnets << File.basename(File.dirname(m[1]))
|
||||
end
|
||||
end
|
||||
setcode do
|
||||
botnets = []
|
||||
if File.executable?('/usr/bin/botnet')
|
||||
listcmd = "su -s /bin/sh - nobody -c '/usr/bin/botnet list'"
|
||||
output = Facter::Util::Resolution.exec(listcmd)
|
||||
output.each_line do |line|
|
||||
if m = line.match(/^\[\d+\]\s+(.*\.py)/)
|
||||
botnets << File.basename(File.dirname(m[1]))
|
||||
end
|
||||
botnets.sort.join(',')
|
||||
end
|
||||
end
|
||||
botnets.sort.join(',')
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue