Added SSL verification bypass & port choice / Optimisation #4
2 Participants
Notifications
Due Date
No due date set.
Blocks
Reference: Stage/bug-bounty-reports#4
Reference in New Issue
Block a user
No description provided.
Delete Branch "dev"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
#2
@@ -2,18 +2,17 @@ package fr.motysten.usertwist.exploit.tools;public class Cesar {public static final String LOWER_ALPHABET = "abcdefghijklmnopqrstuvwxyz";For the Stream operations, here is what I have in mind
Do this hint unlock you ? If you need we can take some time to discuss streams in Java 21
@@ -0,0 +20,4 @@for (int i = 0; i < usersArray.length(); i++) {int finalI = i;new Thread(() -> {Suggestion 🤔
Since you are on Java 21, you could use virtual threads here, do you spot any differences in performance between threads and virtual threads ? Can you explain a bit the differences between the two ?
I'm sorry I can't get Virtual threads to work. They just won't start. And nothing happen with them. Here is what I tried :
Finally made it works (forgot
Thread.join()).The main difference between Threads and Virtual Threads is that the virtual ones are managed only by the JVM and don't need any call to the system kernel, which is more optimized. The also handle blocking operations more efficiently. When a virtual thread performs a blocking operation, it doesn't block the underlying OS thread. Instead, the runtime can efficiently manage the virtual threads, ensuring better CPU utilization.
As they are each not linked to a new OS thread, it is possible to create millions of virtual threads without significant performance degradation.
Thread,Runnable)@@ -0,0 +15,4 @@import java.util.Map;public class Request {Suggestion 🤔:
I think a better seperation of concerns can be applied here.
By using a constructor you could just build the client once (with or without SSL) and reuse it to make the get request.
@@ -0,0 +19,4 @@public static HttpResponse<String> get(String link, String port, String endpoint,JSONObject params, Map<String, String> headers, boolean insecure) throws NoSuchAlgorithmException, KeyManagementException, IOException, InterruptedException {HttpClient client = HttpClient.newHttpClient();if (insecure) {Suggestion 🤔:
I think this is not needed since you use a builder pattern. If not secure, juste build without the SSL Context ?
@@ -0,0 +1,43 @@package fr.motysten.usertwist.exploit.tools;I think this can be removed
Do you think it'll be better to juste create a new X509ExtendedTrustManager directly in the Request class ?
Added SSL verification bypass & port choiceto Added SSL verification bypass & port choice / Optimisationa1e1caff5dto86495716e5Pull request closed