emonti-buby 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +5 -0
- data/README.rdoc +38 -25
- data/buby.gemspec +2 -2
- data/lib/buby.rb +18 -4
- metadata +2 -2
data/History.txt
CHANGED
data/README.rdoc
CHANGED
@@ -29,12 +29,16 @@ The java BurpExtender included with Buby is an implementation of IBurpExtender w
|
|
29
29
|
|
30
30
|
== REQUIREMENTS:
|
31
31
|
|
32
|
-
|
32
|
+
* JRuby - http://jruby.org
|
33
|
+
Burp is Java based and the extension is developed specifically around JRuby.
|
34
|
+
The C version of ruby will not work.
|
33
35
|
|
34
|
-
|
36
|
+
* Burp (pro or free version): Buby is useless without a copy of Burp.
|
37
|
+
Buby has been tested successfully with both Burp Suite free and pro versions
|
38
|
+
1.2, 1.2.01, and 1.2.05. See http://portswigger.net/
|
35
39
|
|
36
40
|
|
37
|
-
== BUILD/
|
41
|
+
== BUILD/INSTALL:
|
38
42
|
|
39
43
|
=== Gem
|
40
44
|
You should be able to get up and running with just the gem and a copy of Burp.
|
@@ -43,53 +47,62 @@ minus ofcourse, Burp itself.
|
|
43
47
|
|
44
48
|
gem install emonti-buby
|
45
49
|
|
46
|
-
|
47
|
-
|
50
|
+
* IMPORTANT: The buby gem doesn't include a copy of Burp! See manual step #5
|
51
|
+
below. For best results, you'll still want to make your burp.jar available
|
52
|
+
in the ruby runtime library path.
|
48
53
|
|
49
54
|
|
50
55
|
=== Manual
|
51
56
|
Here are manual instructions if you want or need to build things yourself:
|
52
57
|
|
53
|
-
1. Download buby from github
|
58
|
+
Step 1. Download buby from github
|
54
59
|
git clone git://github.com/emonti/buby.git
|
55
60
|
|
56
|
-
2. Compile BurpExtender.java. Include jruby.jar in the classpath:
|
61
|
+
Step 2. Compile BurpExtender.java. Include jruby.jar in the classpath:
|
57
62
|
|
58
63
|
cd buby/java/src
|
59
64
|
javac -classpath (.../jruby/root)/lib/jruby.jar:. BurpExtender.java
|
60
65
|
|
61
|
-
3. Create a new lib/buby.jar
|
66
|
+
Step 3. Create a new lib/buby.jar
|
62
67
|
|
63
|
-
jar cvf
|
68
|
+
jar cvf ../buby.jar .
|
64
69
|
|
65
|
-
|
70
|
+
Note: At this point you can also just do a rake gem:install from the
|
71
|
+
top-level, which will install a local 'buby' gem instead of 'emonti-buby'. If
|
72
|
+
you do this, just skip the next step and move onto step #5.
|
66
73
|
|
67
|
-
|
74
|
+
Step 4. Copy buby.rb and jar to your JRuby lib-path. Locations may vary:
|
68
75
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
methods added for pulling in 'burp.jar' during run-time, this one is by far
|
73
|
-
the least amount of hassle in the long run.
|
76
|
+
cd ../../
|
77
|
+
cp lib/buby.rb (.../jruby)/lib/site_ruby/1.8/
|
78
|
+
cp -p java/buby.jar (.../jruby)/lib/site_ruby/1.8/java/buby.jar
|
74
79
|
|
75
|
-
|
80
|
+
Step 5.
|
81
|
+
|
82
|
+
The last part is a bit tricky. Burp Suite itself is obviously not included
|
83
|
+
with buby. You'll want to somehow put your 'burp.jar' in a place where it
|
84
|
+
is visible in the JRuby RUBY-LIB paths. There are a few other ways of pulling
|
85
|
+
in Burp during runtime, but this method probably involves the least amount of
|
86
|
+
hassle in the long run.
|
87
|
+
|
88
|
+
JRuby gives you a 'java' site_ruby directory for this kind of thing. Here's a
|
89
|
+
quick way to see jruby's runtime lib-path:
|
76
90
|
|
77
91
|
jruby -e 'puts $:'
|
78
92
|
|
79
93
|
There is usually a '.../jruby/lib/1.8/java' directory reference in there,
|
80
|
-
though the directory may
|
81
|
-
create it.
|
94
|
+
though the actual directory may need to be created.
|
82
95
|
|
83
|
-
|
84
|
-
|
85
|
-
should still be relatively close to this.
|
86
|
-
|
87
|
-
Here's how I have mine set up.
|
96
|
+
Here's how I do it. I have jruby installation under my home directory.
|
97
|
+
Your configuration details can be substituted below.
|
88
98
|
|
89
99
|
mkdir ~/jruby-1.1.5/lib/ruby/1.8/java
|
90
100
|
ln -s ~/tools/burp.jar ~/jruby-1.1.5/lib/ruby/1.8/java/burp.jar
|
91
101
|
|
92
|
-
|
102
|
+
Now everything should be ready to go. Try at least the first few parts of the
|
103
|
+
test below to confirm everything is set up. Or if you installed the gem, just
|
104
|
+
run 'buby' from the command-line.
|
105
|
+
|
93
106
|
|
94
107
|
== TEST AND USAGE EXAMPLE:
|
95
108
|
|
data/buby.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{buby}
|
5
|
-
s.version = "1.0.
|
5
|
+
s.version = "1.0.1"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Eric Monti - Matasano Security"]
|
9
|
-
s.date = %q{2009-05-
|
9
|
+
s.date = %q{2009-05-10}
|
10
10
|
s.default_executable = %q{buby}
|
11
11
|
s.description = %q{Buby is a mashup of JRuby with the popular commercial web security testing tool Burp Suite from PortSwigger. Burp is driven from and tied to JRuby with a Java extension using the BurpExtender API. This extension aims to add Ruby scriptability to Burp Suite with an interface comparable to the Burp's pure Java extension interface.}
|
12
12
|
s.email = %q{emonti@matasano.com}
|
data/lib/buby.rb
CHANGED
@@ -54,11 +54,25 @@ include_class 'BurpExtender'
|
|
54
54
|
class Buby
|
55
55
|
|
56
56
|
# :stopdoc:
|
57
|
-
VERSION = '1.0.
|
57
|
+
VERSION = '1.0.1'
|
58
58
|
LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR
|
59
59
|
PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR
|
60
60
|
# :startdoc:
|
61
61
|
|
62
|
+
def initialize(other=nil)
|
63
|
+
if other
|
64
|
+
raise "arg 0 must be another kind of Buby" unless other.is_a? Buby
|
65
|
+
@burp_extender = other.burp_extender
|
66
|
+
@burp_callbacks = other.burp_callbacks
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
# Makes this handler the active Ruby handler object for the BurpExtender
|
71
|
+
# Java runtime. (there can be only one!)
|
72
|
+
def activate!
|
73
|
+
BurpExtender.set_handler(self)
|
74
|
+
end
|
75
|
+
|
62
76
|
# Returns the internal reference to the BurpExtender instance. This
|
63
77
|
# reference gets set from Java through the evt_extender_init method.
|
64
78
|
def burp_extender; @burp_extender; end
|
@@ -374,8 +388,8 @@ class Buby
|
|
374
388
|
|
375
389
|
# Prepares the java BurpExtender implementation with a reference
|
376
390
|
# to self as the module handler and launches burp suite.
|
377
|
-
def
|
378
|
-
|
391
|
+
def start_burp(args=[])
|
392
|
+
activate!()
|
379
393
|
Java::Burp::StartBurp.main(args.to_java(:string))
|
380
394
|
return self
|
381
395
|
end
|
@@ -390,7 +404,7 @@ class Buby
|
|
390
404
|
h_class ||= self
|
391
405
|
init_args ||= []
|
392
406
|
args ||= []
|
393
|
-
h_class.new(*init_args).
|
407
|
+
h_class.new(*init_args).start_burp(args)
|
394
408
|
end
|
395
409
|
|
396
410
|
# Attempts to load burp with require and confirm it provides the required
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: emonti-buby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Monti - Matasano Security
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-05-
|
12
|
+
date: 2009-05-10 00:00:00 -07:00
|
13
13
|
default_executable: buby
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|