synthient 1.0.0 → 1.1.0

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.
@@ -2,12 +2,14 @@
2
2
 
3
3
  module Synthient
4
4
  # Whether a domain had events in the last 24 hours.
5
+ # @deprecated Used only by the deprecated Client#lookup_domain.
5
6
  module DomainStatus
6
7
  ACTIVE = "active"
7
8
  INACTIVE = "inactive"
8
9
  end
9
10
 
10
11
  # The sentences that describe a domain's activity over the last 30 days.
12
+ # @deprecated Used only by the deprecated Client#lookup_domain.
11
13
  module Cadence
12
14
  NO_ACTIVITY = "No activity in the last 30 days."
13
15
  EVENLY_DISTRIBUTED = "Activity is evenly distributed across the day."
@@ -16,6 +18,7 @@ module Synthient
16
18
  BURST_DRIVEN = "Activity is burst-driven with significant peaks."
17
19
  end
18
20
 
21
+ # @deprecated Used only by the deprecated Client#lookup_domain.
19
22
  DomainStats = Model.define do
20
23
  required :events_24h, :integer
21
24
  required :total_events_30d, :integer
@@ -23,6 +26,7 @@ module Synthient
23
26
 
24
27
  # Distinct source addresses seen for a domain. +sparkline_24h+ holds hourly
25
28
  # counts for the last 24 hours, oldest first.
29
+ # @deprecated Used only by the deprecated Client#lookup_domain.
26
30
  UniqueIPs = Model.define do
27
31
  required :value_24h, :integer
28
32
  required :value_30d, :integer
@@ -30,6 +34,7 @@ module Synthient
30
34
  end
31
35
 
32
36
  # The events and distinct addresses seen for a domain on one day.
37
+ # @deprecated Used only by the deprecated Client#lookup_domain.
33
38
  TimeSeriesPoint = Model.define do
34
39
  required :date, :unix_time
35
40
  required :events, :integer
@@ -37,22 +42,26 @@ module Synthient
37
42
  end
38
43
 
39
44
  # The autonomous system that sent the most events.
45
+ # @deprecated Used only by the deprecated Client#lookup_domain.
40
46
  ASNCount = Model.define do
41
47
  required :asn, :integer
42
48
  required :events, :integer
43
49
  end
44
50
 
51
+ # @deprecated Used only by the deprecated Client#lookup_domain.
45
52
  SubdomainCount = Model.define do
46
53
  required :subdomain, :string
47
54
  required :count, :integer
48
55
  end
49
56
 
57
+ # @deprecated Used only by the deprecated Client#lookup_domain.
50
58
  PortCount = Model.define do
51
59
  required :port, :integer
52
60
  required :count, :integer
53
61
  end
54
62
 
55
63
  # The events and distinct addresses seen from one country.
64
+ # @deprecated Used only by the deprecated Client#lookup_domain.
56
65
  CountryCount = Model.define do
57
66
  required :country_code, :string
58
67
  required :events, :integer
@@ -61,6 +70,7 @@ module Synthient
61
70
 
62
71
  # +peak_hour+ and +quiet_hour+ are UTC hours, and +cadence+ is one of
63
72
  # Cadence.
73
+ # @deprecated Used only by the deprecated Client#lookup_domain.
64
74
  ActivityStats = Model.define do
65
75
  required :cadence, :string
66
76
  required :median_per_hour, :integer
@@ -71,6 +81,7 @@ module Synthient
71
81
 
72
82
  # +source_ip+ is the full source address, although the API names it
73
83
  # source_ip_masked.
84
+ # @deprecated Used only by the deprecated Client#lookup_domain.
74
85
  DomainEvent = Model.define do
75
86
  required :timestamp, :unix_time
76
87
  required :source_ip, :string, wire: "source_ip_masked"
@@ -83,6 +94,9 @@ module Synthient
83
94
  # was never observed is +inactive+ with zero counts. +top_asn+ is nil when
84
95
  # there were no events. +hour_dow_heatmap+ has 7 rows, Monday first, of 24
85
96
  # UTC hourly counts.
97
+ # @deprecated Domain lookup was removed from the Synthient API and will stop
98
+ # working when the endpoint is turned off. It will be removed in the next
99
+ # major version.
86
100
  DomainInfo = Model.define do
87
101
  required :domain, :string
88
102
  required :status, :string
@@ -86,6 +86,13 @@ module Synthient
86
86
  optional :timestamp, :unix_time
87
87
  end
88
88
 
89
+ # The tunnel transport a Helios event arrived over. New values may be added.
90
+ module HeliosTransport
91
+ TCP = "tcp"
92
+ UDP = "udp"
93
+ QUIC = "quic"
94
+ end
95
+
89
96
  # The Helios honeypot sensor that captured an event. +proxy_ip+ and
90
97
  # +provider+ are the proxy exit address and service the traffic arrived
91
98
  # through.
@@ -132,7 +139,12 @@ module Synthient
132
139
  optional :length, :integer
133
140
  end
134
141
 
