vysion 2.0.10__tar.gz → 2.0.12__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vysion
3
- Version: 2.0.10
3
+ Version: 2.0.12
4
4
  Summary: The official Python client library for Vysion
5
5
  Home-page: https://vysion.ai
6
6
  License: Apache-2.0
@@ -25,11 +25,11 @@ Description-Content-Type: text/markdown
25
25
 
26
26
  # Vysion-PY
27
27
 
28
- Welcome to the open source repository for vysion-py, our implementation as a Python library to use the Vysion tool. Vysion is a dark web intelligence tool that provides information collected from web pages from Tor, I2P, cybercrime forums on the clearnet, etc. Vysion API also provides a feed of information on ransomware attacks published by the various ransomware groups currently active.
28
+ Welcome to the PyPi webpage for Vysion, our implementation as a Python library to use the Vysion tool. Vysion is a dark web intelligence tool that provides information collected from web pages from Tor, I2P, cybercrime forums on the clearnet, etc. Vysion API also provides a feed of information on ransomware attacks published by the various ransomware groups currently active.
29
29
 
30
30
  You can request a demo for the web app or an API-key to use in this library at [vysion.ai](https://vysion.ai).
31
31
 
32
- Latest version: [2.0.10](https://pypi.org/project/vysion/)
32
+ Latest version: [2.0.12](https://pypi.org/project/vysion/)
33
33
 
34
34
  You can visit [the documentation](https://developers.vysion.ai/?python) for more information on the searches and requests performed with the library or directly on the API.
35
35
 
@@ -1,10 +1,10 @@
1
1
  # Vysion-PY
2
2
 
3
- Welcome to the open source repository for vysion-py, our implementation as a Python library to use the Vysion tool. Vysion is a dark web intelligence tool that provides information collected from web pages from Tor, I2P, cybercrime forums on the clearnet, etc. Vysion API also provides a feed of information on ransomware attacks published by the various ransomware groups currently active.
3
+ Welcome to the PyPi webpage for Vysion, our implementation as a Python library to use the Vysion tool. Vysion is a dark web intelligence tool that provides information collected from web pages from Tor, I2P, cybercrime forums on the clearnet, etc. Vysion API also provides a feed of information on ransomware attacks published by the various ransomware groups currently active.
4
4
 
5
5
  You can request a demo for the web app or an API-key to use in this library at [vysion.ai](https://vysion.ai).
6
6
 
7
- Latest version: [2.0.10](https://pypi.org/project/vysion/)
7
+ Latest version: [2.0.12](https://pypi.org/project/vysion/)
8
8
 
9
9
  You can visit [the documentation](https://developers.vysion.ai/?python) for more information on the searches and requests performed with the library or directly on the API.
10
10
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "vysion"
3
- version = "2.0.10"
3
+ version = "2.0.12"
4
4
  description = "The official Python client library for Vysion"
5
5
  homepage = "https://vysion.ai"
6
6
  repository = "https://github.com/ByronLabs/vysion-py"
@@ -38,6 +38,7 @@ from vysion.dto import (
38
38
  ImChannelHit,
39
39
  ImMessageHit,
40
40
  ImProfileHit,
41
+ ImServerHit,
41
42
  )
42
43
  from vysion.version import __version__ as vysion_version
43
44
 
@@ -392,22 +393,27 @@ class Client(BaseClient):
392
393
  @vysion_error_manager
393
394
  def search_im(
394
395
  self,
395
- platform: str,
396
- q: str,
396
+ platform: str = None,
397
+ q: str = None,
397
398
  gte: datetime = None,
398
399
  lte: datetime = None,
399
400
  page: int = 1,
401
+ page_size: int = 10,
400
402
  username: str = None,
401
403
  ) -> VysionResponse[ImMessageHit]:
402
404
  url = self._build_api_url__(
403
- "im/" + platform + "/search",
405
+ "im/search",
406
+ platform=platform,
404
407
  q=q,
405
408
  gte=gte,
406
409
  lte=lte,
407
410
  page=page,
411
+ page_size=page_size,
408
412
  username=username,
409
413
  )
410
414
 
415
+ print(url)
416
+
411
417
  result = VysionResponse[ImMessageHit].model_validate(self._make_request(url))
412
418
  return result.data
413
419
 
@@ -448,6 +454,15 @@ class Client(BaseClient):
448
454
 
449
455
  result = VysionResponse[ImChannelHit].model_validate(self._make_request(url))
450
456
  return result.data
457
+
458
+ @vysion_error_manager
459
+ def get_im_server(
460
+ self, platform: str, serverId: str
461
+ ) -> VysionResponse[ImServerHit]:
462
+ url = self._build_api_url__("im/" + platform + "/server/", serverId)
463
+
464
+ result = VysionResponse[ImServerHit].model_validate(self._make_request(url))
465
+ return result.data
451
466
 
452
467
  #
453
468
  # FEEDS
@@ -287,10 +287,10 @@ class LanguagePair(BaseModel):
287
287
 
288
288
 
289
289
  class ImMessageHit(BaseModel):
290
- userId: Optional[int] = Field(default_factory=lambda: None)
290
+ userId: Optional[Union[int, str]] = Field(default_factory=lambda: None)
291
291
  username: Optional[str] = Field(default_factory=lambda: None)
292
- channelId: Optional[int] = Field(default_factory=lambda: None)
293
- messageId: str
292
+ channelId: Optional[Union[int, str]] = Field(default_factory=lambda: None)
293
+ messageId: Union[int, str]
294
294
  message: Optional[str] = Field(default_factory=lambda: None)
295
295
  channelTitle: Optional[str] = Field(default_factory=lambda: None)
296
296
  languages: Optional[List[LanguagePair]] = Field(default_factory=lambda: None)
@@ -298,38 +298,25 @@ class ImMessageHit(BaseModel):
298
298
  sha256sum: Optional[str] = None
299
299
  media: Optional[str] = Field(default_factory=lambda: None)
300
300
  detectionDate: datetime
301
- serverId: Optional[int] = Field(default_factory=lambda: None) #Discord Exclusive
301
+ serverId: Optional[Union[int, str]] = Field(default_factory=lambda: None) #Discord Exclusive
302
302
  serverTitle: Optional[str] = Field(default_factory=lambda: None) #Discord Exclusive
303
303
  platform: Optional[str] = Field(default_factory=lambda: None) #Discord Exclusive
304
-
305
- @field_validator("messageId")
306
- def validate_messageId(cls, v: int) -> int:
307
- if not v:
308
- raise ValueError("MessageId field cannot be empty")
309
- return v
310
304
 
311
305
  class ImMessageCardHit(BaseModel):
312
- userId: Optional[int] = Field(default_factory=lambda: None)
306
+ userId: Optional[Union[int, str]] = Field(default_factory=lambda: None)
313
307
  username: Optional[str] = Field(default_factory=lambda: None)
314
308
  channelId: Optional[int] = Field(default_factory=lambda: None)
315
- messageId: str
309
+ messageId: Union[int, str]
316
310
  message: Optional[str] = Field(default_factory=lambda: None)
317
311
  channelTitle: Optional[str] = Field(default_factory=lambda: None)
318
312
  languages: Optional[List[LanguagePair]] = Field(default_factory=lambda: None)
319
313
  detectionDate: datetime
320
- serverId: Optional[int] = Field(default_factory=lambda: None) #Discord Exclusive
314
+ serverId: Optional[Union[int, str]] = Field(default_factory=lambda: None) #Discord Exclusive
321
315
  serverTitle: Optional[str] = Field(default_factory=lambda: None) #Discord Exclusive
322
316
  platform: Optional[str] = Field(default_factory=lambda: None)
323
317
 
324
- @field_validator("messageId")
325
- def validate_messageId(cls, v: int) -> int:
326
- if not v:
327
- raise ValueError("MessageId field cannot be empty")
328
- return v
329
-
330
-
331
318
  class ImProfileHit(BaseModel):
332
- userId: int
319
+ userId: Union[int, str]
333
320
  usernames: Optional[List[str]] = Field(default_factory=lambda: None)
334
321
  firstName: Optional[List[str]] = Field(default_factory=lambda: None)
335
322
  lastName: Optional[List[str]] = Field(default_factory=lambda: None)
@@ -338,6 +325,7 @@ class ImProfileHit(BaseModel):
338
325
  bot: Optional[bool] = Field(default_factory=lambda: None) #Discord Exclusive
339
326
  discordLink: Optional[List[str]] = Field(default_factory=lambda: None) #Discord Exclusive
340
327
  discriminator: Optional[List[int]] = Field(default_factory=lambda: None) #Discord Exclusive
328
+ platform: Optional[str] = Field(default_factory=lambda: None)
341
329
 
342
330
  @field_validator("userId")
343
331
  def validate_userId(cls, v: int) -> int:
@@ -353,20 +341,15 @@ class ImProfileHit(BaseModel):
353
341
 
354
342
 
355
343
  class ImChannelHit(BaseModel):
356
- channelId: int
344
+ channelId: Union[int, str]
357
345
  channelTitles: Optional[List[str]] = Field(default_factory=lambda: None)
358
346
  detectionDate: datetime
359
347
  creationDate: datetime
360
348
  channelPhoto: Optional[List[str]] = Field(default_factory=lambda: None) #Telegram Exclusive
361
- serverId: Optional[int] = Field(default_factory=lambda: None) #Discord Exclusive
349
+ serverId: Optional[Union[int, str]] = Field(default_factory=lambda: None) #Discord Exclusive
362
350
  serverTitle: Optional[List[str]] = Field(default_factory=lambda: None) #Discord Exclusive
363
-
364
- @field_validator("channelId")
365
- def validate_channelId(cls, v: int) -> int:
366
- if not v:
367
- raise ValueError("channelId field cannot be empty")
368
- return v
369
-
351
+ platform: Optional[str] = Field(default_factory=lambda: None)
352
+
370
353
  @field_validator("detectionDate")
371
354
  def validate_detectionDate(cls, v: datetime) -> datetime:
372
355
  if not v:
@@ -380,7 +363,7 @@ class ImChannelHit(BaseModel):
380
363
  return v
381
364
 
382
365
  class ImServerHit(BaseModel):
383
- serverId: int
366
+ serverId: Union[int, str]
384
367
  serverTitles: Optional[List[str]] = Field(default_factory=lambda: None)
385
368
  detectionDate: datetime
386
369
  creationDate: datetime
@@ -388,12 +371,6 @@ class ImServerHit(BaseModel):
388
371
  memberCount: Optional[int] = Field(default_factory=lambda: None)
389
372
  discordLink: Optional[List[str]] = Field(default_factory=lambda: None)
390
373
 
391
- @field_validator("serverId")
392
- def validate_channelId(cls, v: int) -> int:
393
- if not v:
394
- raise ValueError("serverId field cannot be empty")
395
- return v
396
-
397
374
  @field_validator("detectionDate")
398
375
  def validate_detectionDate(cls, v: datetime) -> datetime:
399
376
  if not v:
@@ -15,4 +15,4 @@ See the License for the specific language governing permissions and
15
15
  limitations under the License.
16
16
  """
17
17
 
18
- __version__ = "2.0.10"
18
+ __version__ = "2.0.12"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes