Example #1
0
import os
from bbrecon import BugBountyRecon, models

bb = BugBountyRecon(
    token=os.environ.get("BBRECON_KEY"),
    base_url="https://api.bugbountyrecon.com",
)


def test_get_programs():
    domains = bb.domains(programs=["statuspage"])
    domain = next(domains)
    assert isinstance(domain, models.Domain)
Example #2
0
import re
import json
import typer
from enum import Enum
from tabulate import tabulate
from typing import List, Optional
from pathlib import Path, PurePath
from datetime import datetime, timedelta

from bbrecon import BugBountyRecon, Program, ApiResponseError

from .utils import config, update

bb = BugBountyRecon(token=config.API_TOKEN, base_url=config.BASE_URL)

app = typer.Typer(help="""bbrecon

CLI for the Bug Bounty Recon API.

Requires a Bug Bounty Recon API key set in the 'BBRECON_KEY' environment variable or
configured through the CLI.

Head over to https://bugbountyrecon.com to fetch a free key.

Please use https://github.com/bugbountyrecon/bbrecon/issues to report issues.
""")
configure = typer.Typer(help="Configure bbrecon.")
get = typer.Typer(help="Fetch resources.")
app.add_typer(get, name="get")
app.add_typer(configure, name="configure")