135
- # Fields the sensor could not parse are nil.
142
+ # Fields the sensor could not parse are nil. +complete+ is false when the
143
+ # sensor captured only part of the ClientHello, and +truncated+ is true
144
+ # when it was cut short. +transport+ is the HeliosTransport the handshake
145
+ # was read from. The +_code+ fields hold wire code points, with
146
+ # +supported_version_codes+ in +supported_versions+ order, GREASE values
147
+ # included. +alpn_hex+ holds the +alpn+ entries hex-encoded, in order.
136
148
  TLSClientHello = Model.define do
137
149
  optional :record_version, :string
138
150
  optional :handshake_version, :string
@@ -160,11 +172,22 @@ module Synthient
160
172
  optional :renegotiation_info, :bool
161
173
  optional :signed_certificate_timestamps, :bool
162
174
  optional :status_request, :bool
175
+ optional :complete, :bool
176
+ optional :truncated, :bool
177
+ optional :transport, :string
178
+ optional :record_version_code, :integer
179
+ optional :handshake_version_code, :integer
180
+ optional :supported_version_codes, [:integer]
181
+ optional :alpn_hex, [:string]
182
+ optional :signature_algorithms_cert, [TLSCodeName]
183
+ optional :record_size_limit, :integer
184
+ optional :max_fragment_length, :integer
163
185
  end
164
186
 
165
187
  # A TLS ClientHello captured by a Helios honeypot. +details+ is nil when the
166
188
  # sensor could not parse the handshake. +raw+ is always nil, because the
167
- # sensors do not capture handshake bytes.
189
+ # sensors do not capture handshake bytes. +transport+ is one of
190
+ # HeliosTransport.
168
191
  HeliosHTTPSEvent = Model.define do
169
192
  required :timestamp, :unix_time
170
193
  required :tunnel_id, :integer
@@ -174,11 +197,12 @@ module Synthient
174
197
  required :meta, HeliosMeta
175
198
  optional :details, TLSClientHello
176
199
  optional :raw, :string
200
+ required :transport, :string
177
201
  end
178
202
 
179
203
  # A destination a Helios honeypot tunnel was asked to reach. Despite the
180
204
  # feed's name, it is not a DNS query: names resolved inside a tunneled DNS
181
- # session are not visible.
205
+ # session are not visible. +transport+ is one of HeliosTransport.
182
206
  HeliosDNSEvent = Model.define do
183
207
  required :timestamp, :unix_time
184
208
  required :tunnel_id, :integer
@@ -186,6 +210,7 @@ module Synthient
186
210
  required :port, :integer
187
211
  required :protocol, :string
188
212
  required :meta, HeliosMeta
213
+ required :transport, :string
189
214
  end
190
215
 
191
216
  # An Android Debug Bridge shell command captured by a Helios honeypot. It
@@ -193,10 +218,12 @@ module Synthient
193
218
  # 1-based position of the command in its session. +payload_hash+ is the hex
194
219
  # SHA-256 the sensor assigns to the session's payload, sent as +hash+: it is
195
220
  # not a hash of +command+, and every command in a session shares it.
221
+ # +meta+ is nil on events from sensors that don't send it yet.
196
222
  HeliosADBEvent = Model.define do
197
223
  required :session, :string
198
224
  required :sequential_id, :integer
199
225
  required :command, :string
200
226
  required :payload_hash, :string, wire: "hash"
227
+ optional :meta, HeliosMeta
201
228
  end
202
229
  end
@@ -6,7 +6,34 @@ module Synthient
6
6
  DAILY = "daily"
7
7
  end
8
8
 
9
- # New values may be added.
9
+ # File formats of exports. Feeds publish only parquet. New values may be
10
+ # added.
11
+ module ExportFormat
12
+ PARQUET = "parquet"
13
+ CSV = "csv"
14
+ MMDB = "mmdb"
15
+ TAR_GZ = "tar.gz"
16
+ end
17
+
18
+ # LITE is the export deduplicated to the latest row in its hour or day.
19
+ module ExportVariant
20
+ FULL = "full"
21
+ LITE = "lite"
22
+ end
23
+
24
+ # The parquet files inside a WHOIS archive. New values may be added.
25
+ module WhoisEntity
26
+ ASNS = "asns"
27
+ NETWORKS = "networks"
28
+ ORGANISATIONS = "organisations"
29
+ CONTACTS = "contacts"
30
+ MAINTAINERS = "maintainers"
31
+ TRANSFERS = "transfers"
32
+ DELEGATIONS = "delegations"
33
+ end
34
+
35
+ # New values may be added, and the datasets already send others, such as
36
+ # "double", "date", and "list<string>".
10
37
  module ParquetType
11
38
  STRING = "string"
12
39
  INT64 = "int64"
@@ -16,8 +43,42 @@ module Synthient
16
43
  BYTES = "bytes"
17
44
  end
18
45
 
