<commit_before># -*- coding: utf-8 -*-
# -------------------------------------------------------------------------------
# Name:         sfp_securitytrails
# Purpose:      Query securitytrails using their API
#
# Author:      <NAME>
#
# Created:     01/02/2017
# Copyright:   (c) <NAME> 2017
# Licence:     GPL
# -------------------------------------------------------------------------------

import json
import base64
from datetime import datetime
import time
import socket
from netaddr import IPNetwork
from sflib import SpiderFoot, SpiderFootPlugin, SpiderFootEvent

class sfp_securitytrails(SpiderFootPlugin):
    """SecurityTrails:Investigate,Passive:Search Engines:apikey:Obtain Passive DNS and other information from SecurityTrails"""

    # Default options
    opts = {
        "api_key": "",
        "verify": True,
        "cohostsamedomain": False
    }

    # Option descriptions
    optdescs = {
        "api_key": "Your SecurityTrails API key",
        "verify": "Verify co-hosts are valid by checking if they still resolve to the shared IP.",
        "cohostsamedomain": "Treat co-hosted sites on the same target domain as co-hosting?",
    }<commit_msg>Additional configuration, like other modules have.<commit_after># -*- coding: utf-8 -*-
# -------------------------------------------------------------------------------
# Name:         sfp_securitytrails
# Purpose:      Query securitytrails using their API
#
# Author:      <NAME>
#
# Created:     01/02/2017
# Copyright:   (c) <NAME> 2017
# Licence:     GPL
# -------------------------------------------------------------------------------

import json
import base64
from datetime import datetime
import time
import socket
from netaddr import IPNetwork
from sflib import SpiderFoot, SpiderFootPlugin, SpiderFootEvent

class sfp_securitytrails(SpiderFootPlugin):
    """SecurityTrails:Investigate,Passive:Search Engines:apikey:Obtain Passive DNS and other information from SecurityTrails"""

    # Default options
    opts = {
        "api_key": "",
        "verify": True,
        "cohostsamedomain": False
    }

    # Option descriptions
    optdescs = {
        "api_key": "Your SecurityTrails API key",
        "verify": "Verify co-hosts are valid by checking if they still resolve to the shared IP.",
        "cohostsamedomain": "Treat co-hosted sites on the same target domain as co-hosting?"
    }
{'fraction_non_alphanumeric': 0.21422558922558924, 'fraction_numerical': 0.012626262626262626, 'mean_word_length': 1.9824341279799247, 'pattern_counts': {'":': 12, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5423511', 'n_tokens_mistral': 643, 'n_tokens_neox': 601, 'n_words': 197}