moocher 0.1.1pre → 0.1.1.1pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +17 -1
- data/lib/moocher/as.rb +2 -0
- data/lib/moocher/creditcards.rb +2 -0
- data/lib/moocher/domains.rb +2 -0
- data/lib/moocher/emails.rb +2 -0
- data/lib/moocher/geo_ip.rb +2 -0
- data/lib/moocher/ip.rb +17 -0
- data/lib/moocher/passwords.rb +2 -0
- data/lib/moocher/version.rb +1 -1
- data/lib/moocher.rb +8 -3
- data/moocher.gemspec +2 -0
- metadata +36 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc1b08d746f13e868f4ecca9807c8af8c42ea8ac
|
4
|
+
data.tar.gz: 906f86bf9e1e9e9e3ca498154b0d453d655d6528
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c78c5bd5f6829e693f2cc2fd43a052ebc040b3568465ddeb779556c41b86b1b177844755eede268b1e38d9a73947c1e28e74b704acb73f445cf513c615e1275
|
7
|
+
data.tar.gz: 4388c4c5297c236777ed6c55353a22328fbc58936d35b27bc1fb25e9458208afb8c074cc0ab3425ede17ea74cad229284e3db78378bb6abab3ca18b2a3d3aea5
|
data/README.md
CHANGED
@@ -1 +1,17 @@
|
|
1
|
-
|
1
|
+
## Moocher - Keep Moochers Out
|
2
|
+
|
3
|
+
This is Ruby interface for Moocher api, A Reputation API and Anti-Abuse Service. Still in developmental phase.
|
4
|
+
Currently functioning features are listed below.
|
5
|
+
|
6
|
+
|
7
|
+
## Check Blacklisted IP
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
require 'moocher'
|
11
|
+
|
12
|
+
ip_blacklisted? "8.8.8.8"
|
13
|
+
|
14
|
+
#=> false
|
15
|
+
|
16
|
+
# If IP is found in blacklisted database it will return true.
|
17
|
+
```
|
data/lib/moocher/as.rb
ADDED
data/lib/moocher/ip.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'httparty'
|
2
|
+
require 'ipaddress'
|
3
|
+
|
4
|
+
|
5
|
+
module Moocher
|
6
|
+
module Ip
|
7
|
+
def ip_blacklisted?(ipaddress)
|
8
|
+
base_url = 'https://api.moocher.io/badip/IPV4/'
|
9
|
+
if IPAddress.valid? ipaddress
|
10
|
+
response = HTTParty.get(base_url + ipaddress)
|
11
|
+
response.success?
|
12
|
+
else
|
13
|
+
"IP Address doesn't seem to be valid."
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/lib/moocher/version.rb
CHANGED
data/lib/moocher.rb
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
require "moocher/version"
|
2
|
+
require "moocher/as"
|
3
|
+
require "moocher/creditcards"
|
4
|
+
require "moocher/domains"
|
5
|
+
require "moocher/emails"
|
6
|
+
require "moocher/geo_ip"
|
7
|
+
require "moocher/ip"
|
8
|
+
require "moocher/passwords"
|
2
9
|
|
3
|
-
|
4
|
-
# Your code goes here...
|
5
|
-
end
|
10
|
+
include Moocher::Ip
|
data/moocher.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: moocher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.1pre
|
4
|
+
version: 0.1.1.1pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Suyesh Bhandari
|
@@ -38,6 +38,34 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: httparty
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.14.0
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.14.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: ipaddress
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.8.3
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 0.8.3
|
41
69
|
description: 'PLACEHOLDER ONLY: doesn''t work.'
|
42
70
|
email:
|
43
71
|
- suyeshb@gmail.com
|
@@ -54,6 +82,13 @@ files:
|
|
54
82
|
- bin/console
|
55
83
|
- bin/setup
|
56
84
|
- lib/moocher.rb
|
85
|
+
- lib/moocher/as.rb
|
86
|
+
- lib/moocher/creditcards.rb
|
87
|
+
- lib/moocher/domains.rb
|
88
|
+
- lib/moocher/emails.rb
|
89
|
+
- lib/moocher/geo_ip.rb
|
90
|
+
- lib/moocher/ip.rb
|
91
|
+
- lib/moocher/passwords.rb
|
57
92
|
- lib/moocher/version.rb
|
58
93
|
- moocher.gemspec
|
59
94
|
homepage: https://github.com/suyesh/moocher
|