19
- # +hour+ is nil for a daily export. +checksum+ is the hex SHA-256 of the
20
- # file. +download_path+ includes the /api/v4 prefix.
46
+ # One file of an export. +format+ is one of ExportFormat, and +checksum+ is
47
+ # the hex SHA-256 of the file as downloaded, so of the .csv.gz for csv.
48
+ ExportFile = Model.define do
49
+ required :format, :string
50
+ required :size_bytes, :integer
51
+ required :checksum, :string
52
+ end
53
+
54
+ # +type+ is one of ParquetType.
55
+ ParquetColumn = Model.define do
56
+ required :name, :string
57
+ required :type, :string
58
+ end
59
+
60
+ # +fields+ is empty for an archive such as WHOIS.
61
+ ParquetSchema = Model.define do
62
+ # The WHOIS meta sent "fields": null on 2026-11-17.
63
+ required :fields, [ParquetColumn], null_as: []
64
+ end
65
+
66
+ # One parquet file inside a WHOIS archive. +entity+ is one of WhoisEntity,
67
+ # and +checksum+ is the hex SHA-256 of the parquet. +schema+ is set only by
68
+ # export metadata.
69
+ ExportEntity = Model.define do
70
+ required :entity, :string
71
+ required :row_count, :integer
72
+ required :size_bytes, :integer
73
+ required :checksum, :string
74
+ optional :schema, ParquetSchema
75
+ end
76
+
77
+ # +hour+ is nil for a daily export. +formats+ lists every file of the
78
+ # export, its own format first, and +size_bytes+ and +checksum+, the hex
79
+ # SHA-256, describe that first file. +download_path+ includes the /api/v4
80
+ # prefix. +entities+ is set only for WHOIS. +variant+ is
81
+ # ExportVariant::LITE on a lite listing and nil otherwise.
21
82
  Export = Model.define do
22
83
  required :id, :string
23
84
  required :kind, :string
@@ -28,6 +89,9 @@ module Synthient
28
89
  required :checksum, :string
29
90
  required :created_at, :unix_time
30
91
  required :download_path, :string
92
+ required :formats, [ExportFile]
93
+ optional :entities, [ExportEntity]
94
+ optional :variant, :string
31
95
  end
32
96
 
33
97
  # +next_cursor+ is nil on the last page.
@@ -37,18 +101,11 @@ module Synthient
37
101
  optional :next_cursor, :string
38
102
  end
39
103
 
40
- # +type+ is one of ParquetType.
41
- ParquetColumn = Model.define do
42
- required :name, :string
43
- required :type, :string
44
- end
45
-
46
- ParquetSchema = Model.define do
47
- required :fields, [ParquetColumn]
48
- end
49
-
50
- # +hour+ is nil for a daily export. +size+ is in bytes and +checksum+ is
51
- # the hex SHA-256 of the file.
104
+ # +hour+ is nil for a daily export. +format+ is the ExportFormat that
105
+ # +size+, in bytes, and +checksum+, the hex SHA-256, describe. +formats+
106
+ # lists every file of the export, its own format first. A WHOIS meta has
107
+ # an empty +schema+ and describes each parquet in +entities+. +variant+ is
108
+ # ExportVariant::LITE for a lite export and nil otherwise.
52
109
  ExportMeta = Model.define do
53
110
  required :id, :string
54
111
  required :stream, :string
@@ -61,5 +118,26 @@ module Synthient
61
118
  required :checksum, :string
62
119
  required :created_at, :unix_time
63
120
  required :schema, ParquetSchema
121
+ required :formats, [ExportFile]
122
+ optional :entities, [ExportEntity]
123
+ optional :variant, :string
124
+ end
125
+
126
+ # The rows and bytes exported on one UTC day. +kind+ is ExportKind::DAILY
127
+ # when the day's daily export is the total, or ExportKind::HOURLY when its
128
+ # hourly exports were summed, as for today. +snapshots+ is the number of
129
+ # files counted.
130
+ ExportVolumeDay = Model.define do
131
+ required :date, :date
132
+ required :kind, :string
133
+ required :snapshots, :integer
134
+ required :row_count, :integer
135
+ required :size_bytes, :integer
136
+ end
137
+
138
+ # +days+ runs oldest first and leaves out days without exports.
139
+ ExportVolume = Model.define do
140
+ required :stream, :string
141
+ required :days, [ExportVolumeDay]
64
142
  end
65
143
  end
@@ -75,8 +75,9 @@ module Synthient
75
75
  required :devices, [Device]
76
76
  end
77
77
 
78
- # +network+, +location+, and +intelligence+ are nil when the API has no data
79
- # for them.
78
+ # +network+ is nil when the address is in no known network range or the
79
+ # network lookup failed, and +location+ is nil whenever +network+ is.
80
+ # +intelligence+ is nil when the API has no data for it.
80
81
  IPInfo = Model.define do
81
82
  required :ip, :ip
82
83
  optional :network, Network
@@ -85,10 +85,11 @@ module Synthient
85
85
  end
86
86
  end
87
87
 
88
- def redirect_location(path)
89
- execute("GET", path, policy: :transient) do |response|
88
+ def redirect_location(path, query: nil)
89
+ execute("GET", path, policy: :transient, query:) do |response|
90
90
  raise_api_error(response) if response.code.to_i >= 400
91
- unless response.is_a?(Net::HTTPRedirection)
91
+ # Net::HTTP counts a 304 as a redirection, but it has no location.
92
+ if !response.is_a?(Net::HTTPRedirection) || response.is_a?(Net::HTTPNotModified)
92
93
  raise DecodeError, "expected a redirect to the export, got status #{response.code}"
