headdesk 0.5.2 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6c217fe427533c3d5657f29f0100f12cdd40ef426ca3499b2964215cc8be0837
4
- data.tar.gz: 4d35cb18aa5e745e802ac99d3974ccb233cdfd70941675fd99cb917cd86f620a
3
+ metadata.gz: c4f09aef81b208b6caa7f4fa1157bdf763d9146b7649b32f274268fbe1c28848
4
+ data.tar.gz: 7b8222dfc6af2276eb9d1ce2ae28becbe283f39a804b0aa106e81930ca70a59c
5
5
  SHA512:
6
- metadata.gz: 3eebf9b7965625340ceaa866bb070afcd5c469f984c4bc290bfcf6adc79a94b85867233e67aa1be486a5a0bb050769eb2686be639e5d9add1c32e65af7fc3b36
7
- data.tar.gz: 995015c8a9e623ad5bf6ebb5671463c487384a05dc533fa1fd0f21467a88b74eedb87ec6e34add8cbcd1086c1aa50c4d26e57adebbea140de751549267cccec1
6
+ metadata.gz: '085550d31184907ff0e996116c4b8fdb5f886a7cea92c679e5521d166aae9d39892c9fd96cc855ac633fd9b4220646cc82c0d7f9eb77863aee4f2767841cc9e1'
7
+ data.tar.gz: ee5999dec6baa9d40edb242cf8dc0fc6e7da97decd6c05df7f06cfeb6fdff2e566daf168edee5eb494c517366ab9da0bba515fa9aab7c9a20876fff70ecabe7d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- headdesk (0.5.2)
4
+ headdesk (0.6.0)
5
5
  awesome_print (~> 1.8)
6
6
  nokogiri (~> 1.10)
7
7
  thor (~> 0.20)
data/README.md CHANGED
@@ -48,17 +48,17 @@ Command line usage instruction:
48
48
 
49
49
  $ headdesk help [COMMAND]
50
50
 
51
- Analize an APK
51
+ Analyze an APK
52
52
 
53
- $ headdesk analize [APK]
53
+ $ headdesk analyze [APK]
54
54
 
55
- This will unpack the APK to a temporary path, analize and print to STDOUT the results in plaintext.
55
+ This will unpack the APK to a temporary path, analyze and print to STDOUT the results in plaintext.
56
56
 
57
57
  For JSON output pass `--json`.
58
58
 
59
- $ headdesk analize --path [path to unpacked APK]
59
+ $ headdesk analyze --path [path to unpacked APK]
60
60
 
61
- This will analize an already unpacked APK.
61
+ This will analyze an already unpacked APK.
62
62
 
63
63
  Unpack an APK
64
64
 
@@ -66,7 +66,7 @@ Unpack an APK
66
66
 
67
67
  This will unpack an APK to the specified DESTINATION, or to the current working directory.
68
68
 
69
- $ headdesk unpack APK [DESTINATION] --analize
69
+ $ headdesk unpack APK [DESTINATION] --analyze
70
70
 
71
71
  This will unpack an APK to the specified DESTINATION, or to the current working directory, and then perform analysis.
72
72
 
@@ -81,17 +81,17 @@ Single Command:
81
81
 
82
82
  $ curl -w "%{url_effective}" --upload-file "PATH_TO_YOUR_APK_FILE" \
83
83
  -L "`curl https://headdesk.cli-apps.teak.io/v1/url`" | \
84
- curl --data @- --retry 10 https://headdesk.cli-apps.teak.io/v1/analize
84
+ curl --data @- --retry 10 https://headdesk.cli-apps.teak.io/v1/analyze
85
85
 
86
- Replace `PATH_TO_YOUR_APK_FILE` with the path to the APK file you want to analize.
86
+ Replace `PATH_TO_YOUR_APK_FILE` with the path to the APK file you want to analyze.
87
87
 
88
88
  ### What this Does
89
89
  1. Requests a URL to upload the APK
90
90
  * `curl https://headdesk.cli-apps.teak.io/v1/url`
91
91
  2. Upload the APK to that URL, and write to STDOUT the URL it just used to upload
92
92
  * `curl -w "%{url_effective}" --upload-file "PATH_TO_YOUR_APK_FILE" -L [Result from Step 1]`
93
- 3. Invoke the 'analize' endpoint, passing the result from Step 2 as the data (via reading from STDIN)
94
- * `curl --data @- --retry 10 https://headdesk.cli-apps.teak.io/v1/analize`
93
+ 3. Invoke the 'analyze' endpoint, passing the result from Step 2 as the data (via reading from STDIN)
94
+ * `curl --data @- --retry 10 https://headdesk.cli-apps.teak.io/v1/analyze`
95
95
 
