urlscan 0.4.1 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -4
- data/README.md +8 -7
- data/lib/urlscan/clients/pro.rb +9 -0
- data/lib/urlscan/version.rb +1 -1
- data/urlscan.gemspec +3 -3
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd9f5241757fe9214cf9004eed924fbd98d1739358ed6aed85fdcfe63b0bed22
|
4
|
+
data.tar.gz: da1a329d39519094e6fa21e3ba53c52b5c7051cd24d34eeb1aa47fdcadf58b55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a120a7c7e56bbc0c2585eab27284e78a31b995ad693497470cf3402a74a2027a878cb2036055c34e17a0cec42779306176594fbc1cbe3e81c7fe68a193924b7b
|
7
|
+
data.tar.gz: 85def877ac0d5dc4c6e99917ff9e820cc12414bea83b304a87090c29aa2f7be8f406fc137cf9825850fd134fb1b9fb3d8bbcc364905d67a66209680863548a96
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
# urlscan
|
2
2
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/urlscan.svg)](https://badge.fury.io/rb/urlscan)
|
4
|
-
[![Build Status](https://travis-ci.
|
4
|
+
[![Build Status](https://travis-ci.com/ninoseki/urlscan.svg?branch=master)](https://travis-ci.com/ninoseki/urlscan)
|
5
5
|
[![Maintainability](https://api.codeclimate.com/v1/badges/c6625486f2d57039adef/maintainability)](https://codeclimate.com/github/ninoseki/urlscan/maintainability)
|
6
6
|
[![Coverage Status](https://coveralls.io/repos/github/ninoseki/urlscan/badge.svg?branch=master)](https://coveralls.io/github/ninoseki/urlscan?branch=master)
|
7
7
|
|
8
8
|
## Description
|
9
9
|
|
10
|
-
|
10
|
+
[urlscan.io](https://urlscan.io/) API wrapper for Ruby.
|
11
11
|
|
12
12
|
## Installation
|
13
13
|
|
@@ -50,11 +50,12 @@ res = api.search("wikipedia.org")
|
|
50
50
|
|
51
51
|
### Pro
|
52
52
|
|
53
|
-
| HTTP Method | URI
|
54
|
-
|
55
|
-
| GET | /search
|
56
|
-
| GET | /brands
|
57
|
-
| GET | /kits
|
53
|
+
| HTTP Method | URI | API method |
|
54
|
+
|-------------|------------|-------------------------------------------------------------------|
|
55
|
+
| GET | /search | `UrlScan::Clients::Pro#search(query: nil, filter: nil, size: 50)` |
|
56
|
+
| GET | /brands | `UrlScan::Clients::Pro#brands` |
|
57
|
+
| GET | /kits | `UrlScan::Clients::Pro#kits` |
|
58
|
+
| GET | /phishfeed | `UrlScan::Clients::Pro#phishfeed` |
|
58
59
|
|
59
60
|
## CLI usage
|
60
61
|
|
data/lib/urlscan/clients/pro.rb
CHANGED
@@ -32,6 +32,15 @@ module UrlScan
|
|
32
32
|
get("/kits") { |json| json }
|
33
33
|
end
|
34
34
|
|
35
|
+
# @return [Hash]
|
36
|
+
def phishfeed(q: "result.task.time:>now-24h", format: "json")
|
37
|
+
raise ArgumentError, "API key is required for this method." if key.nil?
|
38
|
+
|
39
|
+
params = { q: q, format: format }
|
40
|
+
query = URI.encode_www_form(params)
|
41
|
+
get("/phishfeed?#{query}") { |json| json }
|
42
|
+
end
|
43
|
+
|
35
44
|
private
|
36
45
|
|
37
46
|
def build_filter(filter)
|
data/lib/urlscan/version.rb
CHANGED
data/urlscan.gemspec
CHANGED
@@ -23,10 +23,10 @@ Gem::Specification.new do |spec|
|
|
23
23
|
|
24
24
|
spec.add_development_dependency "bundler", "~> 2.0"
|
25
25
|
spec.add_development_dependency "coveralls", "~> 0.8"
|
26
|
-
spec.add_development_dependency "rake", "~>
|
27
|
-
spec.add_development_dependency "rspec", "~> 3.
|
26
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
27
|
+
spec.add_development_dependency "rspec", "~> 3.9"
|
28
28
|
spec.add_development_dependency "vcr", "~> 5.0"
|
29
29
|
spec.add_development_dependency "webmock", "~> 3.7"
|
30
30
|
|
31
|
-
spec.add_runtime_dependency "thor", "~> 0
|
31
|
+
spec.add_runtime_dependency "thor", "~> 1.0"
|
32
32
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: urlscan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Manabu Niseki
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -44,28 +44,28 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '13.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '13.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '3.
|
61
|
+
version: '3.9'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '3.
|
68
|
+
version: '3.9'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: vcr
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,14 +100,14 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '0
|
103
|
+
version: '1.0'
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '0
|
110
|
+
version: '1.0'
|
111
111
|
description:
|
112
112
|
email:
|
113
113
|
- manabu.niseki@gmail.com
|
@@ -157,7 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
157
157
|
- !ruby/object:Gem::Version
|
158
158
|
version: '0'
|
159
159
|
requirements: []
|
160
|
-
rubygems_version: 3.0.
|
160
|
+
rubygems_version: 3.0.3
|
161
161
|
signing_key:
|
162
162
|
specification_version: 4
|
163
163
|
summary: Ruby API client for urlscan.io
|