Skip to content

Commit a9c1892

Browse files
authored
Merge pull request #40 from passivetotal/bugfix-lru-dates
Bugfix lru_cache and dates
2 parents 78b5b17 + fb7b6de commit a9c1892

File tree

5 files changed

+17
-5
lines changed

5 files changed

+17
-5
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Changelog
22

3+
## v2.5.6
4+
5+
#### Bug fixes
6+
7+
- Fixed issue that broke Illuminate ASI and Vuln Intel analyzer modules in Python 3.7 and
8+
earlier due to a missing param on the lru_cache decorator required in those versions.
9+
- Fixed default end date behavior in analyzer to include a full day rather than stopping at
10+
midnight "today". Was causing records with a last-seen date equal to the current date
11+
to be excluded from analyzer record list objects (including pDNS, certificates, and
12+
anything else that supported date-bounded queries).
13+
14+
15+
316
## v2.5.5
417

518
#### Enhancements

passivetotal/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VERSION="2.5.5"
1+
VERSION="2.5.6"

passivetotal/analyzer/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ def init(**kwargs):
4848
(SslRequest, 'SSL'),
4949
(WhoisRequest, 'Whois'),
5050
(IlluminateRequest, 'Illuminate'),
51-
(ArticlesRequest, 'Articles'),
5251
(ProjectsRequest, 'Projects'),
5352
(ArtifactsRequest, 'Artifacts'),
5453
(MonitorRequest, 'Monitor'),
@@ -141,7 +140,7 @@ def set_date_range(days_back=DEFAULT_DAYS_BACK, start=None, start_date=None, end
141140
now = datetime.now(timezone.utc)
142141
past = now - timedelta(days=days_back)
143142
config['start_date'] = past.date().isoformat() + ' 00:00:00'
144-
config['end_date'] = now.date().isoformat() + ' 00:00:00'
143+
config['end_date'] = now.date().isoformat() + ' 23:59:59'
145144

146145
def set_pdns_timeout(timeout):
147146
"""Set a timeout on pDNS queries to third-party sources."""

passivetotal/analyzer/illuminate/asi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def _pagination_parse_page(self, api_response):
6262
self._records.append(AttackSurface(api_response=result))
6363

6464
@staticmethod
65-
@lru_cache
65+
@lru_cache(maxsize=None)
6666
def load(pagesize=INDICATOR_PAGE_SIZE):
6767
"""Get a list of all third-party (vendor) attack surfaces authorized for this API account.
6868

passivetotal/analyzer/illuminate/vuln.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ def components(self):
627627
return self._components
628628

629629
@property
630-
@lru_cache
630+
@lru_cache(maxsize=None)
631631
def attack_surfaces(self):
632632
"""List of Illuminate Attack Surfaces (aka third-party vendors) with assets impacted by this vulnerability.
633633

0 commit comments

Comments
 (0)