README_REST_API
NAME
Shodan::API::REST
DESCRIPTION
A raku-lang client for Shodan, a search engine for Internet-connected devices. This client provides an interface for the Shodan REST API.
METHODS
method host
method host(
Str :$ip!,
Bool :$history = Bool::False,
Bool :$minify = Bool::False
) returns HashReturns all services that have been found on the given host IP.
method host-count
method host-count(
Str :$query!,
Str :$facets = ""
) returns HashReturns the total number of results that matched the query and any facet info.
method host-search
method host-search(
Str :$query!,
Str :$facets = "",
Int :$page where { ... } = 1,
Bool :$minify = Bool::True
) returns HashSearch Shodan using the same query syntax as the website and use facets to get summary information for different properties.
method host-search-facets
method host-search-facets() returns ArrayReturns a list of facets that can be used to get a breakdown of the top values for a property.
method host-search-filters
method host-search-filters() returns ArrayReturns a list of all filters that can be used when searching.
method search-tokens
method search-tokens(
Str :$query!
) returns HashThis method lets you determine which filters are being used by the query string and what parameters were provided to the filters.
method ports
method ports() returns ArrayReturns a list all ports that Shodan is crawling on the Internet.
method protocols
method protocols() returns HashReturns a list all protocols that can be used when performing on-demand Internet scans.
method scan
method scan(
Str :$ips!,
Array :$service
) returns HashRequest Shodan to crawl an IP/ netblock. This method uses API scan credits.
method scan-internet
method scan-internet(
Int :$port! where { ... },
Str :$protocol!
) returns HashRequest Shodan to crawl the Internet for a specific port. This requires an enterprise data license.
method scans
method scans() returns HashReturns list of all the created scans.
method scan-status
method scan-status(
Str :$id!
) returns HashCheck the progress of a previously submitted scan request.
method alert-create
method alert-create(
Str :$name!,
Hash :$filters!,
Int :$expires where { ... }
) returns HashCreates a network alert for a defined IP/ netblock which can be used to subscribe to changes/ events that are discovered within that range.
method alert-info
method alert-info(
Str :$id!
) returns HashReturns the information about a specific network alert.
method alert-delete
method alert-delete(
Str :$id!
) returns HashRemove the specified network alert.
method alert-update
method alert-update(
Str :$id!,
Hash :$filters!
) returns HashPermits edit a network alert with a new list of IPs/ networks to keep track of.
method alerts
method alerts() returns ArrayReturns a listing of all the network alerts that are currently active on the account.
method alert-triggers
method alert-triggers() returns ArrayGet notifications when the specified trigger is met.
method alert-trigger-create
method alert-trigger-create(
Str :$id!,
Str :$trigger!
) returns HashGet notifications when the specified trigger is met.
method alert-trigger-delete
method alert-trigger-delete(
Str :$id!,
Str :$trigger!
) returns HashStop getting notifications for the specified trigger.
method alert-trigger-service-ignore
method alert-trigger-service-ignore(
Str :$id!,
Str :$trigger!,
Str :$service!
) returns HashIgnore the specified service when it is matched for the trigger.
method alert-trigger-service-notify
method alert-trigger-service-notify(
Str :$id!,
Str :$trigger!,
Str :$service!
) returns HashStart getting notifications again for the specified trigger.
method alert-notifier-create
method alert-notifier-create(
Str :$id!,
Str :$notifier-id!
) returns HashAdd the specified notifier to the network alert. Notifications are only sent if triggers have also been enabled. For each created user, there is a default notifier which will sent via email.
method alert-notifier-delete
method alert-notifier-delete(
Str :$id!,
Str :$notifier-id!
) returns HashRemove the notification service from the alert. Notifications are only sent if triggers have also been enabled.
method notifiers
method notifiers() returns HashGet a list of all the notifiers that the user has created.
method notifier-providers
method notifier-providers() returns HashGet a list of all the notification providers that are available and the parameters to submit when creating them.
method notifier-create
method notifier-create(
Str :$provider!,
Str :$description!,
Hash :$args!
) returns MuUse this method to create a new notification service endpoint that Shodan services can send notifications through.
method notifier-delete
method notifier-delete(
Str :$id!
) returns HashRemove the notification service created for the user.
method notifier
method notifier(
Str :$id!
) returns HashUse this method to create a new notification service endpoint that Shodan services can send notifications through.
method notifier-update
method notifier-update(
Str :$id!,
Hash :$args!
) returns HashUse this method to update the parameters of a notifier.
method queries
method queries(
Int :$page where { ... } = 1,
Str :$sort = "timestamp",
Str :$order = "desc"
) returns HashUse this method to obtain a list of search queries that users have saved in Shodan.
method query-search
method query-search(
Str :$query!,
Int :$page where { ... } = 1
) returns MuUse this method to search the directory of search queries that users have saved in Shodan.
method query-tags
method query-tags(
Int :$size where { ... } = 10
) returns MuUse this method to obtain a list of popular tags for the saved search queries in Shodan.
method data
method data() returns ArrayUse this method to see a list of the datasets that are available for download.
method data-dataset
method data-dataset(
Str :$dataset!
) returns ArrayGet a list of files that are available for download from the provided dataset.
method org
method org() returns HashGet information about your organization such as the list of its members, upgrades, authorized domains and more.
method org-member-create
method org-member-create(
Str :$user!,
Bool :$notify = Bool::False
) returns HashAdd a Shodan user to the organization and upgrade them.
method org-member-delete
method org-member-delete(
Str :$user!
) returns HashRemove and downgrade the provided member from the organization.
method account-profile
method account-profile() returns HashReturns information about the Shodan account linked to this API key.
method dns-domain
method dns-domain(
Str :$domain!,
Bool :$history = Bool::False,
Str :$type = "",
Int :$page where { ... } = 1
) returns HashGet all the subdomains and other DNS entries for the given domain. Uses 1 query credit per lookup.
method dns-resolve
method dns-resolve(
Str :$hostnames!
) returns HashLook up the IP address for the provided list of hostnames.
method dns-reverse
method dns-reverse(
Str :$ips!
) returns HashLook up the hostnames that have been defined for the given list of IP addresses.
method tools-http-headers
method tools-http-headers() returns HashShows the HTTP headers that your client sends when connecting to a webserver.
method tools-myip
method tools-myip() returns StrGet your current IP address as seen from the Internet.
method api-info
method api-info() returns HashReturns information about the API plan belonging to the given API key.
AUTHOR
"Sarah Fuller", <"sarah at averna . id . au">
COPYRIGHT AND LICENSE
Copyright 2022 Sarah Fuller This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.