Projects STRLCPY LoggerPlusPlus Commits cf30670d
🤬
  • Remove hard Burp jar dependency for test class

  • Loading...
  • Corey committed 1 year ago
    cf30670d
    1 parent bf5c2aa1
  • ■ ■ ■ ■
    build.gradle
    skipped 26 lines
    27 27   implementation 'org.apache.commons:commons-text:1.10.0'
    28 28   implementation 'org.apache.logging.log4j:log4j-core:2.19.0'
    29 29   
    30  - testCompileOnly files("${System.properties['user.home']}/BurpSuitePro/burpsuite_pro.jar")
     30 + testRuntimeOnly files("${System.properties['user.home']}/BurpSuitePro/burpsuite_pro.jar")
    31 31  }
    32 32   
    33 33  jar {
    skipped 16 lines
  • ■ ■ ■ ■ ■
    src/test/java/Test.java
     1 +import java.lang.reflect.Method;
     2 + 
    1 3  public class Test {
    2 4   public static void main(String[] args) {
    3  - burp.StartBurp.main(args);
     5 + try {
     6 + Method main = Class.forName("burp.StartBurp").getMethod("main", String[].class);
     7 + main.invoke(null, (Object) args);
     8 + }catch (Exception e){
     9 + System.err.println("Cannot start burp. Check the burp jar is correctly included in the classpath.");
     10 + }
    4 11   }
    5 12  }
    6 13   
Please wait...
Page is in error, reload to recover