shodan-ruby 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +0 -0
- data/History.txt +4 -0
- data/Manifest.txt +1 -0
- data/lib/shodan/countries.rb +286 -0
- data/lib/shodan/version.rb +1 -1
- metadata +2 -1
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
data/History.txt
CHANGED
data/Manifest.txt
CHANGED
@@ -0,0 +1,286 @@
|
|
1
|
+
#
|
2
|
+
# shodan-ruby - A Ruby interface to SHODAN, a computer search engine.
|
3
|
+
#
|
4
|
+
# Copyright (c) 2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
5
|
+
#
|
6
|
+
# This program is free software; you can redistribute it and/or modify
|
7
|
+
# it under the terms of the GNU General Public License as published by
|
8
|
+
# the Free Software Foundation; either version 2 of the License, or
|
9
|
+
# (at your option) any later version.
|
10
|
+
#
|
11
|
+
# This program is distributed in the hope that it will be useful,
|
12
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
+
# GNU General Public License for more details.
|
15
|
+
#
|
16
|
+
# You should have received a copy of the GNU General Public License
|
17
|
+
# along with this program; if not, write to the Free Software
|
18
|
+
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
19
|
+
#
|
20
|
+
|
21
|
+
module Shodan
|
22
|
+
# Country Code List: ISO 3166-1993 (E)
|
23
|
+
module Countries
|
24
|
+
Mexico = 'MX'
|
25
|
+
GuineaBissau = 'GW'
|
26
|
+
Afghanistan = 'AF'
|
27
|
+
Ethiopia = 'ET'
|
28
|
+
SyrianArabRepublic = 'SY'
|
29
|
+
SvalbardJanMayenIslands = 'SJ'
|
30
|
+
Tonga = 'TO'
|
31
|
+
Pakistan = 'PK'
|
32
|
+
Unknownorunspecifiedcountry = 'ZZ'
|
33
|
+
BritishVirginIslands = 'VG'
|
34
|
+
Somalia = 'SO'
|
35
|
+
Bolivia = 'BO'
|
36
|
+
NorthernMarianaIslands = 'MP'
|
37
|
+
Nicaragua = 'NI'
|
38
|
+
Dominica = 'DM'
|
39
|
+
Sweden = 'SE'
|
40
|
+
Greece = 'GR'
|
41
|
+
Micronesia = 'FM'
|
42
|
+
Guadeloupe = 'GP'
|
43
|
+
UnitedArabEmirates = 'AE'
|
44
|
+
Cambodia = 'KH'
|
45
|
+
Ireland = 'IE'
|
46
|
+
Vanuatu = 'VU'
|
47
|
+
FrenchGuiana = 'GF'
|
48
|
+
Denmark = 'DK'
|
49
|
+
Czechoslovakia = 'CS'
|
50
|
+
Norway = 'NO'
|
51
|
+
Gabon = 'GA'
|
52
|
+
Malawi = 'MW'
|
53
|
+
Djibouti = 'DJ'
|
54
|
+
Namibia = 'NA'
|
55
|
+
Samoa = 'WS'
|
56
|
+
WallisFutunaIslands = 'WF'
|
57
|
+
Switzerland = 'CH'
|
58
|
+
Chad = 'TD'
|
59
|
+
UnitedStatesVirginIslands = 'VI'
|
60
|
+
Bhutan = 'BT'
|
61
|
+
PuertoRico = 'PR'
|
62
|
+
Haiti = 'HT'
|
63
|
+
Tajikistan = 'TJ'
|
64
|
+
Guyana = 'GY'
|
65
|
+
Turkmenistan = 'TM'
|
66
|
+
Kuwait = 'KW'
|
67
|
+
Canada = 'CA'
|
68
|
+
France = 'FR'
|
69
|
+
DominicanRepublic = 'DO'
|
70
|
+
Venezuela = 'VE'
|
71
|
+
Belize = 'BZ'
|
72
|
+
Italy = 'IT'
|
73
|
+
Congo = 'CG'
|
74
|
+
Tokelau = 'TK'
|
75
|
+
Mayotte = 'YT'
|
76
|
+
Algeria = 'DZ'
|
77
|
+
Lebanon = 'LB'
|
78
|
+
Azerbaijan = 'AZ'
|
79
|
+
CocosIslands = 'CC'
|
80
|
+
FrenchSouthernTerritories = 'TF'
|
81
|
+
Israel = 'IL'
|
82
|
+
Nigeria = 'NG'
|
83
|
+
Austria = 'AT'
|
84
|
+
Hungary = 'HU'
|
85
|
+
SolomonIslands = 'SB'
|
86
|
+
China = 'CN'
|
87
|
+
SaudiArabia = 'SA'
|
88
|
+
Angola = 'AO'
|
89
|
+
Kazakhstan = 'KZ'
|
90
|
+
Guam = 'GU'
|
91
|
+
Peru = 'PE'
|
92
|
+
HongKong = 'HK'
|
93
|
+
Latvia = 'LV'
|
94
|
+
Bangladesh = 'BD'
|
95
|
+
GreatBritain = 'GB'
|
96
|
+
ChristmasIsland = 'CX'
|
97
|
+
CookIislands = 'CK'
|
98
|
+
Luxembourg = 'LU'
|
99
|
+
Bahrain = 'BH'
|
100
|
+
Malta = 'MT'
|
101
|
+
Colombia = 'CO'
|
102
|
+
Panama = 'PA'
|
103
|
+
Oman = 'OM'
|
104
|
+
Netherlands = 'NL'
|
105
|
+
Philippines = 'PH'
|
106
|
+
Burundi = 'BI'
|
107
|
+
StPierreMiquelon = 'PM'
|
108
|
+
Antarctica = 'AQ'
|
109
|
+
Germany = 'DE'
|
110
|
+
Macau = 'MO'
|
111
|
+
Armenia = 'AM'
|
112
|
+
Nepal = 'NP'
|
113
|
+
Pitcairn = 'PN'
|
114
|
+
Mauritius = 'MU'
|
115
|
+
BruneiDarussalam = 'BN'
|
116
|
+
Bulgaria = 'BG'
|
117
|
+
Indonesia = 'ID'
|
118
|
+
Tanzania,UnitedRepublicof = 'TZ'
|
119
|
+
MarshallIslands = 'MH'
|
120
|
+
AmericanSamoa = 'AS'
|
121
|
+
Lesotho = 'LS'
|
122
|
+
Slovakia = 'SK'
|
123
|
+
SouthGeorgiaandtheSouthSandwichIslands = 'GS'
|
124
|
+
PapuaNewGuinea = 'PG'
|
125
|
+
Jordan = 'JO'
|
126
|
+
Cyprus = 'CY'
|
127
|
+
NeutralZone = 'NT'
|
128
|
+
Burma = 'BU'
|
129
|
+
SierraLeone = 'SL'
|
130
|
+
Yemen = 'YE'
|
131
|
+
Ukraine = 'UA'
|
132
|
+
WesternSahara = 'EH'
|
133
|
+
Bermuda = 'BM'
|
134
|
+
Croatia = 'HR'
|
135
|
+
Aruba = 'AW'
|
136
|
+
Belgium = 'BE'
|
137
|
+
Liberia = 'LR'
|
138
|
+
Grenada = 'GD'
|
139
|
+
Monserrat = 'MS'
|
140
|
+
Thailand = 'TH'
|
141
|
+
FranceMetropolitan = 'FX'
|
142
|
+
Botswana = 'BW'
|
143
|
+
Cuba = 'CU'
|
144
|
+
Andorra = 'AD'
|
145
|
+
VaticanCityState = 'VA'
|
146
|
+
Estonia = 'EE'
|
147
|
+
EastTimor = 'TP'
|
148
|
+
BouvetIsland = 'BV'
|
149
|
+
EquatorialGuinea = 'GQ'
|
150
|
+
Tunisia = 'TN'
|
151
|
+
Togo = 'TG'
|
152
|
+
Sudan = 'SD'
|
153
|
+
NetherlandsAntilles = 'AN'
|
154
|
+
FaroeIslands = 'FO'
|
155
|
+
TurksCaicosIslands = 'TC'
|
156
|
+
Barbados = 'BB'
|
157
|
+
AntiguaBarbuda = 'AG'
|
158
|
+
Mauritania = 'MR'
|
159
|
+
Fiji = 'FJ'
|
160
|
+
BosniaandHerzegovina = 'BA'
|
161
|
+
Taiwan,ProvinceofChina = 'TW'
|
162
|
+
StKittsandNevis = 'KN'
|
163
|
+
Comoros = 'KM'
|
164
|
+
BurkinaFaso = 'BF'
|
165
|
+
BritishIndianOceanTerritory = 'IO'
|
166
|
+
ElSalvador = 'SV'
|
167
|
+
Maldives = 'MV'
|
168
|
+
SaintLucia = 'LC'
|
169
|
+
Niue = 'NU'
|
170
|
+
Georgia = 'GE'
|
171
|
+
Zimbabwe = 'ZW'
|
172
|
+
Spain = 'ES'
|
173
|
+
Lao = 'LA'
|
174
|
+
Monaco = 'MC'
|
175
|
+
Martinique = 'MQ'
|
176
|
+
Uzbekistan = 'UZ'
|
177
|
+
CaymanIslands = 'KY'
|
178
|
+
Bahama = 'BS'
|
179
|
+
IslamicRepublicofIran = 'IR'
|
180
|
+
Zambia = 'ZM'
|
181
|
+
Uganda = 'UG'
|
182
|
+
Finland = 'FI'
|
183
|
+
Mongolia = 'MN'
|
184
|
+
Eritrea = 'ER'
|
185
|
+
Gibraltar = 'GI'
|
186
|
+
Portugal = 'PT'
|
187
|
+
Kiribati = 'KI'
|
188
|
+
Iraq = 'IQ'
|
189
|
+
Morocco = 'MA'
|
190
|
+
Argentina = 'AR'
|
191
|
+
Malaysia = 'MY'
|
192
|
+
India = 'IN'
|
193
|
+
Greenland = 'GL'
|
194
|
+
StVincentGrenadines = 'VC'
|
195
|
+
Egypt = 'EG'
|
196
|
+
Reunion = 'RE'
|
197
|
+
Australia = 'AU'
|
198
|
+
CzechRepublic = 'CZ'
|
199
|
+
Zaire = 'ZR'
|
200
|
+
VietNam = 'VN'
|
201
|
+
Suriname = 'SR'
|
202
|
+
NewZealand = 'NZ'
|
203
|
+
Honduras = 'HN'
|
204
|
+
NorfolkIsland = 'NF'
|
205
|
+
Guinea = 'GN'
|
206
|
+
Nauru = 'NR'
|
207
|
+
Belarus = 'BY'
|
208
|
+
Korea = 'KR'
|
209
|
+
UnitedStatesMinorOutlyingIslands = 'UM'
|
210
|
+
SanMarino = 'SM'
|
211
|
+
Yugoslavia = 'YU'
|
212
|
+
IvoryCoast = 'CI'
|
213
|
+
Swaziland = 'SZ'
|
214
|
+
Niger = 'NE'
|
215
|
+
Albania = 'AL'
|
216
|
+
StHelena = 'SH'
|
217
|
+
Mali = 'ML'
|
218
|
+
Slovenia = 'SI'
|
219
|
+
Poland = 'PL'
|
220
|
+
LibyanArabJamahiriya = 'LY'
|
221
|
+
Myanmar = 'MM'
|
222
|
+
Mozambique = 'MZ'
|
223
|
+
Japan = 'JP'
|
224
|
+
Kyrgyzstan = 'KG'
|
225
|
+
CapeVerde = 'CV'
|
226
|
+
SouthAfrica = 'ZA'
|
227
|
+
HeardMcDonaldIslands = 'HM'
|
228
|
+
Malvinas = 'FK'
|
229
|
+
Liechtenstein = 'LI'
|
230
|
+
Romania = 'RO'
|
231
|
+
Kenya = 'KE'
|
232
|
+
FrenchPolynesia = 'PF'
|
233
|
+
TrinidadTobago = 'TT'
|
234
|
+
NewCaledonia = 'NC'
|
235
|
+
Singapore = 'SG'
|
236
|
+
Tuvalu = 'TV'
|
237
|
+
Benin = 'BJ'
|
238
|
+
Ghana = 'GH'
|
239
|
+
Cameroon = 'CM'
|
240
|
+
Guatemala = 'GT'
|
241
|
+
Qatar = 'QA'
|
242
|
+
SriLanka = 'LK'
|
243
|
+
Madagascar = 'MG'
|
244
|
+
Turkey = 'TR'
|
245
|
+
Palau = 'PW'
|
246
|
+
Senegal = 'SN'
|
247
|
+
Chile = 'CL'
|
248
|
+
Gambia = 'GM'
|
249
|
+
Iceland = 'IS'
|
250
|
+
Uruguay = 'UY'
|
251
|
+
UnitedStatesofAmerica = 'US'
|
252
|
+
Ecuador = 'EC'
|
253
|
+
Brazil = 'BR'
|
254
|
+
SaoTome = 'ST'
|
255
|
+
Rwanda = 'RW'
|
256
|
+
RussianFederation = 'RU'
|
257
|
+
Jamaica = 'JM'
|
258
|
+
Anguilla = 'AI'
|
259
|
+
Paraguay = 'PY'
|
260
|
+
CostaRica = 'CR'
|
261
|
+
Seychelles = 'SC'
|
262
|
+
Lithuania = 'LT'
|
263
|
+
Moldova = 'MD'
|
264
|
+
CentralAfricanRepublic = 'CF'
|
265
|
+
|
266
|
+
#
|
267
|
+
# Iterates over every Country Code.
|
268
|
+
#
|
269
|
+
# @yield [country]
|
270
|
+
# The given block will receive every Country Code.
|
271
|
+
#
|
272
|
+
# @yieldparam [String] country
|
273
|
+
# The ISO 3166-1993 Country Code.
|
274
|
+
#
|
275
|
+
# @return [Countries]
|
276
|
+
# The Countries module.
|
277
|
+
#
|
278
|
+
def Countries.each(&block)
|
279
|
+
self.constants.each do |name|
|
280
|
+
block.call(self.constant_get(name)) if block
|
281
|
+
end
|
282
|
+
|
283
|
+
return self
|
284
|
+
end
|
285
|
+
end
|
286
|
+
end
|
data/lib/shodan/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shodan-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Postmodern
|
@@ -96,6 +96,7 @@ files:
|
|
96
96
|
- lib/shodan/extensions/uri.rb
|
97
97
|
- lib/shodan/extensions/uri/query_params.rb
|
98
98
|
- lib/shodan/extensions/uri/http.rb
|
99
|
+
- lib/shodan/countries.rb
|
99
100
|
- lib/shodan/host.rb
|
100
101
|
- lib/shodan/page.rb
|
101
102
|
- lib/shodan/has_pages.rb
|
metadata.gz.sig
CHANGED
Binary file
|