get-voodoo 0.0.8 → 0.0.11

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8d3851b2c31c331e38b243337a5c0d936074f7deca6e8ee49890d3df78b30340
4
- data.tar.gz: b895a82659f76abed132b18651f2080d4754c271c262faa6a49ce451ddcdfc3c
3
+ metadata.gz: 965c3f91b6855d9b381e18ced1bfee172e5273d3180d50ef7a2892a66adbd30d
4
+ data.tar.gz: e20ea428ba96e9c5f82ab31a5bab21761c189cd451d05b31bbc38ec0f857b56d
5
5
  SHA512:
6
- metadata.gz: 84533da03d4a48db14081bacc9412c416982458fabca6ce0bbeacb290714e2c274d42d35a198f8e90834432415c94f139e7b4fa07a99a85cb329d44d8e0ca0a8
7
- data.tar.gz: e0ad78c8fb895bf0f62b53314a950b1f38dfd74e59cbcc298f08bafa4f54f8734f19dce40bdd65bcdfb7aea9bd31d608680f3b3cb6c9c27d50e1c425e87077c9
6
+ metadata.gz: a8a34ddd9b063f44353195203f633f16e9fcdb872cbab1b52662b2e9582a9af5ba4ced78c708cafebd9408196a5dfd7034296b141acc11b13bdc9a05b27920b9
7
+ data.tar.gz: 03c5e0884a62321e2053b93a3f8d606252bb127aded3748a997f33002d56070720e9a63a835ab96abbf2e70c1c99b8d0fb4550e11348c4ccd2cdc6921cfe4d2e
data/bin/voodoo CHANGED
@@ -7,4 +7,7 @@ $LOAD_PATH << lib_dir unless $LOAD_PATH.include?(lib_dir)
7
7
 
8
8
  require 'voodoo/cli'
9
9
 
10
- VOODOO::CLI.start(ARGV)
10
+ begin
11
+ VOODOO::CLI.start(ARGV)
12
+ rescue Interrupt => e
13
+ end
@@ -6,10 +6,9 @@ module VOODOO
6
6
  class Browser
7
7
  attr_reader :extension
8
8
  attr_accessor :bundle
9
- attr_accessor :profile
10
9
  attr_accessor :process_name
11
10
 
12
- def initialize(bundle: nil, process_name: nil, profile: nil, extension: Extension.new)
11
+ def initialize(bundle: nil, process_name: nil, extension: Extension.new)
13
12
  @bundle = bundle
14
13
  @extension = extension
15
14
  @process_name = process_name
@@ -50,17 +49,16 @@ module VOODOO
50
49
  @extension.manifest[:permissions] += permissions
51
50
  end
52
51
 
53
- def hijack(urls = [])
52
+ def hijack(urls = [], flags: '')
54
53
  # kill the browser process twise, to bypass close warning
55
54
  `pkill -a -i "#{@process_name}"`
56
55
  `pkill -a -i "#{@process_name}"`
57
- sleep 0.1
56
+ sleep 0.2
58
57
 
59
58
  urls = [urls] unless urls.kind_of? Array
60
59
  urls = urls.uniq
61
60
 
62
- profile_dir = "--profile-directory=\"#{@profile}\"" if @profile != nil
63
- `open -b "#{@bundle}" --args #{profile_dir} --load-extension="#{@extension.save}" #{urls.shift}`
61
+ `open -b "#{@bundle}" --args #{flags} --load-extension="#{@extension.save}" #{urls.shift}`
64
62
 
65
63
  if urls.length > 0
66
64
  sleep 0.5
data/lib/voodoo/cli.rb CHANGED
@@ -6,7 +6,7 @@ require 'voodoo/browser'
6
6
 
7
7
  module VOODOO
8
8
 
9
- VERSION = 'v0.0.8'
9
+ VERSION = 'v0.0.11'
10
10
 
11
11
  class CLI < Thor
12
12
 
@@ -90,7 +90,7 @@ module VOODOO
90
90
  end
91
91
 
92
92
  option :browser, :type => :string, :aliases => :b, :default => nil
93
- option :format, :type => :string, :aliases => :f, :default => 'none', :desc => 'json, payload, none'
93
+ option :format, :type => :string, :aliases => :f, :default => 'none', :desc => 'json, payload, payload:base64decode, none'
94
94
  option :output, :type => :string, :aliases => :o, :desc => 'File path', :default => nil
95
95
  option :urls, :type => :array, :aliases => :x, :default => []
96
96
  option :params, :type => :hash,:aliases => :p, :default => {}
@@ -134,7 +134,7 @@ module VOODOO
134
134
  output_handler.handle(event)
135
135
  end
136
136
  else
137
- browser.add_script(matches: matches,content: content, options: options[:params], background: background)
137
+ browser.add_script(matches: matches, content: content, file: file, options: options[:params], background: background)
138
138
  end
139
139
  end
140
140
 
@@ -144,7 +144,7 @@ module VOODOO
144
144
  urls = browser_inst['urls']
145
145
  end
146
146
 
147
- browser.hijack urls
147
+ browser.hijack urls, flags: browser_inst['flags'] || ''
148
148
  end
149
149
 
150
150
  def self.exit_on_failure?
data/lib/voodoo/output.rb CHANGED
@@ -1,3 +1,5 @@
1
+ require 'base64'
2
+
1
3
  module VOODOO
2
4
 
3
5
  class Output
@@ -48,6 +50,8 @@ module VOODOO
48
50
  write JSON.generate(event)
49
51
  when 'payload'
50
52
  write JSON.generate(event[:payload])
53
+ when 'payload:base64decode'
54
+ write Base64.decode64(event[:payload])
51
55
  else
52
56
  write JSON.generate(event)
53
57
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: get-voodoo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ron Masas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-12 00:00:00.000000000 Z
11
+ date: 2022-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor