Skip to content

Commit

Permalink
Finished AJP plugin
Browse files Browse the repository at this point in the history
# Conflicts:
#	google/detectors/credentials/generic_weak_credential_detector/src/test/java/com/google/tsunami/plugins/detectors/credentials/genericweakcredentialdetector/testers/tomcat/TomcatAjpCredentialTesterTest.java
  • Loading branch information
RaulDoyensec committed Sep 5, 2024
1 parent b0949f1 commit c09c016
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ ext {
ajpVersion = '1.0.0'
okhttpVersion = '3.12.0'
protobufVersion = '3.25.2'
ajp13Version = '1.0.0'
tsunamiVersion = 'latest.release'

junitVersion = '4.13'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
<<<<<<< HEAD
import java.util.concurrent.ThreadLocalRandom;
=======
>>>>>>> 2014afe1 (Finished AJP plugin)
import javax.inject.Inject;
import org.junit.Before;
import org.junit.Test;
Expand Down Expand Up @@ -157,14 +160,21 @@ private static byte[] createAjpUnauthorizedResponse() {
private static class AjpTestServer {
private ServerSocket serverSocket;
private boolean running = false;
<<<<<<< HEAD
private int port;
=======
private final int port = 8009;
>>>>>>> 2014afe1 (Finished AJP plugin)
private final String host = "localhost";
private final Map<String, byte[]> credentialResponses = new HashMap<>();

public void start() throws IOException {
<<<<<<< HEAD

this.port = ThreadLocalRandom.current().nextInt(8000, 10001);

=======
>>>>>>> 2014afe1 (Finished AJP plugin)
serverSocket = new ServerSocket(port);
running = true;

Expand Down Expand Up @@ -192,6 +202,10 @@ public void start() throws IOException {
os.flush();

} catch (IOException e) {
<<<<<<< HEAD
=======
System.err.println("An error occurred in AjpTestServer.");
>>>>>>> 2014afe1 (Finished AJP plugin)
e.printStackTrace();
}
}
Expand Down

0 comments on commit c09c016

Please sign in to comment.