93
94
  end
94
95
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Synthient
4
- VERSION = "1.0.0"
4
+ VERSION = "1.1.0"
5
5
  end
data/lib/synthient.rb CHANGED
@@ -9,9 +9,8 @@ require "time"
9
9
  require "uri"
10
10
  require "zlib"
11
11
 
12
- # The official Ruby client for the Synthient API: IP and domain intelligence,
13
- # account details, and real-time and bulk data feeds. Start with
14
- # Synthient::Client.
12
+ # The official Ruby client for the Synthient API: IP intelligence, account
13
+ # details, and real-time and bulk data feeds. Start with Synthient::Client.
15
14
  module Synthient
16
15
  DEFAULT_BASE_URL = "https://api.synthient.com/api/v4"
17
16
  end
@@ -26,5 +25,7 @@ require_relative "synthient/models/account"
26
25
  require_relative "synthient/models/export"
27
26
  require_relative "synthient/models/events"
28
27
  require_relative "synthient/transport"
28
+ require_relative "synthient/export_requests"
29
29
  require_relative "synthient/feed"
30
+ require_relative "synthient/dataset"
30
31
  require_relative "synthient/client"
@@ -14,11 +14,29 @@ module Synthient
14
14
  INACTIVE: String
15
15
  end
16
16
 
17
+ module ExportFormat
18
+ CSV: String
19
+ MMDB: String
20
+ PARQUET: String
21
+ TAR_GZ: String
22
+ end
23
+
17
24
  module ExportKind
18
25
  DAILY: String
19
26
  HOURLY: String
20
27
  end
21
28
 
29
+ module ExportVariant
30
+ FULL: String
31
+ LITE: String
32
+ end
33
+
34
+ module HeliosTransport
35
+ QUIC: String
36
+ TCP: String
37
+ UDP: String
38
+ end
39
+
22
40
  module NetworkType
23
41
  ACADEMIC: String
24
42
  CORPORATE: String
@@ -84,6 +102,10 @@ module Synthient
84
102
  ANONYMIZERS_FEED: String
85
103
  ANONYMIZERS_STREAM: String
86
104
  BASIC: String
105
+ FILE_IOCS_FEED: String
106
+ FILE_IOCS_STREAM: String
107
+ GEOLOCATION_FEED: String
108
+ HELIOS: String
87
109
  HONEYPOT_ADB_FEED: String
88
110
  HONEYPOT_ADB_STREAM: String
89
111
  HONEYPOT_DNS_FEED: String
@@ -98,10 +120,24 @@ module Synthient
98
120
  JA4T_STREAM: String
99
121
  JA4_FEED: String
100
122
  JA4_STREAM: String
123
+ NETWORK_IOCS_FEED: String
124
+ NETWORK_IOCS_STREAM: String
101
125
  PROXY_FEEDS: String
102
126
  PROXY_FIREHOSE: String
103
127
  TORRENTS_FEED: String
104
128
  TORRENTS_STREAM: String
129
+ WHOIS_FEED: String
130
+ WHOIS_STREAM: String
131
+ end
132
+
133
+ module WhoisEntity
134
+ ASNS: String
135
+ CONTACTS: String
136
+ DELEGATIONS: String
137
+ MAINTAINERS: String
138
+ NETWORKS: String
139
+ ORGANISATIONS: String
140
+ TRANSFERS: String
105
141
  end
106
142
 
107
143
  class ASNCount < Data
@@ -223,9 +259,32 @@ module Synthient
223
259
  attr_reader checksum: String
224
260
  attr_reader created_at: Time
225
261
  attr_reader download_path: String
226
- def self.new: (id: String, kind: String, date: Date, ?hour: Integer?, size_bytes: Integer, row_count: Integer, checksum: String, created_at: Time, download_path: String) -> instance
227
- def initialize: (id: String, kind: String, date: Date, ?hour: Integer?, size_bytes: Integer, row_count: Integer, checksum: String, created_at: Time, download_path: String) -> void
228
- def with: (?id: String, ?kind: String, ?date: Date, ?hour: Integer?, ?size_bytes: Integer, ?row_count: Integer, ?checksum: String, ?created_at: Time, ?download_path: String) -> instance
262
+ attr_reader formats: Array[ExportFile]
263
+ attr_reader entities: Array[ExportEntity]?
264
+ attr_reader variant: String?
265
+ def self.new: (id: String, kind: String, date: Date, ?hour: Integer?, size_bytes: Integer, row_count: Integer, checksum: String, created_at: Time, download_path: String, formats: Array[ExportFile], ?entities: Array[ExportEntity]?, ?variant: String?) -> instance
266
+ def initialize: (id: String, kind: String, date: Date, ?hour: Integer?, size_bytes: Integer, row_count: Integer, checksum: String, created_at: Time, download_path: String, formats: Array[ExportFile], ?entities: Array[ExportEntity]?, ?variant: String?) -> void
267
+ def with: (?id: String, ?kind: String, ?date: Date, ?hour: Integer?, ?size_bytes: Integer, ?row_count: Integer, ?checksum: String, ?created_at: Time, ?download_path: String, ?formats: Array[ExportFile], ?entities: Array[ExportEntity]?, ?variant: String?) -> instance
268
+ end
269
+
270
+ class ExportEntity < Data
271
+ attr_reader entity: String
272
+ attr_reader row_count: Integer
273
+ attr_reader size_bytes: Integer
274
+ attr_reader checksum: String
275
+ attr_reader schema: ParquetSchema?
276
+ def self.new: (entity: String, row_count: Integer, size_bytes: Integer, checksum: String, ?schema: ParquetSchema?) -> instance
277
+ def initialize: (entity: String, row_count: Integer, size_bytes: Integer, checksum: String, ?schema: ParquetSchema?) -> void
278
+ def with: (?entity: String, ?row_count: Integer, ?size_bytes: Integer, ?checksum: String, ?schema: ParquetSchema?) -> instance
279
+ end
280
+
281
+ class ExportFile < Data
282
+ attr_reader format: String
283
+ attr_reader size_bytes: Integer
284
+ attr_reader checksum: String
285
+ def self.new: (format: String, size_bytes: Integer, checksum: String) -> instance
286
+ def initialize: (format: String, size_bytes: Integer, checksum: String) -> void
287
+ def with: (?format: String, ?size_bytes: Integer, ?checksum: String) -> instance
229
288
  end
