mihari 5.1.0 → 5.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mihari/analyzers/binaryedge.rb +9 -7
- data/lib/mihari/analyzers/censys.rb +3 -5
- data/lib/mihari/analyzers/circl.rb +4 -6
- data/lib/mihari/analyzers/crtsh.rb +6 -7
- data/lib/mihari/analyzers/dnpedia.rb +3 -7
- data/lib/mihari/analyzers/dnstwister.rb +3 -5
- data/lib/mihari/analyzers/feed.rb +12 -10
- data/lib/mihari/analyzers/greynoise.rb +3 -5
- data/lib/mihari/analyzers/onyphe.rb +3 -4
- data/lib/mihari/analyzers/otx.rb +1 -3
- data/lib/mihari/analyzers/passivetotal.rb +5 -7
- data/lib/mihari/analyzers/pulsedive.rb +5 -7
- data/lib/mihari/analyzers/shodan.rb +3 -9
- data/lib/mihari/analyzers/urlscan.rb +7 -6
- data/lib/mihari/analyzers/virustotal.rb +4 -6
- data/lib/mihari/analyzers/virustotal_intelligence.rb +4 -5
- data/lib/mihari/analyzers/zoomeye.rb +4 -10
- data/lib/mihari/clients/base.rb +53 -0
- data/lib/mihari/clients/binaryedge.rb +33 -0
- data/lib/mihari/clients/censys.rb +42 -0
- data/lib/mihari/clients/circl.rb +59 -0
- data/lib/mihari/clients/crtsh.rb +31 -0
- data/lib/mihari/clients/dnpedia.rb +64 -0
- data/lib/mihari/clients/dnstwister.rb +40 -0
- data/lib/mihari/clients/greynoise.rb +29 -0
- data/lib/mihari/clients/misp.rb +24 -0
- data/lib/mihari/clients/onyphe.rb +23 -0
- data/lib/mihari/clients/otx.rb +29 -0
- data/lib/mihari/clients/passivetotal.rb +65 -0
- data/lib/mihari/clients/publsedive.rb +39 -0
- data/lib/mihari/clients/shodan.rb +30 -0
- data/lib/mihari/clients/the_hive.rb +28 -0
- data/lib/mihari/clients/urlscan.rb +31 -0
- data/lib/mihari/clients/virustotal.rb +56 -0
- data/lib/mihari/clients/zoomeye.rb +68 -0
- data/lib/mihari/emitters/misp.rb +13 -20
- data/lib/mihari/emitters/the_hive.rb +3 -5
- data/lib/mihari/emitters/webhook.rb +2 -2
- data/lib/mihari/feed/reader.rb +14 -11
- data/lib/mihari/http.rb +29 -21
- data/lib/mihari/mixins/retriable.rb +3 -1
- data/lib/mihari/schemas/analyzer.rb +5 -4
- data/lib/mihari/version.rb +1 -1
- data/lib/mihari.rb +21 -0
- data/mihari.gemspec +13 -20
- metadata +51 -244
- data/lib/mihari/analyzers/clients/otx.rb +0 -36
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mihari
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.1.
|
4
|
+
version: 5.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Manabu Niseki
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -80,20 +80,6 @@ dependencies:
|
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0.5'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: overcommit
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - "~>"
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0.60'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - "~>"
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '0.60'
|
97
83
|
- !ruby/object:Gem::Dependency
|
98
84
|
name: pg
|
99
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -206,20 +192,6 @@ dependencies:
|
|
206
192
|
- - "~>"
|
207
193
|
- !ruby/object:Gem::Version
|
208
194
|
version: '1.24'
|
209
|
-
- !ruby/object:Gem::Dependency
|
210
|
-
name: steep
|
211
|
-
requirement: !ruby/object:Gem::Requirement
|
212
|
-
requirements:
|
213
|
-
- - "~>"
|
214
|
-
- !ruby/object:Gem::Version
|
215
|
-
version: '1.3'
|
216
|
-
type: :development
|
217
|
-
prerelease: false
|
218
|
-
version_requirements: !ruby/object:Gem::Requirement
|
219
|
-
requirements:
|
220
|
-
- - "~>"
|
221
|
-
- !ruby/object:Gem::Version
|
222
|
-
version: '1.3'
|
223
195
|
- !ruby/object:Gem::Dependency
|
224
196
|
name: timecop
|
225
197
|
requirement: !ruby/object:Gem::Requirement
|
@@ -263,117 +235,89 @@ dependencies:
|
|
263
235
|
- !ruby/object:Gem::Version
|
264
236
|
version: '3.18'
|
265
237
|
- !ruby/object:Gem::Dependency
|
266
|
-
name:
|
267
|
-
requirement: !ruby/object:Gem::Requirement
|
268
|
-
requirements:
|
269
|
-
- - '='
|
270
|
-
- !ruby/object:Gem::Version
|
271
|
-
version: 7.0.4.2
|
272
|
-
type: :runtime
|
273
|
-
prerelease: false
|
274
|
-
version_requirements: !ruby/object:Gem::Requirement
|
275
|
-
requirements:
|
276
|
-
- - '='
|
277
|
-
- !ruby/object:Gem::Version
|
278
|
-
version: 7.0.4.2
|
279
|
-
- !ruby/object:Gem::Dependency
|
280
|
-
name: addressable
|
281
|
-
requirement: !ruby/object:Gem::Requirement
|
282
|
-
requirements:
|
283
|
-
- - '='
|
284
|
-
- !ruby/object:Gem::Version
|
285
|
-
version: 2.8.1
|
286
|
-
type: :runtime
|
287
|
-
prerelease: false
|
288
|
-
version_requirements: !ruby/object:Gem::Requirement
|
289
|
-
requirements:
|
290
|
-
- - '='
|
291
|
-
- !ruby/object:Gem::Version
|
292
|
-
version: 2.8.1
|
293
|
-
- !ruby/object:Gem::Dependency
|
294
|
-
name: awrence
|
238
|
+
name: overcommit
|
295
239
|
requirement: !ruby/object:Gem::Requirement
|
296
240
|
requirements:
|
297
|
-
- -
|
241
|
+
- - "~>"
|
298
242
|
- !ruby/object:Gem::Version
|
299
|
-
version:
|
300
|
-
type: :
|
243
|
+
version: '0.60'
|
244
|
+
type: :development
|
301
245
|
prerelease: false
|
302
246
|
version_requirements: !ruby/object:Gem::Requirement
|
303
247
|
requirements:
|
304
|
-
- -
|
248
|
+
- - "~>"
|
305
249
|
- !ruby/object:Gem::Version
|
306
|
-
version:
|
250
|
+
version: '0.60'
|
307
251
|
- !ruby/object:Gem::Dependency
|
308
|
-
name:
|
252
|
+
name: ruby-lsp
|
309
253
|
requirement: !ruby/object:Gem::Requirement
|
310
254
|
requirements:
|
311
|
-
- -
|
255
|
+
- - "~>"
|
312
256
|
- !ruby/object:Gem::Version
|
313
|
-
version: 0.
|
314
|
-
type: :
|
257
|
+
version: '0.4'
|
258
|
+
type: :development
|
315
259
|
prerelease: false
|
316
260
|
version_requirements: !ruby/object:Gem::Requirement
|
317
261
|
requirements:
|
318
|
-
- -
|
262
|
+
- - "~>"
|
319
263
|
- !ruby/object:Gem::Version
|
320
|
-
version: 0.
|
264
|
+
version: '0.4'
|
321
265
|
- !ruby/object:Gem::Dependency
|
322
|
-
name:
|
266
|
+
name: steep
|
323
267
|
requirement: !ruby/object:Gem::Requirement
|
324
268
|
requirements:
|
325
|
-
- -
|
269
|
+
- - "~>"
|
326
270
|
- !ruby/object:Gem::Version
|
327
|
-
version:
|
328
|
-
type: :
|
271
|
+
version: '1.3'
|
272
|
+
type: :development
|
329
273
|
prerelease: false
|
330
274
|
version_requirements: !ruby/object:Gem::Requirement
|
331
275
|
requirements:
|
332
|
-
- -
|
276
|
+
- - "~>"
|
333
277
|
- !ruby/object:Gem::Version
|
334
|
-
version:
|
278
|
+
version: '1.3'
|
335
279
|
- !ruby/object:Gem::Dependency
|
336
|
-
name:
|
280
|
+
name: activerecord
|
337
281
|
requirement: !ruby/object:Gem::Requirement
|
338
282
|
requirements:
|
339
283
|
- - '='
|
340
284
|
- !ruby/object:Gem::Version
|
341
|
-
version: 0.
|
285
|
+
version: 7.0.4.2
|
342
286
|
type: :runtime
|
343
287
|
prerelease: false
|
344
288
|
version_requirements: !ruby/object:Gem::Requirement
|
345
289
|
requirements:
|
346
290
|
- - '='
|
347
291
|
- !ruby/object:Gem::Version
|
348
|
-
version: 0.
|
292
|
+
version: 7.0.4.2
|
349
293
|
- !ruby/object:Gem::Dependency
|
350
|
-
name:
|
294
|
+
name: addressable
|
351
295
|
requirement: !ruby/object:Gem::Requirement
|
352
296
|
requirements:
|
353
297
|
- - '='
|
354
298
|
- !ruby/object:Gem::Version
|
355
|
-
version:
|
299
|
+
version: 2.8.1
|
356
300
|
type: :runtime
|
357
301
|
prerelease: false
|
358
302
|
version_requirements: !ruby/object:Gem::Requirement
|
359
303
|
requirements:
|
360
304
|
- - '='
|
361
305
|
- !ruby/object:Gem::Version
|
362
|
-
version:
|
306
|
+
version: 2.8.1
|
363
307
|
- !ruby/object:Gem::Dependency
|
364
|
-
name:
|
308
|
+
name: awrence
|
365
309
|
requirement: !ruby/object:Gem::Requirement
|
366
310
|
requirements:
|
367
311
|
- - '='
|
368
312
|
- !ruby/object:Gem::Version
|
369
|
-
version: 0.1
|
313
|
+
version: 2.0.1
|
370
314
|
type: :runtime
|
371
315
|
prerelease: false
|
372
316
|
version_requirements: !ruby/object:Gem::Requirement
|
373
317
|
requirements:
|
374
318
|
- - '='
|
375
319
|
- !ruby/object:Gem::Version
|
376
|
-
version: 0.1
|
320
|
+
version: 2.0.1
|
377
321
|
- !ruby/object:Gem::Dependency
|
378
322
|
name: dotenv
|
379
323
|
requirement: !ruby/object:Gem::Requirement
|
@@ -556,34 +500,6 @@ dependencies:
|
|
556
500
|
- - '='
|
557
501
|
- !ruby/object:Gem::Version
|
558
502
|
version: 0.5.1
|
559
|
-
- !ruby/object:Gem::Dependency
|
560
|
-
name: greynoise
|
561
|
-
requirement: !ruby/object:Gem::Requirement
|
562
|
-
requirements:
|
563
|
-
- - '='
|
564
|
-
- !ruby/object:Gem::Version
|
565
|
-
version: 0.1.1
|
566
|
-
type: :runtime
|
567
|
-
prerelease: false
|
568
|
-
version_requirements: !ruby/object:Gem::Requirement
|
569
|
-
requirements:
|
570
|
-
- - '='
|
571
|
-
- !ruby/object:Gem::Version
|
572
|
-
version: 0.1.1
|
573
|
-
- !ruby/object:Gem::Dependency
|
574
|
-
name: hachi
|
575
|
-
requirement: !ruby/object:Gem::Requirement
|
576
|
-
requirements:
|
577
|
-
- - '='
|
578
|
-
- !ruby/object:Gem::Version
|
579
|
-
version: 2.0.0
|
580
|
-
type: :runtime
|
581
|
-
prerelease: false
|
582
|
-
version_requirements: !ruby/object:Gem::Requirement
|
583
|
-
requirements:
|
584
|
-
- - '='
|
585
|
-
- !ruby/object:Gem::Version
|
586
|
-
version: 2.0.0
|
587
503
|
- !ruby/object:Gem::Dependency
|
588
504
|
name: insensitive_hash
|
589
505
|
requirement: !ruby/object:Gem::Requirement
|
@@ -640,20 +556,6 @@ dependencies:
|
|
640
556
|
- - '='
|
641
557
|
- !ruby/object:Gem::Version
|
642
558
|
version: 2.0.2
|
643
|
-
- !ruby/object:Gem::Dependency
|
644
|
-
name: misp
|
645
|
-
requirement: !ruby/object:Gem::Requirement
|
646
|
-
requirements:
|
647
|
-
- - '='
|
648
|
-
- !ruby/object:Gem::Version
|
649
|
-
version: 0.1.4
|
650
|
-
type: :runtime
|
651
|
-
prerelease: false
|
652
|
-
version_requirements: !ruby/object:Gem::Requirement
|
653
|
-
requirements:
|
654
|
-
- - '='
|
655
|
-
- !ruby/object:Gem::Version
|
656
|
-
version: 0.1.4
|
657
559
|
- !ruby/object:Gem::Dependency
|
658
560
|
name: net-ping
|
659
561
|
requirement: !ruby/object:Gem::Requirement
|
@@ -682,20 +584,6 @@ dependencies:
|
|
682
584
|
- - '='
|
683
585
|
- !ruby/object:Gem::Version
|
684
586
|
version: 0.3.2
|
685
|
-
- !ruby/object:Gem::Dependency
|
686
|
-
name: onyphe
|
687
|
-
requirement: !ruby/object:Gem::Requirement
|
688
|
-
requirements:
|
689
|
-
- - '='
|
690
|
-
- !ruby/object:Gem::Version
|
691
|
-
version: 2.0.0
|
692
|
-
type: :runtime
|
693
|
-
prerelease: false
|
694
|
-
version_requirements: !ruby/object:Gem::Requirement
|
695
|
-
requirements:
|
696
|
-
- - '='
|
697
|
-
- !ruby/object:Gem::Version
|
698
|
-
version: 2.0.0
|
699
587
|
- !ruby/object:Gem::Dependency
|
700
588
|
name: parallel
|
701
589
|
requirement: !ruby/object:Gem::Requirement
|
@@ -710,34 +598,6 @@ dependencies:
|
|
710
598
|
- - '='
|
711
599
|
- !ruby/object:Gem::Version
|
712
600
|
version: 1.22.1
|
713
|
-
- !ruby/object:Gem::Dependency
|
714
|
-
name: passive_circl
|
715
|
-
requirement: !ruby/object:Gem::Requirement
|
716
|
-
requirements:
|
717
|
-
- - '='
|
718
|
-
- !ruby/object:Gem::Version
|
719
|
-
version: 0.1.0
|
720
|
-
type: :runtime
|
721
|
-
prerelease: false
|
722
|
-
version_requirements: !ruby/object:Gem::Requirement
|
723
|
-
requirements:
|
724
|
-
- - '='
|
725
|
-
- !ruby/object:Gem::Version
|
726
|
-
version: 0.1.0
|
727
|
-
- !ruby/object:Gem::Dependency
|
728
|
-
name: passivetotalx
|
729
|
-
requirement: !ruby/object:Gem::Requirement
|
730
|
-
requirements:
|
731
|
-
- - '='
|
732
|
-
- !ruby/object:Gem::Version
|
733
|
-
version: 0.1.1
|
734
|
-
type: :runtime
|
735
|
-
prerelease: false
|
736
|
-
version_requirements: !ruby/object:Gem::Requirement
|
737
|
-
requirements:
|
738
|
-
- - '='
|
739
|
-
- !ruby/object:Gem::Version
|
740
|
-
version: 0.1.1
|
741
601
|
- !ruby/object:Gem::Dependency
|
742
602
|
name: plissken
|
743
603
|
requirement: !ruby/object:Gem::Requirement
|
@@ -766,20 +626,6 @@ dependencies:
|
|
766
626
|
- - '='
|
767
627
|
- !ruby/object:Gem::Version
|
768
628
|
version: 5.0.1
|
769
|
-
- !ruby/object:Gem::Dependency
|
770
|
-
name: pulsedive
|
771
|
-
requirement: !ruby/object:Gem::Requirement
|
772
|
-
requirements:
|
773
|
-
- - '='
|
774
|
-
- !ruby/object:Gem::Version
|
775
|
-
version: 0.1.5
|
776
|
-
type: :runtime
|
777
|
-
prerelease: false
|
778
|
-
version_requirements: !ruby/object:Gem::Requirement
|
779
|
-
requirements:
|
780
|
-
- - '='
|
781
|
-
- !ruby/object:Gem::Version
|
782
|
-
version: 0.1.5
|
783
629
|
- !ruby/object:Gem::Dependency
|
784
630
|
name: puma
|
785
631
|
requirement: !ruby/object:Gem::Requirement
|
@@ -870,28 +716,14 @@ dependencies:
|
|
870
716
|
requirements:
|
871
717
|
- - '='
|
872
718
|
- !ruby/object:Gem::Version
|
873
|
-
version: 5.
|
874
|
-
type: :runtime
|
875
|
-
prerelease: false
|
876
|
-
version_requirements: !ruby/object:Gem::Requirement
|
877
|
-
requirements:
|
878
|
-
- - '='
|
879
|
-
- !ruby/object:Gem::Version
|
880
|
-
version: 5.7.0
|
881
|
-
- !ruby/object:Gem::Dependency
|
882
|
-
name: shodanx
|
883
|
-
requirement: !ruby/object:Gem::Requirement
|
884
|
-
requirements:
|
885
|
-
- - '='
|
886
|
-
- !ruby/object:Gem::Version
|
887
|
-
version: 0.2.1
|
719
|
+
version: 5.8.0
|
888
720
|
type: :runtime
|
889
721
|
prerelease: false
|
890
722
|
version_requirements: !ruby/object:Gem::Requirement
|
891
723
|
requirements:
|
892
724
|
- - '='
|
893
725
|
- !ruby/object:Gem::Version
|
894
|
-
version:
|
726
|
+
version: 5.8.0
|
895
727
|
- !ruby/object:Gem::Dependency
|
896
728
|
name: slack-notifier
|
897
729
|
requirement: !ruby/object:Gem::Requirement
|
@@ -912,14 +744,14 @@ dependencies:
|
|
912
744
|
requirements:
|
913
745
|
- - '='
|
914
746
|
- !ruby/object:Gem::Version
|
915
|
-
version: 1.6.
|
747
|
+
version: 1.6.1
|
916
748
|
type: :runtime
|
917
749
|
prerelease: false
|
918
750
|
version_requirements: !ruby/object:Gem::Requirement
|
919
751
|
requirements:
|
920
752
|
- - '='
|
921
753
|
- !ruby/object:Gem::Version
|
922
|
-
version: 1.6.
|
754
|
+
version: 1.6.1
|
923
755
|
- !ruby/object:Gem::Dependency
|
924
756
|
name: thor
|
925
757
|
requirement: !ruby/object:Gem::Requirement
|
@@ -934,20 +766,6 @@ dependencies:
|
|
934
766
|
- - '='
|
935
767
|
- !ruby/object:Gem::Version
|
936
768
|
version: 1.2.1
|
937
|
-
- !ruby/object:Gem::Dependency
|
938
|
-
name: urlscan
|
939
|
-
requirement: !ruby/object:Gem::Requirement
|
940
|
-
requirements:
|
941
|
-
- - '='
|
942
|
-
- !ruby/object:Gem::Version
|
943
|
-
version: 0.8.0
|
944
|
-
type: :runtime
|
945
|
-
prerelease: false
|
946
|
-
version_requirements: !ruby/object:Gem::Requirement
|
947
|
-
requirements:
|
948
|
-
- - '='
|
949
|
-
- !ruby/object:Gem::Version
|
950
|
-
version: 0.8.0
|
951
769
|
- !ruby/object:Gem::Dependency
|
952
770
|
name: uuidtools
|
953
771
|
requirement: !ruby/object:Gem::Requirement
|
@@ -962,20 +780,6 @@ dependencies:
|
|
962
780
|
- - '='
|
963
781
|
- !ruby/object:Gem::Version
|
964
782
|
version: 2.2.0
|
965
|
-
- !ruby/object:Gem::Dependency
|
966
|
-
name: virustotalx
|
967
|
-
requirement: !ruby/object:Gem::Requirement
|
968
|
-
requirements:
|
969
|
-
- - '='
|
970
|
-
- !ruby/object:Gem::Version
|
971
|
-
version: 1.2.0
|
972
|
-
type: :runtime
|
973
|
-
prerelease: false
|
974
|
-
version_requirements: !ruby/object:Gem::Requirement
|
975
|
-
requirements:
|
976
|
-
- - '='
|
977
|
-
- !ruby/object:Gem::Version
|
978
|
-
version: 1.2.0
|
979
783
|
- !ruby/object:Gem::Dependency
|
980
784
|
name: whois
|
981
785
|
requirement: !ruby/object:Gem::Requirement
|
@@ -1004,20 +808,6 @@ dependencies:
|
|
1004
808
|
- - '='
|
1005
809
|
- !ruby/object:Gem::Version
|
1006
810
|
version: 2.0.0
|
1007
|
-
- !ruby/object:Gem::Dependency
|
1008
|
-
name: zoomeye-rb
|
1009
|
-
requirement: !ruby/object:Gem::Requirement
|
1010
|
-
requirements:
|
1011
|
-
- - '='
|
1012
|
-
- !ruby/object:Gem::Version
|
1013
|
-
version: 0.2.0
|
1014
|
-
type: :runtime
|
1015
|
-
prerelease: false
|
1016
|
-
version_requirements: !ruby/object:Gem::Requirement
|
1017
|
-
requirements:
|
1018
|
-
- - '='
|
1019
|
-
- !ruby/object:Gem::Version
|
1020
|
-
version: 0.2.0
|
1021
811
|
description:
|
1022
812
|
email:
|
1023
813
|
- manabu.niseki@gmail.com
|
@@ -1062,7 +852,6 @@ files:
|
|
1062
852
|
- lib/mihari/analyzers/binaryedge.rb
|
1063
853
|
- lib/mihari/analyzers/censys.rb
|
1064
854
|
- lib/mihari/analyzers/circl.rb
|
1065
|
-
- lib/mihari/analyzers/clients/otx.rb
|
1066
855
|
- lib/mihari/analyzers/crtsh.rb
|
1067
856
|
- lib/mihari/analyzers/dnpedia.rb
|
1068
857
|
- lib/mihari/analyzers/dnstwister.rb
|
@@ -1083,6 +872,24 @@ files:
|
|
1083
872
|
- lib/mihari/cli/database.rb
|
1084
873
|
- lib/mihari/cli/main.rb
|
1085
874
|
- lib/mihari/cli/rule.rb
|
875
|
+
- lib/mihari/clients/base.rb
|
876
|
+
- lib/mihari/clients/binaryedge.rb
|
877
|
+
- lib/mihari/clients/censys.rb
|
878
|
+
- lib/mihari/clients/circl.rb
|
879
|
+
- lib/mihari/clients/crtsh.rb
|
880
|
+
- lib/mihari/clients/dnpedia.rb
|
881
|
+
- lib/mihari/clients/dnstwister.rb
|
882
|
+
- lib/mihari/clients/greynoise.rb
|
883
|
+
- lib/mihari/clients/misp.rb
|
884
|
+
- lib/mihari/clients/onyphe.rb
|
885
|
+
- lib/mihari/clients/otx.rb
|
886
|
+
- lib/mihari/clients/passivetotal.rb
|
887
|
+
- lib/mihari/clients/publsedive.rb
|
888
|
+
- lib/mihari/clients/shodan.rb
|
889
|
+
- lib/mihari/clients/the_hive.rb
|
890
|
+
- lib/mihari/clients/urlscan.rb
|
891
|
+
- lib/mihari/clients/virustotal.rb
|
892
|
+
- lib/mihari/clients/zoomeye.rb
|
1086
893
|
- lib/mihari/commands/database.rb
|
1087
894
|
- lib/mihari/commands/rule.rb
|
1088
895
|
- lib/mihari/commands/searcher.rb
|
@@ -1,36 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Mihari
|
4
|
-
module Analyzers
|
5
|
-
module Clients
|
6
|
-
class OTX
|
7
|
-
attr_reader :api_key
|
8
|
-
|
9
|
-
def initialize(api_key)
|
10
|
-
@api_key = api_key
|
11
|
-
end
|
12
|
-
|
13
|
-
def query_by_ip(ip)
|
14
|
-
get "https://otx.alienvault.com/api/v1/indicators/IPv4/#{ip}/passive_dns"
|
15
|
-
end
|
16
|
-
|
17
|
-
def query_by_domain(domain)
|
18
|
-
get "https://otx.alienvault.com/api/v1/indicators/domain/#{domain}/passive_dns"
|
19
|
-
end
|
20
|
-
|
21
|
-
private
|
22
|
-
|
23
|
-
def headers
|
24
|
-
{ "x-otx-api-key": api_key }
|
25
|
-
end
|
26
|
-
|
27
|
-
def get(url)
|
28
|
-
res = HTTP.get(url, headers: headers)
|
29
|
-
JSON.parse(res.body.to_s)
|
30
|
-
rescue HTTPError
|
31
|
-
nil
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|