# GENERATED BY KOMAND SDK - DO NOT EDIT
import insightconnect_plugin_runtime
import json


class Component:
    DESCRIPTION = "Query a routable IPv4 address in the GreyNoise Context API endpoint"


class Input:
    IP_ADDRESS = "ip_address"
    

class Output:
    ACTOR = "actor"
    BOT = "bot"
    CLASSIFICATION = "classification"
    CVE = "cve"
    FIRST_SEEN = "first_seen"
    IP = "ip"
    LAST_SEEN = "last_seen"
    METADATA = "metadata"
    RAW_DATA = "raw_data"
    SEEN = "seen"
    SPOOFABLE = "spoofable"
    TAGS = "tags"
    VIZ_URL = "viz_url"
    VPN = "vpn"
    VPN_SERVICE = "vpn_service"
    

class ContextLookupInput(insightconnect_plugin_runtime.Input):
    schema = json.loads("""
   {
  "type": "object",
  "title": "Variables",
  "properties": {
    "ip_address": {
      "type": "string",
      "title": "IP Address",
      "description": "Routable IPv4 address to query",
      "order": 1
    }
  },
  "required": [
    "ip_address"
  ]
}
    """)

    def __init__(self):
        super(self.__class__, self).__init__(self.schema)


class ContextLookupOutput(insightconnect_plugin_runtime.Output):
    schema = json.loads("""
   {
  "type": "object",
  "title": "Variables",
  "properties": {
    "actor": {
      "type": "string",
      "title": "GreyNoise Actor",
      "description": "GreyNoise Actor Associated with IP",
      "order": 6
    },
    "bot": {
      "type": "boolean",
      "title": "GreyNoise Bot",
      "description": "GreyNoise has identified this as a Bot",
      "order": 10
    },
    "classification": {
      "type": "string",
      "title": "GreyNoise Classification",
      "description": "GreyNoise Classification",
      "order": 8
    },
    "cve": {
      "type": "array",
      "title": "GreyNoise CVEs",
      "description": "CVEs associated with GreyNoise Tags",
      "items": {
        "type": "string"
      },
      "order": 9
    },
    "first_seen": {
      "type": "string",
      "title": "GreyNoise First Seen",
      "displayType": "date",
      "description": "First Seen By GreyNoise",
      "format": "date-time",
      "order": 2
    },
    "ip": {
      "type": "string",
      "title": "IP Queried",
      "description": "Value that was Queried",
      "order": 1
    },
    "last_seen": {
      "type": "string",
      "title": "GreyNoise Last Seen",
      "description": "Last Seen By GreyNoise",
      "order": 3
    },
    "metadata": {
      "$ref": "#/definitions/metadata",
      "title": "GreyNoise Metadata",
      "description": "GreyNoise IP Metadata",
      "order": 13
    },
    "raw_data": {
      "$ref": "#/definitions/raw_data",
      "title": "GreyNoise Raw Data",
      "description": "GreyNoise IP Raw Data",
      "order": 14
    },
    "seen": {
      "type": "boolean",
      "title": "GreyNoise Seen",
      "description": "Has this IP been Seen by GreyNoise",
      "order": 4
    },
    "spoofable": {
      "type": "boolean",
      "title": "GreyNoise Spoofable",
      "description": "IP address may be spoofed",
      "order": 7
    },
    "tags": {
      "type": "array",
      "title": "GreyNoise Tags",
      "description": "GreyNoise Tags Associated with IP",
      "items": {
        "type": "string"
      },
      "order": 5
    },
    "viz_url": {
      "type": "string",
      "title": "GreyNoise Visualizer Link",
      "description": "Link to GreyNoise Visualizer for IP Details",
      "order": 15
    },
    "vpn": {
      "type": "boolean",
      "title": "GreyNoise VPN",
      "description": "GreyNoise has identified this as a VPN",
      "order": 11
    },
    "vpn_service": {
      "type": "string",
      "title": "GreyNoise VPN Service",
      "description": "Name of VPN Service",
      "order": 12
    }
  },
  "definitions": {
    "metadata": {
      "type": "object",
      "title": "metadata",
      "properties": {
        "asn": {
          "type": "string",
          "title": "ASN",
          "description": "ASN",
          "order": 1
        },
        "category": {
          "type": "string",
          "title": "Category",
          "description": "Category",
          "order": 2
        },
        "city": {
          "type": "string",
          "title": "City",
          "description": "City",
          "order": 3
        },
        "country": {
          "type": "string",
          "title": "Country",
          "description": "Country",
          "order": 4
        },
        "country_code": {
          "type": "string",
          "title": "Country Code",
          "description": "Country Code",
          "order": 5
        },
        "organization": {
          "type": "string",
          "title": "Organization",
          "description": "Organization",
          "order": 6
        },
        "os": {
          "type": "string",
          "title": "OS",
          "description": "OS",
          "order": 7
        },
        "rdns": {
          "type": "string",
          "title": "rDNS",
          "description": "rDNS",
          "order": 8
        },
        "region": {
          "type": "string",
          "title": "Region",
          "description": "Region",
          "order": 9
        },
        "tor": {
          "type": "boolean",
          "title": "TOR",
          "description": "TOR",
          "order": 10
        }
      }
    },
    "raw_data": {
      "type": "object",
      "title": "raw_data",
      "properties": {
        "hassh": {
          "type": "array",
          "title": "HASSH",
          "description": "HASSH",
          "items": {
            "type": "object"
          },
          "order": 1
        },
        "ja3": {
          "type": "array",
          "title": "JA3",
          "description": "Ja3",
          "items": {
            "type": "object"
          },
          "order": 2
        },
        "scan": {
          "type": "array",
          "title": "Scan",
          "description": "Scan",
          "items": {
            "$ref": "#/definitions/scan"
          },
          "order": 3
        },
        "web": {
          "type": "object",
          "title": "Web",
          "description": "Web",
          "order": 4
        }
      },
      "definitions": {
        "scan": {
          "type": "object",
          "title": "scan",
          "properties": {
            "port": {
              "type": "integer",
              "title": "Port",
              "description": "Port",
              "order": 1
            },
            "protocol": {
              "type": "string",
              "title": "Protocol",
              "description": "Protocol",
              "order": 2
            }
          }
        }
      }
    },
    "scan": {
      "type": "object",
      "title": "scan",
      "properties": {
        "port": {
          "type": "integer",
          "title": "Port",
          "description": "Port",
          "order": 1
        },
        "protocol": {
          "type": "string",
          "title": "Protocol",
          "description": "Protocol",
          "order": 2
        }
      }
    }
  }
}
    """)

    def __init__(self):
        super(self.__class__, self).__init__(self.schema)

