odin-sdk
v2.0.1
Published
ODIN SDK provides search across IP Services, CVEs, Certificates, Exposed Files/Buckets, Domains and more
Downloads
3
Readme
Odin SDK for Javascript
ODIN's primary focus is to equip infosec teams with a precise depiction of the internet, enabling them to strengthen their security defences and proactively detect threats within their attack surface.
The Odin SDK for Go provides a simple way to interact with the Odin API and access various services related to cybersecurity, ip services, certificates, exposed files, domains and more.
Installation
For Node.js
npm
Then install it via:
npm install odin-sdk --save
For browser
The library also works in the browser environment via npm and browserify. After following
the above steps with Node.js and installing browserify with npm install -g browserify
,
perform the following (assuming main.js is your entry file):
browserify main.js > bundle.js
Then include bundle.js in the HTML pages.
Webpack Configuration
Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:
module: {
rules: [
{
parser: {
amd: false,
},
},
];
}
Getting Started
Please follow the installation instruction and execute the following JS code:
var Odin = require("odin-sdk");
var defaultClient = Odin.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications["ApiKeyAuth"];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['X-API-Key'] = "Token"
// search exposed buckets (using pagination)
var api = new OdinApis.ExposedBucketsApi();
var buckets = [];
for (var i = 0; i < 10; i++) {
var query = new OdinApis.ExposedCountRequest();
query.query = "name:'lit-link-prd.appspot.com'";
var callback = function (error, data, response) {
if (error) {
console.error(error);
} else {
buckets.push(data);
}
};
api.exposedBucketsCountPost(query, callback);
console.log(JSON.stringify(buckets));
}
// search files in a exposed bucket
var api = new OdinApis.ExposedFilesApi();
var query = {
query: "provider: aws",
limit: 1,
sortDir: "desc",
sortBy: "files",
};
var callback = function (error, data, response) {
if (error) {
console.error(error);
} else {
console.log(JSON.stringify(data));
}
};
api.exposedFilesSearchPost(query, callback);
// search hosts
var api = new OdinApis.ExposedHostsApi();
var query = {
query:
'(last_updated_at:["2024-07-08T02:41:15.528Z" TO *] AND services.port:80) OR asn.number:AS63949',
limit: 1,
};
var callback = function (error, data, response) {
if (error) {
console.error(error);
} else {
console.log(JSON.stringify(data));
}
};
api.exposedHostsSearchPost(query, callback);
// certificates search
var api = new OdinApis.CertificateApi();
var query = {
query:
"certificate.subject_alt_name.dns_names:'cloudflare.com' AND certificate.validity.not_after:\"2024-09-20T18:19:24\"",
limit: 1,
};
var callback = function (error, data, response) {
if (error) {
console.error(error);
} else {
console.log(JSON.stringify(data));
}
};
api.certificatesSearchPost(query, callback);
// certificates count
var api = new OdinApis.CertificateApi();
var query = new OdinApis.CertificateCertCountRequest();
var callback = function (error, data, response) {
if (error) {
console.error(error);
} else {
console.log(JSON.stringify(data));
}
};
api.certificatesCountPost(query, callback);
Documentation for API Endpoints
All URIs are relative to https://api.odin.io
| Class | Method | HTTP request | Description | | ------------------------ | ------------------------------------------------------------------------------------------------------ | ---------------------------------------------------- | ---------------------------------------------- | | Odin.CertificateApi | v1CertificatesCountPost | POST /v1/certificates/count | Get records count | | Odin.CertificateApi | v1CertificatesHashGet | GET /v1/certificates/{hash} | Get the complete certificate | | Odin.CertificateApi | v1CertificatesScrollNextPost | POST /v1/certificates/scroll/next | Get the next batch of record | | Odin.CertificateApi | v1CertificatesScrollPost | POST /v1/certificates/scroll | Get the record based on query | | Odin.CertificateApi | v1CertificatesSearchPost | POST /v1/certificates/search | Search records | | Odin.CertificateApi | v1CertificatesSummaryPost | POST /v1/certificates/summary | Get summary | | Odin.DomainApi | v1DomainCountPost | POST /v1/domain/count | Get domains count | | Odin.DomainApi | v1DomainSearchPost | POST /v1/domain/search | Search domains | | Odin.DomainApi | v1DomainSubdomainCountPost | POST /v1/domain/subdomain/count | Fetch the total no. of subdomain records | | Odin.DomainApi | v1DomainSubdomainSearchPost | POST /v1/domain/subdomain/search | Fetch the subdomain record | | Odin.DomainApi | v1DomainWhoisDomainNameGet | GET /v1/domain/whois/{domain-name} | Fetch the domain whois record details | | Odin.DomainApi | v1DomainWhoisDomainNameHistoricalGet | GET /v1/domain/whois/{domain-name}/historical | Fetch all the domain whois historical records | | Odin.DomainApi | v1DomainWhoisDomainNameIsExpiredGet | GET /v1/domain/whois/{domain-name}/is-expired | Get the expiry for a particular domain | | Odin.DomainApi | v1DomainWhoisDomainNameIsRegisteredGet | GET /v1/domain/whois/{domain-name}/is-registered | Fetch all the domain whois historical records | | Odin.ExposedBucketsApi | v1ExposedBucketsCountPost | POST /v1/exposed/buckets/count | Get exposed bucket count | | Odin.ExposedBucketsApi | v1ExposedBucketsSearchPost | POST /v1/exposed/buckets/search | Search exposed buckets | | Odin.ExposedBucketsApi | v1ExposedBucketsSummaryPost | POST /v1/exposed/buckets/summary | Get Exposed buckets summary | | Odin.ExposedFilesApi | v1ExposedFilesCountPost | POST /v1/exposed/files/count | Get file count | | Odin.ExposedFilesApi | v1ExposedFilesSearchPost | POST /v1/exposed/files/search | Search exposed files | | Odin.ExposedFilesApi | v1ExposedFilesSummaryPost | POST /v1/exposed/files/summary | Get file summary | | Odin.FieldsApi | v1FieldsCertificatesCategoryGet | GET /v1/fields/certificates/{category}/ | Get the fields for certificates | | Odin.FieldsApi | v1FieldsExposedBucketsGet | GET /v1/fields/exposed/buckets/ | Get the fields for exposed | | Odin.FieldsApi | v1FieldsExposedFilesGet | GET /v1/fields/exposed/files/ | Get the fields data | | Odin.FieldsApi | v1FieldsHostsCategoryGet | GET /v1/fields/hosts/{category}/ | Get the fields for hosts | | Odin.HealthApi | v1PingGet | GET /v1/ping | Health Check | | Odin.HostsApi | v1CvesAllIpPageGet | GET /v1/cves/all/{ip}/{page} | Get cve details | | Odin.HostsApi | v1HostsCountPost | POST /v1/hosts/count | Get the record count | | Odin.HostsApi | v1HostsCveIpGet | GET /v1/hosts/cve/{ip}/ | Get ip cve details | | Odin.HostsApi | v1HostsCvesIpCveGet | GET /v1/hosts/cves/{ip}/{cve} | Get cve | | Odin.HostsApi | v1HostsExploitsIpCveGet | GET /v1/hosts/exploits/{ip}/{cve} | Get exploits for ip and cve | | Odin.HostsApi | v1HostsExploitsIpGet | GET /v1/hosts/exploits/{ip}/ | Get exploits for ip | | Odin.HostsApi | v1HostsIpGet | GET /v1/hosts/{ip}/ | Get the latest ip details | | Odin.HostsApi | v1HostsSearchPost | POST /v1/hosts/search | Search hosts | | Odin.HostsApi | v1HostsSummaryPost | POST /v1/hosts/summary | Get summary | | Odin.HostsApi | v2HostsCountPost | POST /v2/hosts/count | Fetch the record count | | Odin.HostsApi | v2HostsIpPost | POST /v2/hosts/{ip} | Fetch the latest ip details | | Odin.HostsApi | v2HostsSearchPost | POST /v2/hosts/search | Fetch the record based on query | | Odin.HostsApi | v2HostsSummaryPost | POST /v2/hosts/summary | Create the summary of the field based on query |
Documentation for Models
- Odin.APIResponse
- Odin.CertCount
- Odin.CertificateAPIResponse
- Odin.CertificateCertCount
- Odin.CertificateCertCountRequest
- Odin.CertificateCertScroll
- Odin.CertificateCertScrollRequest
- Odin.CertificateCertSearchRequest
- Odin.CertificateCertSummaryRequest
- Odin.CertificateCertificateHashResponse
- Odin.CertificateCertificateHashResponseData
- Odin.CertificateCertificateHashResponseDataCertificate
- Odin.CertificateCertificateHashResponseDataCertificateExtensions
- Odin.CertificateCertificateHashResponseDataCertificateExtensionsAuthorityInfoAccess
- Odin.CertificateCertificateHashResponseDataCertificateExtensionsBasicConstraints
- Odin.CertificateCertificateHashResponseDataCertificateExtensionsCertificatePoliciesInner
- Odin.CertificateCertificateHashResponseDataCertificateExtensionsExtendedKeyUsage
- Odin.CertificateCertificateHashResponseDataCertificateExtensionsKeyUsage
- Odin.CertificateCertificateHashResponseDataCertificateExtensionsSubjectAltName
- Odin.CertificateCertificateHashResponseDataCertificateIssuer
- Odin.CertificateCertificateHashResponseDataCertificateSignature
- Odin.CertificateCertificateHashResponseDataCertificateSignatureSignatureAlgorithm
- Odin.CertificateCertificateHashResponseDataCertificateSubject
- Odin.CertificateCertificateHashResponseDataCertificateSubjectAltName
- Odin.CertificateCertificateHashResponseDataCertificateSubjectAltNameExtendedDnsNamesInner
- Odin.CertificateCertificateHashResponseDataCertificateSubjectKeyInfo
- Odin.CertificateCertificateHashResponseDataCertificateSubjectKeyInfoPublicKey
- Odin.CertificateCertificateHashResponseDataCertificateValidity
- Odin.CertificateCertificateSearchData
- Odin.CertificateCertificateSearchResponse
- Odin.CertificateCertificateSearchResponsePagination
- Odin.CertificateCertificateSummaryResponse
- Odin.CertificateCertificateSummaryResponseData
- Odin.CertificateCertificateSummaryResponseDataBucketsInner
- Odin.CertificateErrorResponse
- Odin.CertificateNextBatchRequest
- Odin.CertificateSearchPagination
- Odin.CountRequest
- Odin.CybleComOdinApiControllersV2FieldsAPIResponse
- Odin.CybleComOdinApiControllersV2FieldsErrorResponse
- Odin.CybleComOdinApiControllersV2FieldsField
- Odin.CybleComOdinApiControllersV2IpservicesAPIResponse
- Odin.CybleComOdinApiControllersV2IpservicesCertCount
- Odin.CybleComOdinApiControllersV2IpservicesCountRequest
- Odin.CybleComOdinApiControllersV2IpservicesErrorResponse
- Odin.CybleComOdinApiControllersV2IpservicesSearchPagination
- Odin.CybleComOdinApiControllersV2IpservicesSearchRequest
- Odin.CybleComOdinApiControllersV2IpservicesSummaryRequest
- Odin.DnsAPIResponse
- Odin.DnsDNSCountRequest
- Odin.DnsData
- Odin.DnsDomainRequest
- Odin.DnsErrorResponse
- Odin.DnsSearchPagination
- Odin.Encoding
- Odin.ErrorResponse
- Odin.EshandlerAggregate
- Odin.EshandlerDNS
- Odin.EshandlerEXTDNSName
- Odin.ExposedAPIResponse
- Odin.ExposedAggregate
- Odin.ExposedBucket
- Odin.ExposedBucketAPIResponse
- Odin.ExposedCountRequest
- Odin.ExposedFile
- Odin.ExposedFileAPIResponse
- Odin.ExposedSearchCount
- Odin.ExposedSearchPagination
- Odin.ExposedSearchRequest
- Odin.ExposedSummaryRequest
- Odin.Field
- Odin.IPASN
- Odin.IPCVE
- Odin.IPDomain
- Odin.IPExploitDetails
- Odin.IPHostname
- Odin.IPLocation
- Odin.IPService
- Odin.IPServiceMeta
- Odin.IPServiceSoftware
- Odin.IPTag
- Odin.IPWhois
- Odin.IpservicesHostsSummaryResponse
- Odin.IpservicesHostsSummaryResponseData
- Odin.IpservicesHostsSummaryResponseDataBucketsInner
- Odin.IpservicesIPSummaryData
- Odin.IpservicesIpCveDetails
- Odin.IpservicesIpCveDetailsExploitInner
- Odin.IpservicesIpCveResponse
- Odin.PaginationStruct
- Odin.SchemaAPIResponse
- Odin.SchemaAudit
- Odin.SchemaContact
- Odin.SchemaDomainWhoisResponse
- Odin.SchemaPaginationMeta
- Odin.SchemaRegistrar
- Odin.SearchPagination
- Odin.SearchRequest
- Odin.ServiceCoordinates
- Odin.ServiceEncoding
- Odin.ServiceFullCveData
- Odin.ServiceIPASN
- Odin.ServiceIPDomain
- Odin.ServiceIPHostname
- Odin.ServiceIPLocation
- Odin.ServiceIPServiceMeta
- Odin.ServiceIPServiceSoftware
- Odin.ServiceIPTag
- Odin.ServiceIPWhois
- Odin.ServiceService
- Odin.SummaryRequest
- Odin.TokensDetailStat
- Odin.TokensErrorResponse
- Odin.TokensFinalStats
- Odin.TokensSearchStat
- Odin.TokensUserTokenStats
- Odin.V1CertificatesCountPost200Response
- Odin.V1CertificatesScrollNextPost200Response
- Odin.V1CertificatesScrollPost200Response
- Odin.V1DomainCountPost200Response
- Odin.V1DomainSearchPost200Response
- Odin.V1DomainSubdomainSearchPost200Response
- Odin.V1DomainWhoisDomainNameGet200Response
- Odin.V1DomainWhoisDomainNameHistoricalGet200Response
- Odin.V1DomainWhoisDomainNameIsExpiredGet200Response
- Odin.V1ExposedBucketsCountPost200Response
- Odin.V1ExposedBucketsSummaryPost200Response
- Odin.V1FieldsCertificatesCategoryGet200Response
- Odin.V1FieldsExposedBucketsGet200Response
- Odin.V1HostsCountPost200Response
- Odin.V1HostsCountPost400Response
- Odin.V1HostsExploitsIpCveGet200Response
- Odin.V1HostsIpGet200Response
- Odin.V1HostsSearchPost200Response
- Odin.V2HostsCountPost200Response
- Odin.V2HostsSearchPost200Response
- Odin.V2HostsSummaryPost200Response
- Odin.VisionExploitDetails
Documentation for Authorization
Authentication schemes defined for the API:
ApiKeyAuth
- Type: API key
- API key parameter name: X-API-Key
- Location: HTTP header
Generate your Odin API key from the odin dashboard.
Thank you for using the Odin SDK for Javascript. If you encounter any issues, find a bug, or want to contribute, feel free to open an issue or submit a pull request. Your feedback and contributions are highly appreciated!
For more information about our other projects and services, visit our website at https://odin.io.