Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update manifest #175

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions service_manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,4 @@ update_config:
uri: https://urlhaus.abuse.ch/downloads/urlhaus_suricata.tar.gz
update_interval_seconds: 21600 # Quarter-day (every 6 hours)
wait_for_update: true
default_pattern: .*\.rules
11 changes: 7 additions & 4 deletions suricata_/update_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,18 @@

from assemblyline.common import forge
from assemblyline.odm.models.signature import Signature
from assemblyline_v4_service.updater.updater import ServiceUpdater, SIGNATURES_META_FILENAME, UPDATER_DIR, STATUS_FILE
from assemblyline_v4_service.updater.updater import (
SIGNATURES_META_FILENAME,
STATUS_FILE,
UPDATER_DIR,
ServiceUpdater,
)
from suricataparser import parse_file

classification = forge.get_classification()


class SuricataUpdateServer(ServiceUpdater):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)

def import_update(
self,
Expand Down Expand Up @@ -144,5 +147,5 @@ def serve_directory(self, new_directory: str, new_time: str):


if __name__ == "__main__":
with SuricataUpdateServer(default_pattern=".*\.rules") as server:
with SuricataUpdateServer() as server:
server.serve_forever()