# GENERATED BY KOMAND SDK - DO NOT EDIT
import insightconnect_plugin_runtime
import json


class Component:
    DESCRIPTION = "Query a routable IPv4 address in the GreyNoise Context API endpoint"


class Input:
    IP_ADDRESS = "ip_address"
    

class Output:
    ACTOR = "actor"
    BOT = "bot"
    CLASSIFICATION = "classification"
    CVE = "cve"
    FIRST_SEEN = "first_seen"
    IP = "ip"
    LAST_SEEN = "last_seen"
    METADATA = "metadata"
    RAW_DATA = "raw_data"
    SEEN = "seen"
    SPOOFABLE = "spoofable"
    TAGS = "tags"
    VIZ_URL = "viz_url"
    VPN = "vpn"
    VPN_SERVICE = "vpn_service"
    

class ContextLookupInput(insightconnect_plugin_runtime.Input):
    schema = json.loads("""
   {
  "type": "object",
  "title": "Variables",
  "properties": {
    "ip_address": {
      "type": "string",
      "title": "IP Address",
      "description": "Routable IPv4 address to query",
      "order": 1
    }
  },
  "required": [
    "ip_address"
  ]
}
    """)

    def __init__(self):
        super(self.__class__, self).__init__(self.schema)


class ContextLookupOutput(insightconnect_plugin_runtime.Output):
    schema = json.loads("""
   {
  "type": "object",
  "title": "Variables",
  "properties": {
    "actor": {
      "type": "string",
      "title": "GreyNoise Actor",
      "description": "GreyNoise Actor Associated with IP",
      "order": 6
    },
    "bot": {
      "type": "boolean",
      "title": "GreyNoise Bot",
      "description": "GreyNoise has identified this as a Bot",
      "order": 10
    },
    "classification": {
      "type": "string",
      "title": "GreyNoise Classification",
      "description": "GreyNoise Classification",
      "order": 8
    },
    "cve": {
      "type": "array",
      "title": "GreyNoise CVEs",
      "description": "CVEs associated with GreyNoise Tags",
      "items": {
        "type": "string"
      },
      "order": 9
    },
    "first_seen": {
      "type": "string",
      "title": "GreyNoise First Seen",
      "displayType": "date",
      "description": "First Seen By GreyNoise",
      "format": "date-time",
      "order": 2
    },
    "ip": {
      "type": "string",
      "title": "IP Queried",
      "description": "Value that was Queried",
      "order": 1
    },
    "last_seen": {
      "type": "string",
      "title": "GreyNoise Last Seen",
      "description": "Last Seen By GreyNoise",
      "order": 3
    },
    "metadata": {
      "$ref": "#/definitions/metadata",
      "title": "GreyNoise Metadata",
      "description": "GreyNoise IP Metadata",
      "order": 13
    },
    "raw_data": {
      "$ref": "#/definitions/raw_data",
      "title": "GreyNoise Raw Data",
      "description": "GreyNoise IP Raw Data",
      "order": 14
    },
    "seen": {
      "type": "boolean",
      "title": "GreyNoise Seen",
      "description": "Has this IP been Seen by GreyNoise",
      "order": 4
    },
    "spoofable": {
      "type": "boolean",
      "title": "GreyNoise Spoofable",
      "description": "IP address may be spoofed",
      "order": 7
    },
    "tags": {
      "type": "array",
      "title": "GreyNoise Tags",
      "description": "GreyNoise Tags Associated with IP",
      "items": {
        "type": "string"
      },
      "order": 5
    },
    "viz_url": {
      "type": "string",
      "title": "GreyNoise Visualizer Link",
      "description": "Link to GreyNoise Visualizer for IP Details",
      "order": 15
    },
    "vpn": {
      "type": "boolean",
      "title": "GreyNoise VPN",
      "description": "GreyNoise has identified this as a VPN",
      "order": 11
    },
    "vpn_service": {
      "type": "string",
      "title": "GreyNoise VPN Service",
      "description": "Name of VPN Service",
      "order": 12
    }
  },
  "definitions": {
    "metadata": {
      "type": "object",
      "title": "metadata",
      "properties": {
        "asn": {
          "type": "string",
          "title": "ASN",
          "description": "ASN",
          "order": 1
        },
        "category": {
          "type": "string",
          "title": "Category",
          "description": "Category",
          "order": 2
        },
        "city": {
          "type": "string",
          "title": "City",
          "description": "City",
          "order": 3
        },
        "country": {
          "type": "string",
          "title": "Country",
          "description": "Country",
          "order": 4
        },
        "country_code": {
          "type": "string",
          "title": "Country Code",
          "description": "Country Code",
          "order": 5
        },
        "organization": {
          "type": "string",
          "title": "Organization",
          "description": "Organization",
          "order": 6
        },
        "os": {
          "type": "string",
          "title": "OS",
          "description": "OS",
          "order": 7
        },
        "rdns": {
          "type": "string",
          "title": "rDNS",
          "description": "rDNS",
          "order": 8
        },
        "region": {
          "type": "string",
          "title": "Region",
          "description": "Region",
          "order": 9
        },
        "tor": {
          "type": "boolean",
          "title": "TOR",
          "description": "TOR",
          "order": 10
        }
      }
    },
    "raw_data": {
      "type": "object",
      "title": "raw_data",
      "properties": {
        "hassh": {
          "type": "array",
          "title": "HASSH",
          "description": "HASSH",
          "items": {
            "type": "object"
          },
          "order": 1
        },
        "ja3": {
          "type": "array",
          "title": "JA3",
          "description": "Ja3",
          "items": {
            "type": "object"
          },
          "order": 2
        },
        "scan": {
          "type": "array",
          "title": "Scan",
          "description": "Scan",
          "items": {
            "$ref": "#/definitions/scan"
          },
          "order": 3
        },
        "web": {
          "type": "object",
          "title": "Web",
          "description": "Web",
          "order": 4
        }
      },
      "definitions": {
        "scan": {
          "type": "object",
          "title": "scan",
          "properties": {
            "port": {
              "type": "integer",
              "title": "Port",
              "description": "Port",
              "order": 1
            },
            "protocol": {
              "type": "string",
              "title": "Protocol",
              "description": "Protocol",
              "order": 2
            }
          }
        }
      }
    },
    "scan": {
      "type": "object",
      "title": "scan",
      "properties": {
        "port": {
          "type": "integer",
          "title": "Port",
          "description": "Port",
          "order": 1
        },
        "protocol": {
          "type": "string",
          "title": "Protocol",
          "description": "Protocol",
          "order": 2
        }
      }
    }
  }
}
    """)

    def __init__(self):
        super(self.__class__, self).__init__(self.schema)

