Skip to content

Commit

Permalink
Add VT custom limit
Browse files Browse the repository at this point in the history
  • Loading branch information
battleoverflow committed Jun 13, 2023
1 parent 5dc79f6 commit de66d6e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions threatingestor/sources/virustotal.py
Expand Up @@ -4,10 +4,11 @@

class Plugin(Source):
"""VirusTotal Comments Source Plugin"""
def __init__(self, name, user, api_key):
def __init__(self, name, user, api_key, limit=10):
self.name = name
self.user = user
self.api_key = api_key
self.limit = limit

def run(self, saved_state):
"""
Expand All @@ -20,7 +21,7 @@ def run(self, saved_state):
}

# Collects the 10 most recent comments from a specific user on VT
response = requests.get(f"https://www.virustotal.com/api/v3/users/{self.user}/comments?limit=10", headers=headers)
response = requests.get(f"https://www.virustotal.com/api/v3/users/{self.user}/comments?limit={self.limit}", headers=headers)

artifacts = []

Expand Down

0 comments on commit de66d6e

Please sign in to comment.