https://github.com/bfu4/greynoise4j
greynoise api in java but not that good but fun for learning (sort of)
https://github.com/bfu4/greynoise4j
Last synced: 6 months ago
JSON representation
greynoise api in java but not that good but fun for learning (sort of)
- Host: GitHub
- URL: https://github.com/bfu4/greynoise4j
- Owner: bfu4
- Created: 2022-04-01T18:30:02.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-04-07T23:17:52.000Z (over 3 years ago)
- Last Synced: 2024-11-17T01:29:00.430Z (12 months ago)
- Language: Java
- Homepage:
- Size: 127 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-ip-search-engines - GreyNoise4j
README
# greynoise4j
For the purpose of me trying to understand
the Greynoise API, I implemented it (kind of) in
Java (because I like Java's objects).
## Disclaimer
I don't have an enterprise api key so I have
***zero*** clue if any of those methods work.
## Building
Normally I host my libraries on some sort of repository.
Due to the nature of this project, I'm not, as of currently, deploying it to central.
```
$ mvn clean package
or
$ ./mvnw clean package
```
## Basic Usage
```java
// This creates a community client without an API key.
// However, an api key may be provided inside this method.
GreynoiseClient client = GreynoiseClient.community();
// Get the host information of the ip address 8.8.8.8, and when
// the promise resolves, print the data.
client.getHostInformation("8.8.8.8").onSuccess(System.out::println)
```
## Enterprise Usage
```java
// It is required that you have an API key to use the enterprise client.
// If the key is empty, the library will fail to create the client.
String apiKey = System.getenv("ENTERPRISE_KEY");
GreynoiseClient client = GreynoiseClient.enterprise(apiKey);
client.getQuickHostInformation("1.1.1.1", "8.8.8.8", ...);
```