wappalyzer_rb 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 48dde75542889e89c8a82b707097bbd496a4eccf
4
+ data.tar.gz: f132445f16bdc45deb9d77b230a75e8a457bc489
5
+ SHA512:
6
+ metadata.gz: 50d17808c234047bd105fa52ed38db20ac1446c7567a94ad038072756abf6dd1326af75b565470c68b5448f707b5477be081607916ced218fb134cc62b61b6e0
7
+ data.tar.gz: 4e192989f36e1ae59166ce1f87d229031858e2ed245af8fc9ab43d813c42f7c47727c31448a2223f1725e09ab347101ba2b6014f1cb4a4e0be0889b1d41d4353
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env ruby
2
+ require "wappalyzer_rb"
3
+
4
+ argument_url = ARGV[0]
5
+
6
+ if not argument_url.nil?
7
+ puts WappalyzerRb::Detector.new(argument_url).analysis
8
+ else
9
+ puts "Usage #{__FILE__} example.com"
10
+ end
@@ -14,10 +14,22 @@ module WappalyzerRb
14
14
  end
15
15
 
16
16
  def self.get(url)
17
- uri = URI.parse(url)
18
- http = Net::HTTP.new(uri.host, uri.port)
19
- request = Net::HTTP::Get.new(uri.request_uri)
20
- http.request(request)
17
+ #TODO We could test with https too
18
+ if url.match(/^http/)
19
+ correct_url = url
20
+ else
21
+ correct_url = "http://#{url}"
22
+ end
23
+
24
+ uri = URI.parse(correct_url)
25
+
26
+ if uri.respond_to? 'request_uri'
27
+ http = Net::HTTP.new(uri.host, uri.port)
28
+ request = Net::HTTP::Get.new(uri.request_uri)
29
+ http.request(request)
30
+ else
31
+ puts "Incorrect URI"
32
+ end
21
33
  end
22
34
 
23
35
  private
@@ -61,6 +73,10 @@ module WappalyzerRb
61
73
  url ||= @url
62
74
  resp = WappalyzerRb::Detector.get(url)
63
75
 
76
+ if resp.nil?
77
+ Process.exit
78
+ end
79
+
64
80
  redirects = 0
65
81
  while resp.code == "302" && resp["location"] # redirect
66
82
  raise 'Too many redirects' if redirects > 10
@@ -200,7 +200,6 @@ module WappalyzerRb
200
200
  'MooTools' => { cats: [ 12 ], script: /mootools.*\.js/, env: /^MooTools$/ },
201
201
  'Movable Type' => { cats: [ 1 ], meta: { 'generator' => /Movable Type/i } },
202
202
  'Mustache' => { cats: [ 12 ], env: /^Mustache$/ },
203
- 'Hiawatha' => { cats: [ 22 ], headers: { 'Server' => /Hiawatha/i } },
204
203
  'MyBB' => { cats: [ 2 ], html: /(<script [^>]+\s+<!--\s+lang\.no_new_posts|<a[^>]* title=("|')Powered By MyBB)/i, env: /^MyBB/ },
205
204
  'MyBlogLog' => { cats: [ 5 ], script: /pub\.mybloglog\.com/i },
206
205
  'Mynetcap' => { cats: [ 1 ], meta: { 'generator' => /Mynetcap/i } },
@@ -1,3 +1,3 @@
1
1
  module WappalyzerRb
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,62 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wappalyzer_rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
5
- prerelease:
4
+ version: 0.0.7
6
5
  platform: ruby
7
6
  authors:
8
7
  - Kostas Karachalios
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-05-14 00:00:00.000000000 Z
11
+ date: 2017-03-29 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rspec
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - ">="
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - ">="
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: guard
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - ">="
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - ">="
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: guard-rspec
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - ">="
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - ">="
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
62
55
  description: This is merely a port of the javascript parts of Wappalyzer extension
@@ -68,12 +61,13 @@ executables: []
68
61
  extensions: []
69
62
  extra_rdoc_files: []
70
63
  files:
71
- - .gitignore
72
- - .rspec
64
+ - ".gitignore"
65
+ - ".rspec"
73
66
  - Gemfile
74
67
  - Guardfile
75
68
  - README.md
76
69
  - Rakefile
70
+ - examples/analyze_example.rb
77
71
  - lib/wappalyzer_rb.rb
78
72
  - lib/wappalyzer_rb/apps.rb
79
73
  - lib/wappalyzer_rb/version.rb
@@ -82,27 +76,25 @@ files:
82
76
  - wappalyzer_rb.gemspec
83
77
  homepage: https://github.com/skroutz/wappalyzer-ruby
84
78
  licenses: []
79
+ metadata: {}
85
80
  post_install_message:
86
81
  rdoc_options: []
87
82
  require_paths:
88
83
  - lib
89
84
  required_ruby_version: !ruby/object:Gem::Requirement
90
- none: false
91
85
  requirements:
92
- - - ! '>='
86
+ - - ">="
93
87
  - !ruby/object:Gem::Version
94
88
  version: '0'
95
89
  required_rubygems_version: !ruby/object:Gem::Requirement
96
- none: false
97
90
  requirements:
98
- - - ! '>='
91
+ - - ">="
99
92
  - !ruby/object:Gem::Version
100
93
  version: '0'
101
94
  requirements: []
102
95
  rubyforge_project: wappalyzer_rb
103
- rubygems_version: 1.8.24
96
+ rubygems_version: 2.2.5
104
97
  signing_key:
105
- specification_version: 3
98
+ specification_version: 4
106
99
  summary: Analyzes a provided url and returns any services it can detect
107
100
  test_files: []
108
- has_rdoc: