1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
/*
* InternetData API
*
* The InternetData API: look up what every database InternetData publishes says about an IP address, an AS or a domain, download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
*
* The version of the OpenAPI document: 2026.11.14
* Contact: support@internetdata.io
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct WebDetail {
/// 80 or 443.
#[serde(rename = "port")]
pub port: i32,
/// A TLS handshake completed.
#[serde(rename = "tls_ok")]
pub tls_ok: bool,
/// An HTTP response came back.
#[serde(rename = "session_ok")]
pub session_ok: bool,
/// Its status, 0 where none came.
#[serde(rename = "status_code")]
pub status_code: i32,
/// Its `Server` header.
#[serde(rename = "server")]
pub server: String,
/// Where it redirected.
#[serde(rename = "location")]
pub location: String,
/// The page's title.
#[serde(rename = "title")]
pub title: String,
/// The certificate's subject common name.
#[serde(rename = "cert_subject_cn")]
pub cert_subject_cn: String,
/// Its subject organization.
#[serde(rename = "cert_subject_o")]
pub cert_subject_o: String,
/// Its issuer.
#[serde(rename = "cert_issuer_dn")]
pub cert_issuer_dn: String,
/// Browsers trust it.
#[serde(rename = "cert_browser_trusted")]
pub cert_browser_trusted: bool,
/// The TLS version negotiated, empty without TLS.
#[serde(rename = "tls_version")]
pub tls_version: String,
/// The first day the port was open.
#[serde(rename = "first_seen")]
pub first_seen: String,
/// The last day it was.
#[serde(rename = "last_seen")]
pub last_seen: String,
}
impl WebDetail {
pub fn new(
port: i32,
tls_ok: bool,
session_ok: bool,
status_code: i32,
server: String,
location: String,
title: String,
cert_subject_cn: String,
cert_subject_o: String,
cert_issuer_dn: String,
cert_browser_trusted: bool,
tls_version: String,
first_seen: String,
last_seen: String,
) -> WebDetail {
WebDetail {
port,
tls_ok,
session_ok,
status_code,
server,
location,
title,
cert_subject_cn,
cert_subject_o,
cert_issuer_dn,
cert_browser_trusted,
tls_version,
first_seen,
last_seen,
}
}
}