Skip to content
Merged
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
2 changes: 2 additions & 0 deletions bbot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
__version__ = "v0.0.0"

from .scanner import Scanner, Preset

__all__ = ["Scanner", "Preset"]
2 changes: 2 additions & 0 deletions bbot/core/event/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
from .base import make_event, is_event, event_from_json

__all__ = ["make_event", "is_event", "event_from_json"]
4 changes: 2 additions & 2 deletions bbot/core/helpers/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .url import *
from .misc import *
from . import regexes
from . import validators
from . import regexes as regexes
from . import validators as validators
2 changes: 2 additions & 0 deletions bbot/core/helpers/depsinstaller/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
from .installer import DepsInstaller

__all__ = ["DepsInstaller"]
2 changes: 1 addition & 1 deletion bbot/core/helpers/dns/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from .dns import DNSHelper
from .dns import DNSHelper # noqa
2 changes: 1 addition & 1 deletion bbot/core/helpers/web/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from .web import WebHelper
from .web import WebHelper # noqa
1 change: 0 additions & 1 deletion bbot/modules/telerik.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from sys import executable
from urllib.parse import urlparse

from bbot.modules.base import BaseModule

Expand Down
2 changes: 2 additions & 0 deletions bbot/scanner/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
from .preset import Preset
from .scanner import Scanner

__all__ = ["Preset", "Scanner"]
2 changes: 2 additions & 0 deletions bbot/scanner/preset/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
from .preset import Preset

__all__ = ["Preset"]
2 changes: 2 additions & 0 deletions bbot/scanner/target.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ class BaseTarget(RadixTarget):
accept_target_types = ["TARGET"]

def __init__(self, *targets, **kwargs):
# ignore blank targets (sometimes happens as a symptom of .splitlines())
targets = [stripped for t in targets if (stripped := (t.strip() if isinstance(t, str) else t))]
self.event_seeds = set()
super().__init__(*targets, **kwargs)

Expand Down
6 changes: 2 additions & 4 deletions bbot/test/bbot_fixtures.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import os # noqa
import sys
import zlib
import sys # noqa
import pytest
import shutil # noqa
import asyncio # noqa
import logging
import subprocess
import tldextract
import pytest_httpserver
from pathlib import Path
Expand All @@ -16,8 +14,8 @@
from bbot.errors import * # noqa: F401
from bbot.core import CORE
from bbot.scanner import Preset
from bbot.core.helpers.misc import mkdir, rand_string
from bbot.core.helpers.async_helpers import get_event_loop
from bbot.core.helpers.misc import mkdir, rand_string, get_python_constraints


log = logging.getLogger("bbot.test.fixtures")
Expand Down
3 changes: 1 addition & 2 deletions bbot/test/conftest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
import ssl
import time
import shutil
import pytest
import asyncio
Expand All @@ -8,8 +9,6 @@
from contextlib import suppress
from omegaconf import OmegaConf
from pytest_httpserver import HTTPServer
import time
import queue

from bbot.core import CORE
from bbot.core.helpers.misc import execute_sync_or_async
Expand Down
2 changes: 0 additions & 2 deletions bbot/test/test_step_1/test_presets.py
Original file line number Diff line number Diff line change
Expand Up @@ -1079,8 +1079,6 @@ async def test_preset_output_dir():

# regression test for https://github.com/blacklanternsecurity/bbot/issues/2337
def test_preset_serialization():
from ipaddress import ip_address, ip_network

preset = Preset("192.168.1.1")
preset = preset.bake()

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import asyncio
import re
from .base import ModuleTestBase
from werkzeug.wrappers import Response
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import asyncio
import re
from werkzeug.wrappers import Response

Expand Down
2 changes: 1 addition & 1 deletion bbot/test/test_step_2/module_tests/test_module_telerik.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import re
from .base import ModuleTestBase, tempwordlist
from .base import ModuleTestBase


class TestTelerik(ModuleTestBase):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import json
import asyncio
import logging
import websockets
from websockets.asyncio.server import serve

from .base import ModuleTestBase
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ skip = "./docs/javascripts/vega*.js,./bbot/wordlists/*"
line-length = 119
format.exclude = ["bbot/test/test_step_1/test_manager_*"]
lint.select = ["E", "F"]
lint.ignore = ["E402", "E711", "E713", "E721", "E741", "F401", "F403", "F405", "E501"]
lint.ignore = ["E402", "E711", "E713", "E721", "E741", "F403", "F405", "E501"]

[tool.poetry-dynamic-versioning]
enable = true
Expand Down