230
289
 
231
290
  class ExportMeta < Data
@@ -240,9 +299,12 @@ module Synthient
240
299
  attr_reader checksum: String
241
300
  attr_reader created_at: Time
242
301
  attr_reader schema: ParquetSchema
243
- def self.new: (id: String, stream: String, kind: String, format: String, date: Time, ?hour: Integer?, rows: Integer, size: Integer, checksum: String, created_at: Time, schema: ParquetSchema) -> instance
244
- def initialize: (id: String, stream: String, kind: String, format: String, date: Time, ?hour: Integer?, rows: Integer, size: Integer, checksum: String, created_at: Time, schema: ParquetSchema) -> void
245
- def with: (?id: String, ?stream: String, ?kind: String, ?format: String, ?date: Time, ?hour: Integer?, ?rows: Integer, ?size: Integer, ?checksum: String, ?created_at: Time, ?schema: ParquetSchema) -> instance
302
+ attr_reader formats: Array[ExportFile]
303
+ attr_reader entities: Array[ExportEntity]?
304
+ attr_reader variant: String?
305
+ def self.new: (id: String, stream: String, kind: String, format: String, date: Time, ?hour: Integer?, rows: Integer, size: Integer, checksum: String, created_at: Time, schema: ParquetSchema, formats: Array[ExportFile], ?entities: Array[ExportEntity]?, ?variant: String?) -> instance
306
+ def initialize: (id: String, stream: String, kind: String, format: String, date: Time, ?hour: Integer?, rows: Integer, size: Integer, checksum: String, created_at: Time, schema: ParquetSchema, formats: Array[ExportFile], ?entities: Array[ExportEntity]?, ?variant: String?) -> void
307
+ def with: (?id: String, ?stream: String, ?kind: String, ?format: String, ?date: Time, ?hour: Integer?, ?rows: Integer, ?size: Integer, ?checksum: String, ?created_at: Time, ?schema: ParquetSchema, ?formats: Array[ExportFile], ?entities: Array[ExportEntity]?, ?variant: String?) -> instance
246
308
  end
247
309
 
248
310
  class ExportPage < Data
@@ -254,6 +316,25 @@ module Synthient
254
316
  def with: (?stream: String, ?exports: Array[Export], ?next_cursor: String?) -> instance
255
317
  end
256
318
 
319
+ class ExportVolume < Data
320
+ attr_reader stream: String
321
+ attr_reader days: Array[ExportVolumeDay]
322
+ def self.new: (stream: String, days: Array[ExportVolumeDay]) -> instance
323
+ def initialize: (stream: String, days: Array[ExportVolumeDay]) -> void
324
+ def with: (?stream: String, ?days: Array[ExportVolumeDay]) -> instance
325
+ end
326
+
327
+ class ExportVolumeDay < Data
328
+ attr_reader date: Date
329
+ attr_reader kind: String
330
+ attr_reader snapshots: Integer
331
+ attr_reader row_count: Integer
332
+ attr_reader size_bytes: Integer
333
+ def self.new: (date: Date, kind: String, snapshots: Integer, row_count: Integer, size_bytes: Integer) -> instance
334
+ def initialize: (date: Date, kind: String, snapshots: Integer, row_count: Integer, size_bytes: Integer) -> void
335
+ def with: (?date: Date, ?kind: String, ?snapshots: Integer, ?row_count: Integer, ?size_bytes: Integer) -> instance
336
+ end
337
+
257
338
  class HTTPRequestDetails < Data
258
339
  attr_reader http_method: String?
259
340
  attr_reader uri: String?
@@ -269,9 +350,10 @@ module Synthient
269
350
  attr_reader sequential_id: Integer
270
351
  attr_reader command: String
271
352
  attr_reader payload_hash: String
