moocher 0.2.1.2 → 0.2.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 848038a64413318162521c3ccfad8e7655ca2bef
4
- data.tar.gz: 56c4af4cf1f6f37bfd1cf0ae8751c8e9f340830b
3
+ metadata.gz: a76272a9eec2e50aebbafcd8d9383b61d20894b0
4
+ data.tar.gz: a3193f20a32524a335fe1fd18dd638fdde411008
5
5
  SHA512:
6
- metadata.gz: 8e78dae88f4b68df13a0f4fdd57e40e81838bf25a6edc8044318f344ddec5545986be3568b0a8477af9a56d24054e63e5cf64657281f96e6c33e82b3e99810b7
7
- data.tar.gz: 599cecfe9a4435d6591bfdebb77dd4d77136371c524bdc99ca358823ee426dbb2c9e88ee025acdac3e5c46ae171bec915d3686b8c36650d66136fdad28854770
6
+ metadata.gz: dc9610ac08f5d8834ee4ec5f19f92ad30aec01cce9c55a11544a19fa4b2124d0bff6239c2a490cbb54b0a6545fec5a00b6f82b36e7aad2c66c2a3872c3bdd660
7
+ data.tar.gz: 6338c7391c8d17e868c74df6b05f4022902149914ad0aec412b994cc6d773ba9122132a4a6814c96a25beb1bb247477f84473e8337c6232dee6e0d99ad2a8442
data/README.md CHANGED
@@ -77,3 +77,18 @@ geolocate_ip #With no IP passed, Will return Geolocation of Client's ip from Max
77
77
  #=> {"ip"=>{"hostname"=>"cpe-74-73-145-6.nyc.res.rr.com", "address"=>"74.73.145.6", "longitude"=>-74.0052, "region"=>"New York", "country"=>"US", "as"=>{"asn"=>"12271", "country"=>"US", "networks"=>"['23.246.64.0/19', '23.246.96.0/19', '24.29.96.0/19', '24.29.128.0/19', '24.30.224.0/20', '24.39.104.0/21', '24.39.112.0/20', '24.39.128.0/19', '24.42.64.0/18', '24.90.0.0/19', '24.90.32.0/19', '24.90.64.0/18', '24.90.128.0/19', '24.90.160.0/20', '24.90.176.0/20', '24.90.192.0/18', '24.97.123.0/24', '24.97.124.0/22', '24.97.184.0/23', '24.97.200.0/21', '24.102.64.0/18', '24.103.0.0/18', '24.103.64.0/18', '24.103.224.0/20', '24.103.240.0/20', '24.104.192.0/18', '24.105.128.0/20', '24.105.143.0/24', '24.105.144.0/20', '24.136.96.0/20', '24.136.112.0/20', '24.136.126.0/24', '24.136.127.0/24', '24.161.0.0/17', '24.164.128.0/19', '24.164.160.0/19', '24.168.0.0/18', '24.168.64.0/19', '24.168.96.0/19', '24.168.128.0/19', '24.193.0.0/18', '24.193.64.0/19', '24.193.96.0/20', '24.193.112.0/20', '24.193.128.0/17', '24.199.64.0/19', '24.199.96.0/20', '24.199.112.0/20', '24.213.160.0/19', '24.213.180.0/22', '24.215.128.0/17', '24.215.128.0/18', '24.215.192.0/18', '24.239.128.0/18', '24.239.160.0/19', '50.74.0.0/16', '50.74.0.0/18', '50.75.192.0/18', '64.131.128.0/18', '64.131.192.0/18', '66.65.0.0/17', '66.65.128.0/18', '66.108.0.0/17', '66.108.128.0/17', '66.110.97.0/24', '66.212.81.0/24', '66.234.32.0/19', '67.243.0.0/16', '67.244.0.0/19', '67.244.64.0/18', '67.245.0.0/16', '67.247.0.0/18', '67.247.96.0/19', '67.250.0.0/16', '67.251.128.0/19', '67.251.192.0/18', '67.251.192.0/19', '67.254.0.0/16', '68.172.208.0/20', '68.172.224.0/19', '68.173.0.0/16', '68.174.0.0/18', '68.174.44.0/22', '68.174.48.0/20', '68.174.64.0/18', '68.174.128.0/18', '68.174.192.0/18', '68.175.0.0/17', '69.22.192.0/19', '69.22.224.0/19', '69.86.0.0/19', '69.86.32.0/19', '69.86.64.0/19', '69.86.96.0/20', '69.86.112.0/20', '69.86.128.0/19', '69.86.160.0/20', '69.86.176.0/20', '69.86.192.0/19', '69.86.224.0/20', '69.86.240.0/20', '69.193.128.0/18', '69.193.192.0/19', '69.193.224.0/19', '69.193.230.0/24', '69.193.231.0/24', '69.193.232.0/21', '69.193.241.0/24', '69.193.250.0/23', '69.193.252.0/22', '69.200.64.0/19', '69.200.224.0/19', '69.200.240.0/21', '69.201.128.0/18', '69.201.192.0/18', '69.202.128.0/17', '69.203.0.0/17', '69.203.128.0/19', '69.203.192.0/18', '69.204.224.0/19', '69.206.0.0/17', '69.206.128.0/17', '72.43.96.0/19', '72.43.128.0/18', '72.225.64.0/18', '72.225.128.0/17', '72.226.0.0/17', '72.227.128.0/17', '72.229.0.0/17', '72.229.128.0/17', '72.231.0.0/17', '74.64.0.0/16', '74.65.192.0/18', '74.66.0.0/16', '74.68.0.0/18', '74.68.64.0/18', '74.68.128.0/17', '74.71.0.0/16', '74.72.0.0/15', '74.74.0.0/18', '76.15.0.0/18', '76.15.64.0/19', '76.15.96.0/19', '76.15.128.0/18', '76.15.192.0/18', '98.0.128.0/17', '98.7.0.0/17', '98.7.192.0/18', '98.12.0.0/16', '98.13.128.0/18', '98.13.192.0/18', '98.14.0.0/16', '98.15.0.0/17', '98.15.128.0/17', '104.162.0.0/16', '108.176.0.0/18', '108.176.128.0/18', '108.182.0.0/16', '142.105.0.0/17', '142.254.160.0/20', '142.255.0.0/17', '158.222.128.0/17', '172.254.0.0/16', '184.74.128.0/19', '184.74.160.0/19', '184.74.192.0/19', '184.74.208.0/20', '184.74.224.0/19', '184.75.0.0/17', '184.75.0.0/18', '184.75.64.0/19', '184.75.64.0/24', '184.75.120.0/22', '184.152.0.0/16', '184.153.0.0/17', '198.179.64.0/19', '204.210.128.0/19', '207.251.238.0/23', '208.105.0.0/18', '208.105.0.0/22', '208.105.64.0/19', '208.120.0.0/18', '208.120.64.0/18', '208.120.128.0/17', '208.125.0.0/19']", "name"=>"SCRR-12271 - Time Warner Cable Internet LLC"}, "city"=>"New York", "continent"=>"NA", "postal"=>"10013", "latitude"=>40.7214}}