96
96
  ## Development
97
97
 
@@ -4,11 +4,11 @@ require 'headdesk/apk'
4
4
 
5
5
  module Headdesk
6
6
  #
7
- # Analize an APK/IPA
7
+ # analyze an APK/IPA
8
8
  #
9
- class Analize
9
+ class analyze
10
10
  def self.at(path)
11
- Headdesk::Apk.new(path).analize
11
+ Headdesk::Apk.new(path).analyze
12
12
  end
13
13
  end
14
14
  end
data/lib/headdesk/apk.rb CHANGED
@@ -36,7 +36,7 @@ module Headdesk
36
36
  end
37
37
  end
38
38
 
39
- def analize
39
+ def analyze
40
40
  report = Headdesk::APKReport.new(self)
41
41
 
42
42
  Headdesk::Check.for_apk.each do |check_type|
data/lib/headdesk/cli.rb CHANGED
@@ -12,7 +12,7 @@ module Headdesk
12
12
  # :reek:TooManyStatements
13
13
  class CLI < Thor
14
14
  desc 'unpack FILE [DESTINATION]', 'Unpack an APK or IPA to [DESTINATION] or to the current directory'
15
- method_option :analize, type: :boolean, aliases: '-a'
15
+ method_option :analyze, type: :boolean, aliases: '-a'
16
16
  def unpack(file, destination = nil)
17
17
  # Make sure the input file exists
18
18
  unless File.exist?(file)
@@ -43,8 +43,8 @@ module Headdesk
43
43
  stdout = Headdesk::ApkTool.unpack_to(file, destination)
44
44
  end
45
45
 
46
- # Analize if requested
47
- Headdesk::Analize.at(output_path) if options[:analize]
46
+ # analyze if requested
47
+ Headdesk::Analyze.at(output_path) if options[:analyze]
48
48
  rescue CliError => cli_err
49
49
  STDERR.puts cli_err.message
50
50
  CLI.command_help(Thor::Base.shell.new, 'unpack')
@@ -56,14 +56,14 @@ module Headdesk
56
56
  end
57
57
  end
58
58
 
59
- desc 'analize [FILE]', 'Analize an APK or IPA'
59
+ desc 'analyze [FILE]', 'Analyze an APK or IPA'
60
60
  method_option :path, type: :string
61
61
  method_option :json, type: :boolean
62
- def analize(file = nil)
62
+ def analyze(file = nil)
63
63
  # Make sure input file exsts, if specified
64
64
  unless !file || File.exist?(file)
65
65
  STDERR.puts "Could not find input file: #{file}"
66
- CLI.command_help(Thor::Base.shell.new, 'analize')
66
+ CLI.command_help(Thor::Base.shell.new, 'analyze')
67
67
  return 1
68
68
  end
69
69
 
@@ -78,13 +78,13 @@ module Headdesk
78
78
  # Make sure path exists
79
79
  unless Dir.exist?(path)
80
80
  STDERR.puts "Could not find path: #{path}"
81
- CLI.command_help(Thor::Base.shell.new, 'analize')
81
+ CLI.command_help(Thor::Base.shell.new, 'analyze')
82
82
  return 1
83
83
  end
84
84
 
85
- # Analize
85
+ # analyze
86
86
  begin
87
- report = Headdesk::Analize.at(path)
87
+ report = Headdesk::Analyze.at(path)
88
88
 
89
89
  if options[:json]
90
90
  STDOUT.puts report.to_json
@@ -93,7 +93,7 @@ module Headdesk
93
93
  end
94
94
  rescue CliError => cli_err
95
95
  STDERR.puts cli_err.message
96
- CLI.command_help(Thor::Base.shell.new, 'analize')
96
+ CLI.command_help(Thor::Base.shell.new, 'analyze')
97
97
  return 1
98
98
  rescue StandardError => err
99
99
  STDERR.puts err.message.red
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Headdesk
4
4
  APKTOOL_VERSION = '2.3.4'
5
- VERSION = '0.5.2'
5
+ VERSION = '0.6.0'
6
6
  end
data/lib/headdesk.rb CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  require 'headdesk/apktool'
4
4
  require 'headdesk/version'
5
- require 'headdesk/analize'
5
+ require 'headdesk/analyze'
6
6
  require 'headdesk/apk'
7
7
 
8
8
  #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: headdesk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pat Wilson