https://github.com/michael2to3/netlas-java
Netlas.io Java library
https://github.com/michael2to3/netlas-java
java library netlas netlas-io netlas-io-api search shodan
Last synced: 28 days ago
JSON representation
Netlas.io Java library
- Host: GitHub
- URL: https://github.com/michael2to3/netlas-java
- Owner: michael2to3
- License: gpl-3.0
- Archived: true
- Created: 2023-02-28T04:12:47.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-04-23T21:14:06.000Z (about 2 years ago)
- Last Synced: 2024-11-17T01:28:58.974Z (7 months ago)
- Topics: java, library, netlas, netlas-io, netlas-io-api, search, shodan
- Language: Java
- Homepage:
- Size: 252 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ip-search-engines - Netlas Java Library
README
# Netlas Java Library
[](https://github.com/michael2to3/netlas-java/blob/master/LICENSE)
[](https://GitHub.com/michael2to3/netlas-java/issues/)

[](https://app.codacy.com/gh/michael2to3/netlas-java/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
[](https://app.codacy.com/gh/michael2to3/netlas-java/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_coverage)
[](https://jitpack.io/#michael2to3/netlas-java)This Java library is designed to interact with the Netlas API, allowing you to easily search for certificates, domains, and WHOIS information. It requires an API key, and makes use of the following dependencies:
- [Gradle](https://gradle.org/) - for building and managing the project
- [JUnit Jupiter](https://junit.org/) - for unit testing
- [Fasterxml Jackson](https://fasterxml.github.io/jackson-databind/) - for JSON parsing
- [OkHttp3](https://square.github.io/okhttp/) - for making HTTP requests## Installation
To use this library, you'll need to add it as a dependency to your Gradle project. You can do this by adding the following to your `build.gradle` file:
```groovy
dependencies {
implementation 'com.michael2to3:netlas:VERSION'
}
```Replace `VERSION` with the desired version of the library.
## Usage
First, create an instance of the `Netlas` class with your API key and the base URL of the Netlas API.
```java
Netlas netlas = new Netlas("YOUR_API_KEY", "https://api.netlas.io");
```Once you have a `Netlas` instance, you can use its methods to search for information:
```java
// Search for certificate information
netlas.java.scheme.Response response = netlas.search("example.com", DataType.CERT, 1, null, null, false);// Search for domain information
netlas.java.scheme.Response response = netlas.search("example.com", DataType.DOMAIN, 1, null, null, false);// Search for WHOIS information for an IP address
netlas.java.scheme.Response response = netlas.search("8.8.8.8", DataType.WHOIS_IP, 1, null, null, false);// Search for WHOIS information for a domain
netlas.java.scheme.Response response = netlas.search("example.com", DataType.WHOIS_DOMAIN, 1, null, null, false);
```## Testing
This library includes unit tests using JUnit Jupiter. You can run the tests by executing the following Gradle command:
```bash
./gradlew test
```## Exceptions
This library throws a `NetlasRequestException` when an error occurs while sending an HTTP request. You should handle this exception appropriately in your code.
## License
This project is licensed under the License - see the [LICENSE](https://github.com/michael2to3/netlas-java/blob/master/LICENSE) file.