cert-host-scraper 0.7.6__tar.gz → 0.8.0__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: cert-host-scraper
3
- Version: 0.7.6
3
+ Version: 0.8.0
4
4
  Summary:
5
5
  Home-page: https://github.com/inverse/cert-host-scraper
6
6
  License: MIT
@@ -26,14 +26,14 @@ Description-Content-Type: text/markdown
26
26
  [![License](https://img.shields.io/github/license/inverse/cert-host-scraper.svg)](LICENSE)
27
27
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
28
28
 
29
- Query the certificate transparency log from [crt.sh](https://crt.sh) by a given a keyword and returns the status code of the matched results. Optionally filtering the results by status code.
29
+ Query the certificate transparency log from [crt.sh](https://crt.sh) by a given a keyword and returns the status code of the matched results. Optionally, filtering the results by status code.
30
30
 
31
31
  <img alt="Demo of cert-host-scraper" src="https://i.imgur.com/Co3aTfO.gif" width="800" />
32
32
 
33
33
  ## Usage
34
34
 
35
35
  ```bash
36
- cert-host-scraper search your-domain.com [--status-code 200] [--clean/--no-clean]
36
+ cert-host-scraper search your-domain.com [--status-code 200]
37
37
  ```
38
38
 
39
39
  ## Installation
@@ -52,7 +52,7 @@ pip install cert-host-scraper
52
52
 
53
53
  ## Development
54
54
 
55
- Requires [poetry][0] and Python 3.10.
55
+ Requires [poetry][0] and Python 3.10+.
56
56
 
57
57
  ```
58
58
  poetry install
@@ -6,14 +6,14 @@
6
6
  [![License](https://img.shields.io/github/license/inverse/cert-host-scraper.svg)](LICENSE)
7
7
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
8
8
 
9
- Query the certificate transparency log from [crt.sh](https://crt.sh) by a given a keyword and returns the status code of the matched results. Optionally filtering the results by status code.
9
+ Query the certificate transparency log from [crt.sh](https://crt.sh) by a given a keyword and returns the status code of the matched results. Optionally, filtering the results by status code.
10
10
 
11
11
  <img alt="Demo of cert-host-scraper" src="https://i.imgur.com/Co3aTfO.gif" width="800" />
12
12
 
13
13
  ## Usage
14
14
 
15
15
  ```bash
16
- cert-host-scraper search your-domain.com [--status-code 200] [--clean/--no-clean]
16
+ cert-host-scraper search your-domain.com [--status-code 200]
17
17
  ```
18
18
 
19
19
  ## Installation
@@ -32,7 +32,7 @@ pip install cert-host-scraper
32
32
 
33
33
  ## Development
34
34
 
35
- Requires [poetry][0] and Python 3.10.
35
+ Requires [poetry][0] and Python 3.10+.
36
36
 
37
37
  ```
38
38
  poetry install
@@ -4,6 +4,7 @@ import sys
4
4
 
5
5
  import click
6
6
  from requests import RequestException
7
+ from rich import box
7
8
  from rich.console import Console
8
9
  from rich.progress import track
9
10
  from rich.table import Table
@@ -87,14 +88,20 @@ def search(search: str, status_code: int, timeout: int, clean: bool, strip: bool
87
88
  else:
88
89
  display = result.scraped
89
90
 
90
- table = Table(show_header=True, header_style="bold")
91
+ table = Table(show_header=True, header_style="bold", box=box.MINIMAL)
91
92
  table.add_column("URL")
92
93
  table.add_column("Status Code")
93
94
  for url_result in display:
94
95
  display_code = str(url_result.status_code)
95
96
  if url_result.status_code == -1:
96
97
  display_code = "-"
97
- table.add_row(url_result.url, display_code)
98
+
99
+ url = url_result.url
100
+ if url_result.status_code == 200:
101
+ display_code = f"[green]{display_code}[/green]"
102
+ url = f"[green]{url}[/green]"
103
+
104
+ table.add_row(url, display_code)
98
105
 
99
106
  console = Console()
100
107
  console.print(table)
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "cert-host-scraper"
3
- version = "0.7.6"
3
+ version = "0.8.0"
4
4
  description = ""
5
5
  authors = ["Malachi Soord <inverse.chi@gmail.com>"]
6
6
  license = "MIT"
@@ -21,9 +21,9 @@ rich = ">=11,<14"
21
21
  single-source = "^0.3.0"
22
22
 
23
23
  [tool.poetry.dev-dependencies]
24
- pytest = "^7.4.0"
24
+ pytest = "^7.4.2"
25
25
  pytest-socket = "^0.6.0"
26
- vcrpy = "^5.0.0"
26
+ vcrpy = "^5.1.0"
27
27
 
28
28
  [tool.ruff]
29
29
  ignore = ["E501"]