# GENERATED BY KOMAND SDK - DO NOT EDIT {   "type": "object",   "title": "Variables",   "properties": {     "ip_address": {       "type": "string",       "title": "IP Address",       "description": "Routable IPv4 address to query",       "order": 1     }   },   "required": [     "ip_address"   ] } {   "type": "object",   "title": "Variables",   "properties": {     "actor": {       "type": "string",       "title": "GreyNoise Actor",       "description": "GreyNoise Actor Associated with IP",       "order": 6     },     "bot": {       "type": "boolean",       "title": "GreyNoise Bot",       "description": "GreyNoise has identified this as a Bot",       "order": 10     },     "classification": {       "type": "string",       "title": "GreyNoise Classification",       "description": "GreyNoise Classification",       "order": 8     },     "cve": {       "type": "array",       "title": "GreyNoise CVEs",       "description": "CVEs associated with GreyNoise Tags",       "items": {         "type": "string"       },       "order": 9     },     "first_seen": {       "type": "string",       "title": "GreyNoise First Seen",       "displayType": "date",       "description": "First Seen By GreyNoise",       "format": "date-time",       "order": 2     },     "ip": {       "type": "string",       "title": "IP Queried",       "description": "Value that was Queried",       "order": 1     },     "last_seen": {       "type": "string",       "title": "GreyNoise Last Seen",       "description": "Last Seen By GreyNoise",       "order": 3     },     "metadata": {       "$ref": "#/definitions/metadata",       "title": "GreyNoise Metadata",       "description": "GreyNoise IP Metadata",       "order": 13     },     "raw_data": {       "$ref": "#/definitions/raw_data",       "title": "GreyNoise Raw Data",       "description": "GreyNoise IP Raw Data",       "order": 14     },     "seen": {       "type": "boolean",       "title": "GreyNoise Seen",       "description": "Has this IP been Seen by GreyNoise",       "order": 4     },     "spoofable": {       "type": "boolean",       "title": "GreyNoise Spoofable",       "description": "IP address may be spoofed",       "order": 7     },     "tags": {       "type": "array",       "title": "GreyNoise Tags",       "description": "GreyNoise Tags Associated with IP",       "items": {         "type": "string"       },       "order": 5     },     "viz_url": {       "type": "string",       "title": "GreyNoise Visualizer Link",       "description": "Link to GreyNoise Visualizer for IP Details",       "order": 15     },     "vpn": {       "type": "boolean",       "title": "GreyNoise VPN",       "description": "GreyNoise has identified this as a VPN",       "order": 11     },     "vpn_service": {       "type": "string",       "title": "GreyNoise VPN Service",       "description": "Name of VPN Service",       "order": 12     }   },   "definitions": {     "metadata": {       "type": "object",       "title": "metadata",       "properties": {         "asn": {           "type": "string",           "title": "ASN",           "description": "ASN",           "order": 1         },         "category": {           "type": "string",           "title": "Category",           "description": "Category",           "order": 2         },         "city": {           "type": "string",           "title": "City",           "description": "City",           "order": 3         },         "country": {           "type": "string",           "title": "Country",           "description": "Country",           "order": 4         },         "country_code": {           "type": "string",           "title": "Country Code",           "description": "Country Code",           "order": 5         },         "organization": {           "type": "string",           "title": "Organization",           "description": "Organization",           "order": 6         },         "os": {           "type": "string",           "title": "OS",           "description": "OS",           "order": 7         },         "rdns": {           "type": "string",           "title": "rDNS",           "description": "rDNS",           "order": 8         },         "region": {           "type": "string",           "title": "Region",           "description": "Region",           "order": 9         },         "tor": {           "type": "boolean",           "title": "TOR",           "description": "TOR",           "order": 10         }       }     },     "raw_data": {       "type": "object",       "title": "raw_data",       "properties": {         "hassh": {           "type": "array",           "title": "HASSH",           "description": "HASSH",           "items": {             "type": "object"           },           "order": 1         },         "ja3": {           "type": "array",           "title": "JA3",           "description": "Ja3",           "items": {             "type": "object"           },           "order": 2         },         "scan": {           "type": "array",           "title": "Scan",           "description": "Scan",           "items": {             "$ref": "#/definitions/scan"           },           "order": 3         },         "web": {           "type": "object",           "title": "Web",           "description": "Web",           "order": 4         }       },       "definitions": {         "scan": {           "type": "object",           "title": "scan",           "properties": {             "port": {               "type": "integer",               "title": "Port",               "description": "Port",               "order": 1             },             "protocol": {               "type": "string",               "title": "Protocol",               "description": "Protocol",               "order": 2             }           }         }       }     },     "scan": {       "type": "object",       "title": "scan",       "properties": {         "port": {           "type": "integer",           "title": "Port",           "description": "Port",           "order": 1         },         "protocol": {           "type": "string",           "title": "Protocol",           "description": "Protocol",           "order": 2         }       }     }   } }