Skip to content

Commit

Permalink
Merge pull request #48 from surface-security/fix-scanner-input-filter
Browse files Browse the repository at this point in the history
Adds active=True to scanner inputs
  • Loading branch information
gsilvapt authored Oct 13, 2022
2 parents ffe4e21 + d958b1d commit 6e9e6aa
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion surface/scanners/inputs/base.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
__CACHE__ = {}
from abc import ABCMeta


CHOICES = []


Expand Down
3 changes: 2 additions & 1 deletion surface/scanners/inputs/ips.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from .base import BaseInput
from dns_ips import models

from .base import BaseInput


class IPs(BaseInput):
name = 'IPS'
Expand Down
1 change: 1 addition & 0 deletions surface/scanners/inputs/ips_hosts.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import itertools

from . import hosts, ips
from .base import BaseInput

Expand Down
2 changes: 1 addition & 1 deletion surface/scanners/inputs/livehosts.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from django.core.exceptions import ObjectDoesNotExist
from django.db.models import Q
from django.utils import timezone

from scanners import models

from .base import BaseInput
Expand All @@ -17,6 +16,7 @@ class LiveIPsHosts(BaseInput):

def _queryset(self, ports, tag_filter):
return models.LiveHost.objects.filter(
active=True,
host__any__tags__name=tag_filter,
last_seen__gte=timezone.now() - timezone.timedelta(days=7),
port__in=ports,
Expand Down

0 comments on commit 6e9e6aa

Please sign in to comment.