1
- use fern;
2
- use chrono;
3
-
4
- use crate :: data:: { Certificate , Config , ChainObjects } ;
1
+ use crate :: data:: { Config } ;
5
2
use log:: { LevelFilter } ;
6
3
use publicsuffix:: List ;
7
4
use console:: { style} ;
@@ -41,7 +38,7 @@ impl Nettfiske {
41
38
Ok ( ( ) )
42
39
}
43
40
44
- pub fn analyse_domain ( & self , original_domain : & str , chain : Vec < ChainObjects > ) {
41
+ pub fn analyse_domain ( & self , original_domain : & str ) {
45
42
let mut punycode_detected = false ;
46
43
let mut score = 0 ;
47
44
@@ -54,8 +51,6 @@ impl Nettfiske {
54
51
punycode_detected = true ;
55
52
}
56
53
57
- let certificate = self . certificate_info ( chain) ;
58
-
59
54
if let Ok ( domain_obj) = self . list . parse_domain ( & domain) {
60
55
if let Some ( registrable) = domain_obj. root ( ) {
61
56
// Registrable domain
@@ -70,12 +65,6 @@ impl Nettfiske {
70
65
for identities in & self . config . identities {
71
66
let key = identities. common_name . as_str ( ) ;
72
67
73
- if identities. certificate . issued_to == certificate. issued_to
74
- && identities. certificate . issued_by == certificate. issued_by
75
- {
76
- return ;
77
- }
78
-
79
68
// Check Registration domain
80
69
score += self . domain_keywords ( domain_name[ 0 ] , key) * 4 ;
81
70
score +=
@@ -200,21 +189,5 @@ impl Nettfiske {
200
189
}
201
190
}
202
191
}
203
-
204
- pub fn certificate_info ( & self , chain : Vec < ChainObjects > ) -> Certificate {
205
- if chain. len ( ) > 1 {
206
- let sub_to = chain[ 0 ] . subject . clone ( ) ;
207
- let sub_by = chain[ 1 ] . subject . clone ( ) ;
208
- Certificate {
209
- issued_to : sub_to. organization . unwrap_or_else ( || "" . to_string ( ) ) ,
210
- issued_by : sub_by. organization . unwrap_or_else ( || "" . to_string ( ) ) ,
211
- }
212
- } else {
213
- let sub_to = chain[ 0 ] . subject . clone ( ) ;
214
- Certificate {
215
- issued_to : sub_to. organization . unwrap_or_else ( || "" . to_string ( ) ) ,
216
- issued_by : "" . to_string ( ) ,
217
- }
218
- }
219
- }
220
192
}
193
+
0 commit comments