How to Check if an IP Address is a Tor Exit Node Server using Java

<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.github.Cloudmersive</groupId>
<artifactId>Cloudmersive.APIClient.Java</artifactId>
<version>v4.25</version>
</dependency>
</dependencies>
// Import classes:
//import com.cloudmersive.client.invoker.ApiClient;
//import com.cloudmersive.client.invoker.ApiException;
//import com.cloudmersive.client.invoker.Configuration;
//import com.cloudmersive.client.invoker.auth.*;
//import com.cloudmersive.client.NetworkThreatDetectionApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();// Configure API key authorization: Apikey
ApiKeyAuth Apikey = (ApiKeyAuth) defaultClient.getAuthentication("Apikey");
Apikey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Apikey.setApiKeyPrefix("Token");
NetworkThreatDetectionApi apiInstance = new NetworkThreatDetectionApi();
String value = "value_example"; // String | IP address to check, e.g. \"55.55.55.55\". The input is a string so be sure to enclose it in double-quotes.
try {
ThreatDetectionTorNodeResponse result = apiInstance.networkThreatDetectionIsTorNode(value);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling NetworkThreatDetectionApi#networkThreatDetectionIsTorNode");
e.printStackTrace();
}

--

--

--

There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Fooling Windows about its internal CPU

Join Phala Network Telegram Reward. Chance to Win Over $500 by Following Easy Tasks!

React Native + CircleCI + Fastlane (Only Android)

The 2 main problems with hackathons

How to setup 3 node cluster in Apache Kafka

What is Reverse ETL?

BigQuery Federation with CloudSQL — Do’s & Don’ts

How to create a launcher for your application in Ubuntu?

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Cloudmersive

Cloudmersive

There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.

More from Medium

How to Create an Encrypted ZIP file to Quarantine a Dangerous File

Advanced Scan a File in SharePoint Online Site Drive using Java

How to Check a URL for Server-Side Request Forgery (SSRF) Threats in Java

Check If an IP Address is a Known Threat using Java