diff --git a/BruteForceDemo/src/BruteForceZIP.java b/BruteForceDemo/src/BruteForceZIP.java index 04126cd..12cb02e 100644 --- a/BruteForceDemo/src/BruteForceZIP.java +++ b/BruteForceDemo/src/BruteForceZIP.java @@ -74,6 +74,9 @@ public void bruteForceZIP(String zipPath, String passwordListPath) throws IOExce String path = BFD.class.getProtectionDomain().getCodeSource().getLocation().getPath(); String runPath = URLDecoder.decode(path, "UTF-8"); + if(runPath.toLowerCase().endsWith(".jar")) { + runPath = runPath.substring(0, runPath.lastIndexOf('.')); + } long start = System.currentTimeMillis(); jf.revalidate(); @@ -165,6 +168,7 @@ private boolean runCombinations(ArrayList possibleValues, String zipPath for (int index : indices) { pw+=possibleValues.get(index); } + lastPW = pw; c++; boolean res=false; diff --git a/BruteForceDemo/target/classes/secret.jpg b/BruteForceDemo/target/classes/secret.jpg index e69de29..59eb90a 100644 Binary files a/BruteForceDemo/target/classes/secret.jpg and b/BruteForceDemo/target/classes/secret.jpg differ