summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-wireless/kismet/files')
-rw-r--r--net-wireless/kismet/files/ruby19_fixes.patch85
-rw-r--r--net-wireless/kismet/files/update-kismet_shootout.patch103
2 files changed, 188 insertions, 0 deletions
diff --git a/net-wireless/kismet/files/ruby19_fixes.patch b/net-wireless/kismet/files/ruby19_fixes.patch
new file mode 100644
index 000000000000..28b704d03c66
--- /dev/null
+++ b/net-wireless/kismet/files/ruby19_fixes.patch
@@ -0,0 +1,85 @@
+commit 09b5076e4cd8338d3b45a760662fc7347f8d93bf
+Author: Mike Kershaw / Dragorn <dragorn@kismetwireless.net>
+Date: Tue Apr 23 10:33:07 2013 -0400
+
+ Ruby 1.9 removed '.' from search path, use require_relative; also remove
+ spurious 'break' in tx code
+
+diff --git a/ruby/kismet.rb b/ruby/kismet.rb
+index 5b18b23..7eab708 100755
+--- a/ruby/kismet.rb
++++ b/ruby/kismet.rb
+@@ -61,8 +61,6 @@ class Kismet
+ rescue Exception => e
+ pp e
+
+- break if @die
+-
+ puts "write error: #{$!}"
+ end
+ end
+diff --git a/ruby/kismet_addsource.rb b/ruby/kismet_addsource.rb
+index 057a514..d3ae968 100755
+--- a/ruby/kismet_addsource.rb
++++ b/ruby/kismet_addsource.rb
+@@ -20,7 +20,7 @@
+
+ require 'socket'
+ require 'time'
+-require 'kismet'
++require_relative 'kismet'
+ require 'pp'
+ require 'optparse'
+
+diff --git a/ruby/kismet_alert_syslog.rb b/ruby/kismet_alert_syslog.rb
+index 6969247..27373a9 100755
+--- a/ruby/kismet_alert_syslog.rb
++++ b/ruby/kismet_alert_syslog.rb
+@@ -20,7 +20,7 @@
+
+ require 'socket'
+ require 'time'
+-require 'kismet'
++require_relative 'kismet'
+ require 'pp'
+ require "getopt/long"
+ require 'syslog'
+diff --git a/ruby/kismet_list.rb b/ruby/kismet_list.rb
+index ec8f0f9..7adffe6 100755
+--- a/ruby/kismet_list.rb
++++ b/ruby/kismet_list.rb
+@@ -20,7 +20,7 @@
+
+ require 'socket'
+ require 'time'
+-require 'kismet'
++require_relative 'kismet'
+
+ def bssidcb(proto, fields)
+ puts "Kismet saw network #{fields['bssid']} manuf #{fields['manuf']} on channel #{fields['channel']}"
+diff --git a/ruby/kismet_shootout.rb b/ruby/kismet_shootout.rb
+index accda7e..931360f 100755
+--- a/ruby/kismet_shootout.rb
++++ b/ruby/kismet_shootout.rb
+@@ -21,7 +21,7 @@
+
+ require 'socket'
+ require 'time'
+-require 'kismet'
++require_relative 'kismet'
+ require 'pp'
+ require 'optparse'
+
+diff --git a/ruby/kismet_sql.rb b/ruby/kismet_sql.rb
+index 9fe581d..b878979 100755
+--- a/ruby/kismet_sql.rb
++++ b/ruby/kismet_sql.rb
+@@ -22,7 +22,7 @@
+
+ require 'socket'
+ require 'time'
+-require 'kismet'
++require_relative 'kismet'
+ require 'pp'
+ require "getopt/long"
+ require "sqlite3"
diff --git a/net-wireless/kismet/files/update-kismet_shootout.patch b/net-wireless/kismet/files/update-kismet_shootout.patch
new file mode 100644
index 000000000000..57ff69f7bec2
--- /dev/null
+++ b/net-wireless/kismet/files/update-kismet_shootout.patch
@@ -0,0 +1,103 @@
+From 0ee73bd14c71e44ce53bc1016b871dcb6965e443 Mon Sep 17 00:00:00 2001
+From: "Rick Farina (Zero_Chaos)" <zerochaos@gentoo.org>
+Date: Tue, 17 Mar 2015 12:57:16 -0400
+Subject: [PATCH] update kismet_shootout
+
+make a little more detailed, 100.00 instead of 100.
+also extend space for name now that wlan0mon is a common interface name
+---
+ ruby/kismet_shootout.rb | 30 +++++++++++++++++++++++-------
+ 1 file changed, 23 insertions(+), 7 deletions(-)
+
+diff --git a/ruby/kismet_shootout.rb b/ruby/kismet_shootout.rb
+index 931360f..61f70b0 100755
+--- a/ruby/kismet_shootout.rb
++++ b/ruby/kismet_shootout.rb
+@@ -48,7 +48,7 @@ $lines_per_header = 10
+ $num_printed = 10
+
+ # output type (std, pretty, csv)
+-$output_type = "std"
++$output_type = "pretty"
+
+ def sourcecb(proto, fields)
+ if fields["error"] != "0"
+@@ -102,11 +102,11 @@ def sourcecb(proto, fields)
+ hstr = ""
+
+ if $output_type == "pretty"
+- hstr = sprintf("%s %6.6s %5.5s %8.8s %4.4s", hstr, "", "PPS", "Packets", "Pcnt")
++ hstr = sprintf("%s %8.8s %5.5s %8.8s %7.7s", hstr, "Name", "PPS", "Packets", "Percent")
+
+ else
+ $cards.each { |c|
+- hstr = sprintf("%s %6.6s %5.5s %8.8s %4.4s", hstr, c, "PPS", "Total", "Pcnt")
++ hstr = sprintf("%s %8.8s %5.5s %8.8s %7.7s", hstr, c, "PPS", "Total", "Percent")
+ }
+ end
+
+@@ -141,7 +141,7 @@ def sourcecb(proto, fields)
+ $card_records.each { |cr|
+ cr[1]["printed"] = 1
+
+- printf(" %6.6s %5.5s %8.8s %3d%%\n", cr[1]["interface"], cr[1]["packets"] - cr[1]["last_packets"], cr[1]["packets"], (cr[1]["packets"].to_f / best.to_f) * 100)
++ printf(" %8.8s %5.5s %8.8s %6.2f%%\n", cr[1]["interface"], cr[1]["packets"] - cr[1]["last_packets"], cr[1]["packets"], (cr[1]["packets"].to_f / best.to_f) * 100)
+ }
+
+ t = Time.now.to_i - $start_time
+@@ -163,7 +163,7 @@ def sourcecb(proto, fields)
+ tu += "#{t}s"
+ end
+
+- printf(" %6.6s %5.5s %8.8s %4.4s %6.6s %6.6s\n", "", "", "", "", total - lasttotal, tu)
++ printf(" %8.8s %5.5s %8.8s %7.7s %6.6s %6.6s\n", "", "", "", "", total - lasttotal, tu)
+ else
+ $card_records.each { |cr|
+ cr[1]["printed"] = 1
+@@ -171,7 +171,7 @@ def sourcecb(proto, fields)
+ cname = ""
+ cname = cr[1]["interface"] if $output_type == "pretty"
+
+- str = sprintf("%s %6.6s %5.5s %8.8s %3d%%", str, cname, cr[1]["packets"] - cr[1]["last_packets"], cr[1]["packets"], (cr[1]["packets"].to_f / best.to_f) * 100)
++ str = sprintf("%s %8.8s %5.5s %8.8s %6.2f%%", str, cname, cr[1]["packets"] - cr[1]["last_packets"], cr[1]["packets"], (cr[1]["packets"].to_f / best.to_f) * 100)
+ }
+
+ t = Time.now.to_i - $start_time
+@@ -282,10 +282,18 @@ OptionParser.new do |opts|
+ options[:channel] = c
+ end
+
+- opts.on("--pretty", "Format output with pretty ANSI codes") do
++ opts.on("--pretty", "Format output with pretty ANSI codes (default)") do
+ options[:pretty] = true
+ end
+
++ opts.on("--std", "Do not format output with pretty ANSI codes") do
++ options[:std] = true
++ end
++
++ #opts.on("--csv", "Format output as comma separated values") do
++ # options[:csv] = true
++ #end
++
+ end.parse!
+
+ if options[:host]
+@@ -315,6 +323,14 @@ if options[:pretty]
+ $output_type = "pretty"
+ end
+
++if options[:std]
++ $output_type = "std"
++end
++
++if options[:csv]
++ $output_type = "csv"
++end
++
+ $cards = ARGV
+
+ puts "INFO: Kismet NIC Shootout"
+--
+2.0.5
+