272
- def self.new: (session: String, sequential_id: Integer, command: String, payload_hash: String) -> instance
273
- def initialize: (session: String, sequential_id: Integer, command: String, payload_hash: String) -> void
274
- def with: (?session: String, ?sequential_id: Integer, ?command: String, ?payload_hash: String) -> instance
353
+ attr_reader meta: HeliosMeta?
354
+ def self.new: (session: String, sequential_id: Integer, command: String, payload_hash: String, ?meta: HeliosMeta?) -> instance
355
+ def initialize: (session: String, sequential_id: Integer, command: String, payload_hash: String, ?meta: HeliosMeta?) -> void
356
+ def with: (?session: String, ?sequential_id: Integer, ?command: String, ?payload_hash: String, ?meta: HeliosMeta?) -> instance
275
357
  end
276
358
 
277
359
  class HeliosDNSEvent < Data
@@ -281,9 +363,10 @@ module Synthient
281
363
  attr_reader port: Integer
282
364
  attr_reader protocol: String
283
365
  attr_reader meta: HeliosMeta
284
- def self.new: (timestamp: Time, tunnel_id: Integer, domain: String, port: Integer, protocol: String, meta: HeliosMeta) -> instance
285
- def initialize: (timestamp: Time, tunnel_id: Integer, domain: String, port: Integer, protocol: String, meta: HeliosMeta) -> void
286
- def with: (?timestamp: Time, ?tunnel_id: Integer, ?domain: String, ?port: Integer, ?protocol: String, ?meta: HeliosMeta) -> instance
366
+ attr_reader transport: String
367
+ def self.new: (timestamp: Time, tunnel_id: Integer, domain: String, port: Integer, protocol: String, meta: HeliosMeta, transport: String) -> instance
368
+ def initialize: (timestamp: Time, tunnel_id: Integer, domain: String, port: Integer, protocol: String, meta: HeliosMeta, transport: String) -> void
369
+ def with: (?timestamp: Time, ?tunnel_id: Integer, ?domain: String, ?port: Integer, ?protocol: String, ?meta: HeliosMeta, ?transport: String) -> instance
287
370
  end
288
371
 
289
372
  class HeliosHTTPEvent < Data
@@ -309,9 +392,10 @@ module Synthient
309
392
  attr_reader meta: HeliosMeta
310
393
  attr_reader details: TLSClientHello?
311
394
  attr_reader raw: String?
312
- def self.new: (timestamp: Time, tunnel_id: Integer, domain: String, port: Integer, protocol: String, meta: HeliosMeta, ?details: TLSClientHello?, ?raw: String?) -> instance
313
- def initialize: (timestamp: Time, tunnel_id: Integer, domain: String, port: Integer, protocol: String, meta: HeliosMeta, ?details: TLSClientHello?, ?raw: String?) -> void
314
- def with: (?timestamp: Time, ?tunnel_id: Integer, ?domain: String, ?port: Integer, ?protocol: String, ?meta: HeliosMeta, ?details: TLSClientHello?, ?raw: String?) -> instance
395
+ attr_reader transport: String
396
+ def self.new: (timestamp: Time, tunnel_id: Integer, domain: String, port: Integer, protocol: String, meta: HeliosMeta, ?details: TLSClientHello?, ?raw: String?, transport: String) -> instance
397
+ def initialize: (timestamp: Time, tunnel_id: Integer, domain: String, port: Integer, protocol: String, meta: HeliosMeta, ?details: TLSClientHello?, ?raw: String?, transport: String) -> void
398
+ def with: (?timestamp: Time, ?tunnel_id: Integer, ?domain: String, ?port: Integer, ?protocol: String, ?meta: HeliosMeta, ?details: TLSClientHello?, ?raw: String?, ?transport: String) -> instance
315
399
  end
316
400
 
317
401
  class HeliosMeta < Data
@@ -480,9 +564,19 @@ module Synthient
480
564
  attr_reader renegotiation_info: bool?
481
565
  attr_reader signed_certificate_timestamps: bool?
482
566
  attr_reader status_request: bool?
