wappalyzer 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/wappalyzer.rb +19 -4
- data/lib/wappalyzer/version.rb +1 -1
- data/wappalyzer.gemspec +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f0543ba8905811175b0f1cbb1807c8c5a74d5a90
|
4
|
+
data.tar.gz: 63646604ad982711daff02f0699346ea8a5468cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c52aed068ce38f64a29c6c42e3624661d81f5614617ab8ae742c1af6dbb0a3f776e2fc29cbe0806117af4527ff1a39004c6ff8ca3dda3fd6aff6ce2093828406
|
7
|
+
data.tar.gz: e905e0d118a20d10a2ec6c9d06b3fecdac24cc9d660c1436729c7201dfe8183226eaea4480b9b267193a35f4518ff3db18d3e6c8b476a609c63578df35f5bf5a
|
data/lib/wappalyzer.rb
CHANGED
@@ -5,6 +5,7 @@ require "wappalyzer/version"
|
|
5
5
|
require 'net/http'
|
6
6
|
require 'mini_racer'
|
7
7
|
require 'json'
|
8
|
+
require 'zlib'
|
8
9
|
|
9
10
|
Encoding.default_external = Encoding::UTF_8
|
10
11
|
|
@@ -19,10 +20,18 @@ module Wappalyzer
|
|
19
20
|
|
20
21
|
def analyze(url)
|
21
22
|
uri, body, headers = URI(url), nil, {}
|
22
|
-
Net::HTTP.start(uri.host, uri.port,
|
23
|
-
|
24
|
-
|
25
|
-
|
23
|
+
Net::HTTP.start(uri.host, uri.port,
|
24
|
+
:use_ssl => uri.scheme == 'https',
|
25
|
+
:verify_mode => OpenSSL::SSL::VERIFY_NONE,
|
26
|
+
:open_timeout => 5) do |http|
|
27
|
+
begin
|
28
|
+
resp = http.get(uri.request_uri)
|
29
|
+
rescue Zlib::DataError
|
30
|
+
resp = http.get(uri.request_uri, "Accept-Encoding" => "none")
|
31
|
+
end
|
32
|
+
|
33
|
+
resp.each_header { |k,v| headers[utf8_encoding(k).downcase] = utf8_encoding(v) }
|
34
|
+
body = utf8_encoding(resp.body)
|
26
35
|
end
|
27
36
|
|
28
37
|
cxt = MiniRacer::Context.new
|
@@ -32,6 +41,12 @@ module Wappalyzer
|
|
32
41
|
output = cxt.eval("w.apps = #{@apps.to_json}; w.categories = #{@categories.to_json}; w.driver.data = #{data.to_json}; w.driver.init();")
|
33
42
|
JSON.load(output)
|
34
43
|
end
|
44
|
+
|
45
|
+
private
|
46
|
+
|
47
|
+
def utf8_encoding(str)
|
48
|
+
str.encode('UTF-8', :invalid => :replace, :undef => :replace)
|
49
|
+
end
|
35
50
|
end
|
36
51
|
end
|
37
52
|
|
data/lib/wappalyzer/version.rb
CHANGED
data/wappalyzer.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_dependency "mini_racer", "~> 0.
|
21
|
+
spec.add_dependency "mini_racer", "~> 0.2.4"
|
22
22
|
|
23
23
|
spec.add_development_dependency "bundler", "~> 1.11"
|
24
24
|
spec.add_development_dependency "rake", "~> 10.0"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wappalyzer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pulkit21
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mini_racer
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.2.4
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.2.4
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
108
|
version: '0'
|
109
109
|
requirements: []
|
110
110
|
rubyforge_project:
|
111
|
-
rubygems_version: 2.6.
|
111
|
+
rubygems_version: 2.6.12
|
112
112
|
signing_key:
|
113
113
|
specification_version: 4
|
114
114
|
summary: Analyzes a provided url and returns any services it can detect
|