78
78
 
79
79
  ```
80
+
81
+ ## Check Blacklisted Credit Cards
82
+
83
+ If you get a detailed result, it means the CC is Blacklisted. If the cc number was not found in blacklist database, it will return false.
84
+
85
+ ```ruby
86
+
87
+ cc_blacklisted? "67068224343254254" #Blacklisted CC
88
+
89
+ #=>"{\"scheme\": \"MASTERCARD\", \"bank_logo\": \"\", \"number_length\": \"\", \"bank_phone\": \"+49116116\", \"iin\": 670686, \"brand\": \"Maestro\", \"bank_url\": \"www.fidor.de\", \"country\": \"DE\", \"bank_name\": \"Fidor Bank AG\", \"prepaid\": \"\", \"bank_city\": \"M\\u00fcnchen\", \"type\": \"DEBIT\"}"
90
+
91
+ cc_blacklisted? "GOOD CC NUMBER"
92
+ #=> false
93
+
94
+ ```
@@ -1,5 +1,4 @@
1
1
  require "moocher/version"
2
- require "moocher/as"
3
2
  require "moocher/creditcards"
4
3
  require "moocher/domains"
5
4
  require "moocher/emails"
@@ -11,3 +10,4 @@ include Moocher::Ip
11
10
  include Moocher::Domain
12
11
  include Moocher::Email
13
12
  include Moocher::GeoIp
13
+ include Moocher::Creditcard
@@ -1,2 +1,13 @@
1
+ require 'httparty'
2
+
1
3
  module Moocher
4
+ module Creditcard
5
+ def cc_blacklisted?(cc_number)
6
+ bin = cc_number.to_s.strip[0..5]
7
+ return "Not a Valid input" if (bin =~ /\A\d{6}/).nil?
8
+ base_url = 'https://api.moocher.io/l/BINLISTNET/t/creditcard/i/'
9
+ response = HTTParty.get("#{base_url}#{bin}")
10
+ response.success? ? response.parsed_response : response.success?
11
+ end
12
+ end
2
13
  end
@@ -1,3 +1,3 @@
1
1
  module Moocher
2
- VERSION = "0.2.1.2"
2
+ VERSION = "0.2.1.3"
3
3
  end
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.2.1.2
4
+ version: 0.2.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Suyesh Bhandari
@@ -83,7 +83,6 @@ files:
83
83
  - bin/console
84
84
  - bin/setup
85
85
  - lib/moocher.rb
86
- - lib/moocher/as.rb
87
86
  - lib/moocher/banner.rb
88
87
  - lib/moocher/creditcards.rb
89
88
  - lib/moocher/domains.rb
@@ -1,2 +0,0 @@
1
- module Moocher
2
- end