483
- def self.new: (?record_version: String?, ?handshake_version: String?, ?client_random: String?, ?session_id: String?, ?session_id_length: Integer?, ?cipher_suites: Array[TLSCodeName]?, ?compression_methods: Array[Integer]?, ?extensions: Array[TLSExtension]?, ?sni: String?, ?alpn: Array[String]?, ?supported_versions: Array[String]?, ?supported_groups: Array[TLSCodeName]?, ?signature_algorithms: Array[TLSCodeName]?, ?ec_point_formats: Array[String]?, ?key_share_groups: Array[String]?, ?psk_key_exchange_modes: Array[String]?, ?compress_certificate: Array[String]?, ?has_grease: bool?, ?application_settings: bool?, ?delegated_credentials: bool?, ?encrypt_then_mac: bool?, ?extended_master_secret: bool?, ?post_handshake_auth: bool?, ?renegotiation_info: bool?, ?signed_certificate_timestamps: bool?, ?status_request: bool?) -> instance
484
- def initialize: (?record_version: String?, ?handshake_version: String?, ?client_random: String?, ?session_id: String?, ?session_id_length: Integer?, ?cipher_suites: Array[TLSCodeName]?, ?compression_methods: Array[Integer]?, ?extensions: Array[TLSExtension]?, ?sni: String?, ?alpn: Array[String]?, ?supported_versions: Array[String]?, ?supported_groups: Array[TLSCodeName]?, ?signature_algorithms: Array[TLSCodeName]?, ?ec_point_formats: Array[String]?, ?key_share_groups: Array[String]?, ?psk_key_exchange_modes: Array[String]?, ?compress_certificate: Array[String]?, ?has_grease: bool?, ?application_settings: bool?, ?delegated_credentials: bool?, ?encrypt_then_mac: bool?, ?extended_master_secret: bool?, ?post_handshake_auth: bool?, ?renegotiation_info: bool?, ?signed_certificate_timestamps: bool?, ?status_request: bool?) -> void
485
- def with: (?record_version: String?, ?handshake_version: String?, ?client_random: String?, ?session_id: String?, ?session_id_length: Integer?, ?cipher_suites: Array[TLSCodeName]?, ?compression_methods: Array[Integer]?, ?extensions: Array[TLSExtension]?, ?sni: String?, ?alpn: Array[String]?, ?supported_versions: Array[String]?, ?supported_groups: Array[TLSCodeName]?, ?signature_algorithms: Array[TLSCodeName]?, ?ec_point_formats: Array[String]?, ?key_share_groups: Array[String]?, ?psk_key_exchange_modes: Array[String]?, ?compress_certificate: Array[String]?, ?has_grease: bool?, ?application_settings: bool?, ?delegated_credentials: bool?, ?encrypt_then_mac: bool?, ?extended_master_secret: bool?, ?post_handshake_auth: bool?, ?renegotiation_info: bool?, ?signed_certificate_timestamps: bool?, ?status_request: bool?) -> instance
567
+ attr_reader complete: bool?
568
+ attr_reader truncated: bool?
569
+ attr_reader transport: String?
570
+ attr_reader record_version_code: Integer?
571
+ attr_reader handshake_version_code: Integer?
572
+ attr_reader supported_version_codes: Array[Integer]?
573
+ attr_reader alpn_hex: Array[String]?
574
+ attr_reader signature_algorithms_cert: Array[TLSCodeName]?
575
+ attr_reader record_size_limit: Integer?
576
+ attr_reader max_fragment_length: Integer?
577
+ def self.new: (?record_version: String?, ?handshake_version: String?, ?client_random: String?, ?session_id: String?, ?session_id_length: Integer?, ?cipher_suites: Array[TLSCodeName]?, ?compression_methods: Array[Integer]?, ?extensions: Array[TLSExtension]?, ?sni: String?, ?alpn: Array[String]?, ?supported_versions: Array[String]?, ?supported_groups: Array[TLSCodeName]?, ?signature_algorithms: Array[TLSCodeName]?, ?ec_point_formats: Array[String]?, ?key_share_groups: Array[String]?, ?psk_key_exchange_modes: Array[String]?, ?compress_certificate: Array[String]?, ?has_grease: bool?, ?application_settings: bool?, ?delegated_credentials: bool?, ?encrypt_then_mac: bool?, ?extended_master_secret: bool?, ?post_handshake_auth: bool?, ?renegotiation_info: bool?, ?signed_certificate_timestamps: bool?, ?status_request: bool?, ?complete: bool?, ?truncated: bool?, ?transport: String?, ?record_version_code: Integer?, ?handshake_version_code: Integer?, ?supported_version_codes: Array[Integer]?, ?alpn_hex: Array[String]?, ?signature_algorithms_cert: Array[TLSCodeName]?, ?record_size_limit: Integer?, ?max_fragment_length: Integer?) -> instance
578
+ def initialize: (?record_version: String?, ?handshake_version: String?, ?client_random: String?, ?session_id: String?, ?session_id_length: Integer?, ?cipher_suites: Array[TLSCodeName]?, ?compression_methods: Array[Integer]?, ?extensions: Array[TLSExtension]?, ?sni: String?, ?alpn: Array[String]?, ?supported_versions: Array[String]?, ?supported_groups: Array[TLSCodeName]?, ?signature_algorithms: Array[TLSCodeName]?, ?ec_point_formats: Array[String]?, ?key_share_groups: Array[String]?, ?psk_key_exchange_modes: Array[String]?, ?compress_certificate: Array[String]?, ?has_grease: bool?, ?application_settings: bool?, ?delegated_credentials: bool?, ?encrypt_then_mac: bool?, ?extended_master_secret: bool?, ?post_handshake_auth: bool?, ?renegotiation_info: bool?, ?signed_certificate_timestamps: bool?, ?status_request: bool?, ?complete: bool?, ?truncated: bool?, ?transport: String?, ?record_version_code: Integer?, ?handshake_version_code: Integer?, ?supported_version_codes: Array[Integer]?, ?alpn_hex: Array[String]?, ?signature_algorithms_cert: Array[TLSCodeName]?, ?record_size_limit: Integer?, ?max_fragment_length: Integer?) -> void
579
+ def with: (?record_version: String?, ?handshake_version: String?, ?client_random: String?, ?session_id: String?, ?session_id_length: Integer?, ?cipher_suites: Array[TLSCodeName]?, ?compression_methods: Array[Integer]?, ?extensions: Array[TLSExtension]?, ?sni: String?, ?alpn: Array[String]?, ?supported_versions: Array[String]?, ?supported_groups: Array[TLSCodeName]?, ?signature_algorithms: Array[TLSCodeName]?, ?ec_point_formats: Array[String]?, ?key_share_groups: Array[String]?, ?psk_key_exchange_modes: Array[String]?, ?compress_certificate: Array[String]?, ?has_grease: bool?, ?application_settings: bool?, ?delegated_credentials: bool?, ?encrypt_then_mac: bool?, ?extended_master_secret: bool?, ?post_handshake_auth: bool?, ?renegotiation_info: bool?, ?signed_certificate_timestamps: bool?, ?status_request: bool?, ?complete: bool?, ?truncated: bool?, ?transport: String?, ?record_version_code: Integer?, ?handshake_version_code: Integer?, ?supported_version_codes: Array[Integer]?, ?alpn_hex: Array[String]?, ?signature_algorithms_cert: Array[TLSCodeName]?, ?record_size_limit: Integer?, ?max_fragment_length: Integer?) -> instance
486
580
  end
