Skip to content

Commit cef7b29

Browse files
Merge pull request #126 from blacklanternsecurity/fix-datetime-error
Fix datetime error
2 parents c717a60 + 661a171 commit cef7b29

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ A simple Python utility to check whether an IP address or hostname belongs to a
44

55
`cloud_providers.json` contains lists of domains and up-to-date CIDRs for each cloud provider (updated daily via CI/CD).
66

7-
Used by [Bighuge BLS OSINT Tool (BBOT)](https://github.com/blacklanternsecurity/bbot).
7+
Used by [BBOT](https://github.com/blacklanternsecurity/bbot) and [BBOT Server](https://github.com/blacklanternsecurity/bbot-server).
88

99
## Installation
1010
~~~bash

cloudcheck/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ def check(ip):
99

1010
async def update(cache_hrs=168 + 24, force=False):
1111
time_since_last_update = datetime.now() - cloud_providers.last_updated
12-
hours_since_last_update = time_since_last_update / 60 / 60
12+
hours_since_last_update = time_since_last_update.total_seconds() / 3600
1313
if force or hours_since_last_update >= cache_hrs:
1414
await cloud_providers.update()

cloudcheck/providers/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ async def update_from_sources(self):
118118
j = self.to_json()
119119
if j:
120120
with open(self.json_path, "w") as f:
121-
json.dump(self.to_json(), f, sort_keys=True, cls=CustomJSONEncoder)
121+
json.dump(self.to_json(), f, sort_keys=True, indent=1, cls=CustomJSONEncoder)
122122
self.load_from_json(force=True)
123123

124124
def to_json(self):

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "cloudcheck"
3-
version = "6.0.0.0"
3+
version = "7.1.0.0"
44
description = "Check whether an IP address belongs to a cloud provider"
55
authors = ["TheTechromancer"]
66
license = "GPL-3.0"
@@ -39,4 +39,4 @@ build-backend = "poetry_dynamic_versioning.backend"
3939
[tool.poetry-dynamic-versioning]
4040
enable = true
4141
metadata = false
42-
format-jinja = 'v7.0.{{ distance }}'
42+
format-jinja = 'v7.1.{{ distance }}'

0 commit comments

Comments
 (0)