487
581
 
488
582
  class TLSCodeName < Data
data/sig/synthient.rbs CHANGED
@@ -63,29 +63,46 @@ module Synthient
63
63
  attr_reader helios_https: Feed[HeliosHTTPSEvent]
64
64
  attr_reader helios_dns: Feed[HeliosDNSEvent]
65
65
  attr_reader helios_adb: Feed[HeliosADBEvent]
66
+ attr_reader geolocation: Dataset
67
+ attr_reader whois: Dataset
66
68
 
67
69
  def initialize: (?api_key: String?, ?base_url: String, ?max_retries: Integer, ?timeout: Numeric,
68
70
  ?open_timeout: Numeric, ?user_agent: String?, ?response_hook: _ResponseHook?) -> void
69
71
  def lookup_ip: (String | IPAddr ip) -> IPInfo
70
72
  def lookup_ips: (Enumerable[String | IPAddr] ips) -> Array[IPInfo]
73
+ %a{deprecated: Domain lookup was removed from the Synthient API and will stop working when the endpoint is turned off. It will be removed in the next major version.}
71
74
  def lookup_domain: (String domain, ?limit: Integer?) -> DomainInfo
72
75
  def account: () -> Account
73
76
  def health: () -> nil
74
77
  def close: () -> nil
75
78
  end
76
79
 
80
+ type export_day = String | Date
81
+
77
82
  class Feed[E]
78
83
  type export_id = String | Date | Time
79
84
 
80
85
  def stream: () { (E event) -> void } -> nil
81
86
  | () -> Enumerator[E, nil]
82
- def list_exports: (?limit: Integer?, ?cursor: String?) -> ExportPage
83
- def each_export: (?limit: Integer?, ?cursor: String?) { (Export export) -> void } -> nil
84
- | (?limit: Integer?, ?cursor: String?) -> Enumerator[Export, nil]
85
- def export_meta: (export_id export) -> ExportMeta
86
- def download_url: (export_id export) -> URI::HTTP
87
- def download: (export_id export) { (String chunk) -> void } -> nil
88
- | (export_id export) -> Enumerator[String, nil]
87
+ def list_exports: (?limit: Integer?, ?cursor: String?, ?day: export_day?, ?variant: String?) -> ExportPage
88
+ def each_export: (?limit: Integer?, ?cursor: String?, ?day: export_day?, ?variant: String?) { (Export export) -> void } -> nil
89
+ | (?limit: Integer?, ?cursor: String?, ?day: export_day?, ?variant: String?) -> Enumerator[Export, nil]
90
+ def export_volume: (?days: Integer?) -> ExportVolume
91
+ def export_meta: (export_id export, ?variant: String?) -> ExportMeta
92
+ def download_url: (export_id export, ?variant: String?) -> URI::HTTP
93
+ def download: (export_id export, ?variant: String?) { (String chunk) -> void } -> nil
94
+ | (export_id export, ?variant: String?) -> Enumerator[String, nil]
95
+ end
96
+
97
+ class Dataset
98
+ def list_exports: (?limit: Integer?, ?cursor: String?, ?day: export_day?) -> ExportPage
99
+ def each_export: (?limit: Integer?, ?cursor: String?, ?day: export_day?) { (Export export) -> void } -> nil
100
+ | (?limit: Integer?, ?cursor: String?, ?day: export_day?) -> Enumerator[Export, nil]
101
+ def export_volume: (?days: Integer?) -> ExportVolume
102
+ def export_meta: (export_day export, ?format: String?) -> ExportMeta
103
+ def download_url: (export_day export, ?format: String?) -> URI::HTTP
104
+ def download: (export_day export, ?format: String?) { (String chunk) -> void } -> nil
105
+ | (export_day export, ?format: String?) -> Enumerator[String, nil]
89
106
  end
90
107
 
91
108
  module GRPCSchema