diff --git a/src/com/sittinglittleduck/DirBuster/BaseCase.java b/src/com/sittinglittleduck/DirBuster/BaseCase.java index f204b97..870bbdb 100644 --- a/src/com/sittinglittleduck/DirBuster/BaseCase.java +++ b/src/com/sittinglittleduck/DirBuster/BaseCase.java @@ -33,7 +33,7 @@ public class BaseCase //The URL for which the base applies to, eg if we are testing within /wibble/, then this will be set to /wibble/ private URL baseCaseURL; - //http responce code for the base case + //http response code for the base case private int returnCode = 0; //store of the actual base case if required diff --git a/src/com/sittinglittleduck/DirBuster/CheckForUpdates.java b/src/com/sittinglittleduck/DirBuster/CheckForUpdates.java index c20953a..425768c 100644 --- a/src/com/sittinglittleduck/DirBuster/CheckForUpdates.java +++ b/src/com/sittinglittleduck/DirBuster/CheckForUpdates.java @@ -76,9 +76,9 @@ public void run() * query the site to find out is there any updates */ GetMethod httpget = new GetMethod(updateURL); - int responceCode = httpclient.executeMethod(httpget); + int responseCode = httpclient.executeMethod(httpget); - if(responceCode == 200) + if(responseCode == 200) { if(httpget.getResponseContentLength() > 0) { @@ -88,29 +88,29 @@ public void run() String line; - String responce = ""; + String response = ""; StringBuffer buf = new StringBuffer(); while((line = input.readLine()) != null) { buf.append("\r\n" + line); } - responce = buf.toString(); + response = buf.toString(); input.close(); - //System.out.println("Got a responce form the update server"); + //System.out.println("Got a response form the update server"); //System.out.println("-------------------------------------"); - //System.out.println(responce); + //System.out.println(response); //System.out.println("-------------------------------------"); /* - * extract the data from the responce + * extract the data from the response */ String versionRegex = ""; String changeLogRegex = "(.*?)"; Pattern regexFindFile = Pattern.compile(versionRegex); - Matcher m = regexFindFile.matcher(responce); + Matcher m = regexFindFile.matcher(response); if(m.find()) { @@ -134,7 +134,7 @@ public void run() */ Pattern regexFindChangeLog = Pattern.compile(changeLogRegex, Pattern.DOTALL); - m = regexFindChangeLog.matcher(responce); + m = regexFindChangeLog.matcher(response); if(m.find()) { diff --git a/src/com/sittinglittleduck/DirBuster/Config.java b/src/com/sittinglittleduck/DirBuster/Config.java index ebaeb66..f096fa6 100644 --- a/src/com/sittinglittleduck/DirBuster/Config.java +++ b/src/com/sittinglittleduck/DirBuster/Config.java @@ -91,7 +91,7 @@ public class Config * Fixed bug in advanced options, which caused proxy setting to always get set * Add an option to limit the number of requests/sec * Improved the way results table works - * Fixed a bug that caused responce to be displayed incorrectly + * Fixed a bug that caused response to be displayed incorrectly * Fixed bug that selection from the tables to now work correctly * Fixed bug that caused blank extentions to stop working at all! * @@ -143,7 +143,7 @@ public class Config * *0.9.6 *+ Dirbuster can now do file scanning with no extention. - *+ View responce now shows information about errors as well + *+ View response now shows information about errors as well *+ Removed all other imported source code, they will no be done via their own api's * *0.9.5 @@ -164,7 +164,7 @@ public class Config *0.9.2 *+ Corrected content checking mode when a 200 is returned for the 404 test, so it now works *+ minor changes to the interface - *+ now shows diff of basecase vs responce + *+ now shows diff of basecase vs response */ /** * Date the version was completed diff --git a/src/com/sittinglittleduck/DirBuster/FilterResponce.java b/src/com/sittinglittleduck/DirBuster/FilterResponce.java index e8149cc..46176b5 100644 --- a/src/com/sittinglittleduck/DirBuster/FilterResponce.java +++ b/src/com/sittinglittleduck/DirBuster/FilterResponce.java @@ -1,5 +1,5 @@ /* - * FilterResponce.java + * FilterResponse.java * * Created on 01 December 2005, 22:10 * @@ -26,44 +26,44 @@ /** - * Util class to normliaze http responces + * Util class to normliaze http responses */ -public class FilterResponce +public class FilterResponse { /** - * Creates a new instance of FilterResponce + * Creates a new instance of FilterResponse */ - public FilterResponce() + public FilterResponse() { } /** - * Clean the responce of a work unit + * Clean the response of a work unit * @param toclean String to clean * @param work Unit of work the toclean string refferes to - * @return Cleaned responce + * @return Cleaned response */ - public static String CleanResponce(String toclean, WorkUnit work) + public static String CleanResponse(String toclean, WorkUnit work) { - return CleanResponce(toclean, work.getWork(), work.getItemToCheck()); + return CleanResponse(toclean, work.getWork(), work.getItemToCheck()); } /** - * Clean the responce of a work based on a URL + * Clean the response of a work based on a URL * @param toclean String to clean * @param url URL that generated the reponce that is to be cleaned - * @return String of cleaned responce + * @return String of cleaned response */ - public static String CleanResponce(String toclean, URL url, String itemChecked) + public static String CleanResponse(String toclean, URL url, String itemChecked) { if(toclean != null) { if(!toclean.equals("")) { - //remove the firstline from the responce + //remove the firstline from the response //firstline = toclean. //remove date header diff --git a/src/com/sittinglittleduck/DirBuster/GenBaseCase.java b/src/com/sittinglittleduck/DirBuster/GenBaseCase.java index f38aba6..1305373 100644 --- a/src/com/sittinglittleduck/DirBuster/GenBaseCase.java +++ b/src/com/sittinglittleduck/DirBuster/GenBaseCase.java @@ -91,7 +91,7 @@ public static synchronized BaseCase genBaseCase(String url, boolean isDir, Strin BaseCase baseCase = null; int failcode = 0; String failString = Config.failCaseString; - String baseResponce = ""; + String baseResponse = ""; URL failurl = null; if(isDir) { @@ -144,7 +144,7 @@ public static synchronized BaseCase genBaseCase(String url, boolean isDir, Strin } httpget.setFollowRedirects(Config.followRedirects); - //save the http responce code for the base case + //save the http response code for the base case failcode = manager.getHttpclient().executeMethod(httpget); manager.workDone(); @@ -163,35 +163,35 @@ public static synchronized BaseCase genBaseCase(String url, boolean isDir, Strin { buf.append("\r\n" + tempLine); } - baseResponce = buf.toString(); + baseResponse = buf.toString(); input.close(); //HTMLparse.parseHTML(); - //HTMLparse htmlParse = new HTMLparse(baseResponce, null); + //HTMLparse htmlParse = new HTMLparse(baseResponse, null); //Thread parse = new Thread(htmlParse); //parse.start(); //clean up the base case, based on the basecase URL - baseResponce = FilterResponce.CleanResponce(baseResponce, failurl, failString); + baseResponse = FilterResponse.CleanResponse(baseResponse, failurl, failString); httpget.releaseConnection(); /* * get the base case twice more, for consisitency checking */ - String baseResponce1 = baseResponce; - String baseResponce2 = getBaseCaseAgain(failurl, failString); - String baseResponce3 = getBaseCaseAgain(failurl, failString); + String baseResponse1 = baseResponse; + String baseResponse2 = getBaseCaseAgain(failurl, failString); + String baseResponse3 = getBaseCaseAgain(failurl, failString); - if(baseResponce1 != null && baseResponce2 != null && baseResponce3 != null) + if(baseResponse1 != null && baseResponse2 != null && baseResponse3 != null) { /* - * check that all the responces are same, if they are do nothing if not enter the if statement + * check that all the responses are same, if they are do nothing if not enter the if statement */ - if(!baseResponce1.equalsIgnoreCase(baseResponce2) || !baseResponce1.equalsIgnoreCase(baseResponce3) || !baseResponce2.equalsIgnoreCase(baseResponce3)) + if(!baseResponse1.equalsIgnoreCase(baseResponse2) || !baseResponse1.equalsIgnoreCase(baseResponse3) || !baseResponse2.equalsIgnoreCase(baseResponse3)) { /* * if we dont have any regex saved @@ -211,7 +211,7 @@ public static synchronized BaseCase genBaseCase(String url, boolean isDir, Strin /* * show diaglog with the three responses, asking the user for a reg instead */ - JDialogInconsistentFailCodes dialog = new JDialogInconsistentFailCodes(manager.gui, true, baseResponce1, baseResponce2, baseResponce3, failurl.toString()); + JDialogInconsistentFailCodes dialog = new JDialogInconsistentFailCodes(manager.gui, true, baseResponse1, baseResponse2, baseResponse3, failurl.toString()); /* * get the returned regex */ @@ -245,9 +245,9 @@ public static synchronized BaseCase genBaseCase(String url, boolean isDir, Strin Pattern regexFindFile = Pattern.compile(failCaseRegexes.elementAt(a)); - Matcher m1 = regexFindFile.matcher(baseResponce1); - Matcher m2 = regexFindFile.matcher(baseResponce2); - Matcher m3 = regexFindFile.matcher(baseResponce3); + Matcher m1 = regexFindFile.matcher(baseResponse1); + Matcher m2 = regexFindFile.matcher(baseResponse2); + Matcher m3 = regexFindFile.matcher(baseResponse3); boolean test1 = m1.find(); boolean test2 = m2.find(); @@ -279,7 +279,7 @@ public static synchronized BaseCase genBaseCase(String url, boolean isDir, Strin * if we get here then we didn't get a match so show the dialog */ - JDialogInconsistentFailCodes dialog = new JDialogInconsistentFailCodes(manager.gui, true, baseResponce1, baseResponce2, baseResponce3, failurl.toString()); + JDialogInconsistentFailCodes dialog = new JDialogInconsistentFailCodes(manager.gui, true, baseResponse1, baseResponse2, baseResponse3, failurl.toString()); /* * get the returned regex */ @@ -301,7 +301,7 @@ public static synchronized BaseCase genBaseCase(String url, boolean isDir, Strin else { /* - * We have a big problem as now we have different responce codes for the same request + * We have a big problem as now we have different response codes for the same request * //TODO think of a way to deal with is */ } @@ -309,13 +309,13 @@ public static synchronized BaseCase genBaseCase(String url, boolean isDir, Strin if(Config.debug) { - System.out.println("DEBUG GenBaseCase: base case was set to :" + baseResponce); + System.out.println("DEBUG GenBaseCase: base case was set to :" + baseResponse); } } } httpget.releaseConnection(); - baseCase = new BaseCase(new URL(url), failcode, isDir, failurl, baseResponce, fileExtention, useRegexInstead, regex); + baseCase = new BaseCase(new URL(url), failcode, isDir, failurl, baseResponse, fileExtention, useRegexInstead, regex); //add the new base case to the manager list manager.addBaseCase(baseCase); @@ -333,7 +333,7 @@ public static BaseCase genURLFuzzBaseCase(String fuzzStart, String FuzzEnd) thro BaseCase baseCase = null; int failcode = 0; String failString = Config.failCaseString; - String baseResponce = ""; + String baseResponse = ""; /* * markers for using regex instead @@ -364,7 +364,7 @@ public static BaseCase genURLFuzzBaseCase(String fuzzStart, String FuzzEnd) thro } httpget.setFollowRedirects(Config.followRedirects); - //save the http responce code for the base case + //save the http response code for the base case failcode = manager.getHttpclient().executeMethod(httpget); manager.workDone(); @@ -382,16 +382,16 @@ public static BaseCase genURLFuzzBaseCase(String fuzzStart, String FuzzEnd) thro { buf.append("\r\n" + tempLine); } - baseResponce = buf.toString(); + baseResponse = buf.toString(); input.close(); //clean up the base case, based on the basecase URL - baseResponce = FilterResponce.CleanResponce(baseResponce, failurl, failString); + baseResponse = FilterResponse.CleanResponse(baseResponse, failurl, failString); if(Config.debug) { - System.out.println("DEBUG GenBaseCase: base case was set to :" + baseResponce); + System.out.println("DEBUG GenBaseCase: base case was set to :" + baseResponse); } } @@ -400,7 +400,7 @@ public static BaseCase genURLFuzzBaseCase(String fuzzStart, String FuzzEnd) thro /* * create the base case object */ - baseCase = new BaseCase(null, failcode, false, failurl, baseResponce, null, useRegexInstead, regex); + baseCase = new BaseCase(null, failcode, false, failurl, baseResponse, null, useRegexInstead, regex); return baseCase; } @@ -412,7 +412,7 @@ private static String getBaseCaseAgain(URL failurl, String failString) throws IO { int failcode; Manager manager = Manager.getInstance(); - String baseResponce = ""; + String baseResponse = ""; GetMethod httpget = new GetMethod(failurl.toString()); //set the custom HTTP headers @@ -435,7 +435,7 @@ private static String getBaseCaseAgain(URL failurl, String failString) throws IO } httpget.setFollowRedirects(Config.followRedirects); - //save the http responce code for the base case + //save the http response code for the base case failcode = manager.getHttpclient().executeMethod(httpget); manager.workDone(); @@ -454,29 +454,29 @@ private static String getBaseCaseAgain(URL failurl, String failString) throws IO { buf.append("\r\n" + tempLine); } - baseResponce = buf.toString(); + baseResponse = buf.toString(); input.close(); //HTMLparse.parseHTML(); - //HTMLparse htmlParse = new HTMLparse(baseResponce, null); + //HTMLparse htmlParse = new HTMLparse(baseResponse, null); //Thread parse = new Thread(htmlParse); //parse.start(); //clean up the base case, based on the basecase URL - baseResponce = FilterResponce.CleanResponce(baseResponce, failurl, failString); + baseResponse = FilterResponse.CleanResponse(baseResponse, failurl, failString); httpget.releaseConnection(); /* - * return the cleaned responce + * return the cleaned response */ - return baseResponce; + return baseResponse; } else { /* - * we have a big problem here as the server has returned an other responce code, for the same request + * we have a big problem here as the server has returned an other response code, for the same request * TODO: think of a way to deal with this! */ return null; diff --git a/src/com/sittinglittleduck/DirBuster/Result.java b/src/com/sittinglittleduck/DirBuster/Result.java index c5206a3..76da16a 100644 --- a/src/com/sittinglittleduck/DirBuster/Result.java +++ b/src/com/sittinglittleduck/DirBuster/Result.java @@ -18,17 +18,17 @@ public class Result private int type = -1; private URL itemFound; - private int responceCode = 0; + private int responseCode = 0; private String responseHeader = ""; private String responseBody = ""; private BaseCase baseCaseObj = null; - public Result(int type, URL itemFound, int responceCode, String responceHeader, String responseBody, BaseCase baseCaseObj) + public Result(int type, URL itemFound, int responseCode, String responseHeader, String responseBody, BaseCase baseCaseObj) { this.type = type; this.itemFound = itemFound; - this.responceCode = responceCode; - this.responseHeader = responceHeader; + this.responseCode = responseCode; + this.responseHeader = responseHeader; this.responseBody = responseBody; this.baseCaseObj = baseCaseObj; } @@ -53,9 +53,9 @@ public String getResponseHeader() return responseHeader; } - public int getResponceCode() + public int getResponseCode() { - return responceCode; + return responseCode; } public int getType() diff --git a/src/com/sittinglittleduck/DirBuster/Start.java b/src/com/sittinglittleduck/DirBuster/Start.java index 7afc207..1d24349 100644 --- a/src/com/sittinglittleduck/DirBuster/Start.java +++ b/src/com/sittinglittleduck/DirBuster/Start.java @@ -162,7 +162,7 @@ public void run() /* - * headless mode, run with out the gui + * headless mode, run without the gui */ case 'H': headless = true; diff --git a/src/com/sittinglittleduck/DirBuster/Worker.java b/src/com/sittinglittleduck/DirBuster/Worker.java index 8223421..e3ef142 100644 --- a/src/com/sittinglittleduck/DirBuster/Worker.java +++ b/src/com/sittinglittleduck/DirBuster/Worker.java @@ -124,8 +124,8 @@ public void run() url = work.getWork(); int code = 0; - String responce = ""; - String rawResponce = ""; + String response = ""; + String rawResponse = ""; String responseHeader = ""; String responseBody = ""; @@ -243,7 +243,7 @@ else if(work.getMethod().equalsIgnoreCase("GET")) //set up the input stream BufferedReader input = new BufferedReader(new InputStreamReader(httpget.getResponseBodyAsStream())); - //save the headers into a string, used in viewing raw responce + //save the headers into a string, used in viewing raw response String rawHeader; rawHeader = httpget.getStatusLine() + "\r\n"; Header headers[] = httpget.getResponseHeaders(); @@ -259,20 +259,20 @@ else if(work.getMethod().equalsIgnoreCase("GET")) responseHeader = rawHeader; buf = new StringBuffer(); - //read in the responce body + //read in the response body String line; while((line = input.readLine()) != null) { buf.append("\r\n" + line); } - responce = buf.toString(); + response = buf.toString(); - responseBody = responce; + responseBody = response; input.close(); - rawResponce = rawHeader + responce; - //clean the responce + rawResponse = rawHeader + response; + //clean the response //parse the html of what we have found @@ -284,12 +284,12 @@ else if(work.getMethod().equalsIgnoreCase("GET")) { if(contentType.getValue().startsWith("text")) { - manager.addHTMLToParseQueue(new HTMLparseWorkUnit(responce, work)); + manager.addHTMLToParseQueue(new HTMLparseWorkUnit(response, work)); } } } - responce = FilterResponce.CleanResponce(responce, work); + response = FilterResponse.CleanResponse(response, work); Thread.sleep(10); httpget.releaseConnection(); @@ -313,19 +313,19 @@ else if(work.getMethod().equalsIgnoreCase("GET")) //TODO move this option to the Adv options - //if the responce does not match the base case + //if the response does not match the base case Pattern regexFindFile = Pattern.compile(".*file not found.*", Pattern.CASE_INSENSITIVE); - Matcher m = regexFindFile.matcher(responce); + Matcher m = regexFindFile.matcher(response); //need to clean the base case of the item we are looking for - String basecase = FilterResponce.removeItemCheckedFor(work.getBaseCaseObj().getBaseCase(), work.getItemToCheck()); + String basecase = FilterResponse.removeItemCheckedFor(work.getBaseCaseObj().getBaseCase(), work.getItemToCheck()); if(m.find()) { //do nothing as we have a 404 } - else if(!responce.equalsIgnoreCase(basecase)) + else if(!response.equalsIgnoreCase(basecase)) { if(work.isDir()) { @@ -371,7 +371,7 @@ else if(code == 404 || code == 400) } manager.foundFile(url, code, responseHeader, responseBody, work.getBaseCaseObj()); } - //manager.foundError(url, "Base Case Mode Error - Responce code came back as " + code + " it should have been 200"); + //manager.foundError(url, "Base Case Mode Error - Response code came back as " + code + " it should have been 200"); //manager.workDone(); } } @@ -382,12 +382,12 @@ else if(work.getBaseCaseObj().isUseRegexInstead()) { Pattern regexFindFile = Pattern.compile(work.getBaseCaseObj().getRegex()); - Matcher m = regexFindFile.matcher(rawResponce); + Matcher m = regexFindFile.matcher(rawResponse); /* System.out.println("======Trying to find======"); System.out.println(work.getBaseCaseObj().getRegex()); System.out.println("======In======"); - System.out.println(responce); + System.out.println(response); System.out.println("======/In======"); */ if(m.find()) @@ -410,7 +410,7 @@ else if(work.getBaseCaseObj().isUseRegexInstead()) { if(contentType.getValue().startsWith("text")) { - manager.addHTMLToParseQueue(new HTMLparseWorkUnit(rawResponce, work)); + manager.addHTMLToParseQueue(new HTMLparseWorkUnit(rawResponse, work)); } } } @@ -432,13 +432,13 @@ else if(work.getBaseCaseObj().isUseRegexInstead()) } manager.foundFile(url, code, responseHeader, responseBody, work.getBaseCaseObj()); } - //manager.foundError(url, "Base Case Mode Error - Responce code came back as " + code + " it should have been 200"); + //manager.foundError(url, "Base Case Mode Error - Response code came back as " + code + " it should have been 200"); //manager.workDone(); } } - //just check the responce code + //just check the response code else { //if is not the fail code, a 404 or a 400 then we have a possible @@ -448,9 +448,9 @@ else if(work.getBaseCaseObj().isUseRegexInstead()) { if(Config.debug) { - System.out.println("DEBUG Worker[" + threadId + "]: Getting responce via GET " + url.toString()); + System.out.println("DEBUG Worker[" + threadId + "]: Getting response via GET " + url.toString()); } - rawResponce = ""; + rawResponse = ""; httpget = new GetMethod(url.toString()); Vector HTTPheaders = manager.getHTTPHeaders(); @@ -484,9 +484,9 @@ else if(work.getBaseCaseObj().isUseRegexInstead()) responseBody = ""; responseHeader = ""; - rawResponce = ""; + rawResponse = ""; //build a string version of the headers - rawResponce = httpget.getStatusLine() + "\r\n"; + rawResponse = httpget.getStatusLine() + "\r\n"; Header headers[] = httpget.getResponseHeaders(); StringBuffer buf = new StringBuffer(); @@ -497,9 +497,9 @@ else if(work.getBaseCaseObj().isUseRegexInstead()) buf.append("\r\n"); - rawResponce = rawResponce + buf.toString(); + rawResponse = rawResponse + buf.toString(); - responseHeader = rawResponce; + responseHeader = rawResponse; if(httpget.getResponseContentLength() > 0) { @@ -509,20 +509,20 @@ else if(work.getBaseCaseObj().isUseRegexInstead()) String line; - String tempResponce = ""; + String tempResponse = ""; buf = new StringBuffer(); while((line = input.readLine()) != null) { buf.append("\r\n" + line); } - tempResponce = buf.toString(); + tempResponse = buf.toString(); - responseBody = tempResponce; + responseBody = tempResponse; input.close(); - rawResponce = rawResponce + tempResponce; + rawResponse = rawResponse + tempResponse; Header contentType = httpget.getResponseHeader("Content-Type"); @@ -535,7 +535,7 @@ else if(work.getBaseCaseObj().isUseRegexInstead()) { if(contentType.getValue().startsWith("text")) { - manager.addHTMLToParseQueue(new HTMLparseWorkUnit(tempResponce, work)); + manager.addHTMLToParseQueue(new HTMLparseWorkUnit(tempResponse, work)); } } } diff --git a/src/com/sittinglittleduck/DirBuster/gui/JDialogAdvSetup.java b/src/com/sittinglittleduck/DirBuster/gui/JDialogAdvSetup.java index f876a79..fd33e4b 100644 --- a/src/com/sittinglittleduck/DirBuster/gui/JDialogAdvSetup.java +++ b/src/com/sittinglittleduck/DirBuster/gui/JDialogAdvSetup.java @@ -1022,7 +1022,7 @@ private void jButtonOkActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST } /* - * read the setting for limiting responces + * read the setting for limiting responses */ manager.setLimitRequests(jCheckBoxLimitReqSec.isSelected()); //TODO add error handling diff --git a/src/com/sittinglittleduck/DirBuster/gui/JDialogInconsistentFailCodes.form b/src/com/sittinglittleduck/DirBuster/gui/JDialogInconsistentFailCodes.form index f14ae6d..29b3b5c 100644 --- a/src/com/sittinglittleduck/DirBuster/gui/JDialogInconsistentFailCodes.form +++ b/src/com/sittinglittleduck/DirBuster/gui/JDialogInconsistentFailCodes.form @@ -227,12 +227,12 @@ - + - + @@ -244,7 +244,7 @@ - + diff --git a/src/com/sittinglittleduck/DirBuster/gui/JDialogInconsistentFailCodes.java b/src/com/sittinglittleduck/DirBuster/gui/JDialogInconsistentFailCodes.java index ca8d471..5f4c4a1 100644 --- a/src/com/sittinglittleduck/DirBuster/gui/JDialogInconsistentFailCodes.java +++ b/src/com/sittinglittleduck/DirBuster/gui/JDialogInconsistentFailCodes.java @@ -39,12 +39,12 @@ public class JDialogInconsistentFailCodes extends javax.swing.JDialog private String url; /** Creates new form JDialogInconsistentFailCodes */ - public JDialogInconsistentFailCodes(java.awt.Frame parent, boolean modal, String response1, String responce2, String responce3, String url) + public JDialogInconsistentFailCodes(java.awt.Frame parent, boolean modal, String response1, String response2, String response3, String url) { super(parent, modal); this.response1 = response1; - this.response2 = responce2; - this.response3 = responce3; + this.response2 = response2; + this.response3 = response3; this.url = url; initComponents(); @@ -54,12 +54,12 @@ public JDialogInconsistentFailCodes(java.awt.Frame parent, boolean modal, String jTextAreaResponse1.setCaretPosition(0); jTextAreaResponse2.setText(response2); jTextAreaResponse2.setCaretPosition(0); - jTextAreaRsponce3.setText(responce3); + jTextAreaRsponce3.setText(response3); jTextAreaRsponce3.setCaretPosition(0); String temp1a[] = response1.split("\r?\n"); - String temp2a[] = responce2.split("\r?\n"); - String temp3a[] = responce3.split("\r?\n"); + String temp2a[] = response2.split("\r?\n"); + String temp3a[] = response3.split("\r?\n"); Diff d1 = new Diff(temp1a, temp2a); Diff d2 = new Diff(temp1a, temp3a); @@ -170,13 +170,13 @@ private void initComponents() { jLabelFailURL.setText("url"); - jLabel4.setText("Please examine the responce returned, and enter a regular expression that will match on all 3 of the attemps."); + jLabel4.setText("Please examine the response returned, and enter a regular expression that will match on all 3 of the attemps."); - jLabel5.setText("The reglar expression will then be used to determine if the dir/files does or does not exist."); + jLabel5.setText("The regular expression will then be used to determine if the dir/files does or does not exist."); jLabel6.setText("Regex to match a fail:"); - jLabel7.setText("With out this DirBuster will return a large number of false positives."); + jLabel7.setText("Without this DirBuster will return a large number of false positives."); jButtonCancel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/sittinglittleduck/DirBuster/gui/icons/fileclose.png"))); // NOI18N jButtonCancel.setText("Cancel"); @@ -346,8 +346,8 @@ private void jButtonOkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIR this, "Test results\n" + "response 1: " + result1 + "\n" + - "responce 2: " + result2 + "\n" + - "responce 3: " + result3 + "\n" + + "response 2: " + result2 + "\n" + + "response 3: " + result3 + "\n" + "Your regex does not work all the responses returned, please try again.", "Error", JOptionPane.ERROR_MESSAGE); @@ -404,8 +404,8 @@ private void jButtonTestActionPerformed(java.awt.event.ActionEvent evt) {//GEN-F this, "Test results\n" + "response 1: Pass\n" + - "responce 2: Pass\n" + - "responce 3: Pass\n" + + "response 2: Pass\n" + + "response 3: Pass\n" + "This regex should work", "Regex Matches", JOptionPane.INFORMATION_MESSAGE); @@ -436,8 +436,8 @@ private void jButtonTestActionPerformed(java.awt.event.ActionEvent evt) {//GEN-F this, "Test results\n" + "response 1: " + result1 + "\n" + - "responce 2: " + result2 + "\n" + - "responce 3: " + result3 + "\n" + + "response 2: " + result2 + "\n" + + "response 3: " + result3 + "\n" + "Your regex does not work all the responses returned, please try again.", "Error", JOptionPane.ERROR_MESSAGE); diff --git a/src/com/sittinglittleduck/DirBuster/gui/JDialogViewResponse.form b/src/com/sittinglittleduck/DirBuster/gui/JDialogViewResponse.form index 0354a35..1a09771 100644 --- a/src/com/sittinglittleduck/DirBuster/gui/JDialogViewResponse.form +++ b/src/com/sittinglittleduck/DirBuster/gui/JDialogViewResponse.form @@ -88,7 +88,7 @@ - + @@ -143,7 +143,7 @@ - + @@ -151,7 +151,7 @@ - + @@ -209,7 +209,7 @@ - + diff --git a/src/com/sittinglittleduck/DirBuster/gui/JDialogViewResponse.java b/src/com/sittinglittleduck/DirBuster/gui/JDialogViewResponse.java index c375d7e..b077758 100644 --- a/src/com/sittinglittleduck/DirBuster/gui/JDialogViewResponse.java +++ b/src/com/sittinglittleduck/DirBuster/gui/JDialogViewResponse.java @@ -1,5 +1,5 @@ /* - * JDialogViewResponce.java + * JDialogViewResponse.java * * Created on 30 June 2006, 21:40 * @@ -37,19 +37,19 @@ public class JDialogViewResponse extends javax.swing.JDialog { private BaseCase baseCaseObj; - /** Creates new form JDialogViewResponce */ + /** Creates new form JDialogViewResponse */ public JDialogViewResponse(java.awt.Frame parent, boolean modal, Result result) { super(parent, modal); initComponents(); this.setTitle("DirBuster " + Config.version + " View Response"); - this.jTextAreaResponce.setText(result.getResponseHeader() + result.getResponseBody()); - jTextAreaResponce.setCaretPosition(0); + this.jTextAreaResponse.setText(result.getResponseHeader() + result.getResponseBody()); + jTextAreaResponse.setCaretPosition(0); this.baseCaseObj = result.getBaseCaseObj(); //System.out.println("View Dialog"); - //System.out.println(Responce); - this.jLabelURL.setText("Responce for " + result.getItemFound().toString()); + //System.out.println(Response); + this.jLabelURL.setText("Response for " + result.getItemFound().toString()); if(result.getBaseCaseObj().getBaseCase() == null) { jTabbedPane1.setEnabledAt(2, false); @@ -59,8 +59,8 @@ public JDialogViewResponse(java.awt.Frame parent, boolean modal, Result result) { jTabbedPane1.setEnabledAt(2, true); jTabbedPane1.setEnabledAt(3, true); - jTextAreaResponceCompear.setText(result.getResponseBody()); - jTextAreaResponceCompear.setCaretPosition(0); + jTextAreaResponseCompear.setText(result.getResponseBody()); + jTextAreaResponseCompear.setCaretPosition(0); jTextAreaBaseCompear.setText(baseCaseObj.getBaseCase()); jTextAreaBaseCompear.setCaretPosition(0); @@ -84,7 +84,7 @@ public JDialogViewResponse(java.awt.Frame parent, boolean modal, Result result) if(baseCaseObj != null) { jLabelBaseCaseURL.setText(baseCaseObj.getBaseCaseRequestURL().toString()); - jLabelHTTPResponceCode.setText(String.valueOf(baseCaseObj.getFailCode())); + jLabelHTTPResponseCode.setText(String.valueOf(baseCaseObj.getFailCode())); } //this.jScrollPane1.setViewport(null); @@ -103,16 +103,16 @@ private void initComponents() { jButtonClose = new javax.swing.JButton(); jTabbedPane1 = new javax.swing.JTabbedPane(); jScrollPane1 = new javax.swing.JScrollPane(); - jTextAreaResponce = new javax.swing.JTextArea(); + jTextAreaResponse = new javax.swing.JTextArea(); jPanelBaseCase = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabelBaseCaseURL = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); - jLabelHTTPResponceCode = new javax.swing.JLabel(); + jLabelHTTPResponseCode = new javax.swing.JLabel(); jButton1 = new javax.swing.JButton(); jSplitPane1 = new javax.swing.JSplitPane(); jScrollPane2 = new javax.swing.JScrollPane(); - jTextAreaResponceCompear = new javax.swing.JTextArea(); + jTextAreaResponseCompear = new javax.swing.JTextArea(); jScrollPane3 = new javax.swing.JScrollPane(); jTextAreaBaseCompear = new javax.swing.JTextArea(); jScrollPaneDiff = new javax.swing.JScrollPane(); @@ -132,10 +132,10 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { jTabbedPane1.setFont(new java.awt.Font("Arial", 0, 12)); - jTextAreaResponce.setColumns(20); - jTextAreaResponce.setFont(new java.awt.Font("Arial", 0, 12)); - jTextAreaResponce.setRows(5); - jScrollPane1.setViewportView(jTextAreaResponce); + jTextAreaResponse.setColumns(20); + jTextAreaResponse.setFont(new java.awt.Font("Arial", 0, 12)); + jTextAreaResponse.setRows(5); + jScrollPane1.setViewportView(jTextAreaResponse); jTabbedPane1.addTab("Raw Response", jScrollPane1); @@ -152,14 +152,14 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { jLabelBaseCaseURL.setBounds(10, 40, 570, 14); jLabel2.setFont(new java.awt.Font("Arial", 1, 11)); - jLabel2.setText("HTTP Responce Code For Base Case: "); + jLabel2.setText("HTTP Response Code For Base Case: "); jPanelBaseCase.add(jLabel2); jLabel2.setBounds(10, 70, 220, 14); - jLabelHTTPResponceCode.setFont(new java.awt.Font("Arial", 0, 11)); - jLabelHTTPResponceCode.setText("No Information"); - jPanelBaseCase.add(jLabelHTTPResponceCode); - jLabelHTTPResponceCode.setBounds(220, 70, 200, 14); + jLabelHTTPResponseCode.setFont(new java.awt.Font("Arial", 0, 11)); + jLabelHTTPResponseCode.setText("No Information"); + jPanelBaseCase.add(jLabelHTTPResponseCode); + jLabelHTTPResponseCode.setBounds(220, 70, 200, 14); jButton1.setFont(new java.awt.Font("Arial", 0, 11)); jButton1.setText("View In Browser"); @@ -176,10 +176,10 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { jSplitPane1.setDividerLocation(300); jSplitPane1.setDividerSize(2); - jTextAreaResponceCompear.setColumns(20); - jTextAreaResponceCompear.setFont(new java.awt.Font("Arial", 0, 12)); - jTextAreaResponceCompear.setRows(5); - jScrollPane2.setViewportView(jTextAreaResponceCompear); + jTextAreaResponseCompear.setColumns(20); + jTextAreaResponseCompear.setFont(new java.awt.Font("Arial", 0, 12)); + jTextAreaResponseCompear.setRows(5); + jScrollPane2.setViewportView(jTextAreaResponseCompear); jSplitPane1.setLeftComponent(jScrollPane2); @@ -255,7 +255,7 @@ private void jButtonCloseActionPerformed(java.awt.event.ActionEvent evt)//GEN-FI private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabelBaseCaseURL; - private javax.swing.JLabel jLabelHTTPResponceCode; + private javax.swing.JLabel jLabelHTTPResponseCode; private javax.swing.JLabel jLabelURL; private javax.swing.JPanel jPanelBaseCase; private javax.swing.JScrollPane jScrollPane1; @@ -265,8 +265,8 @@ private void jButtonCloseActionPerformed(java.awt.event.ActionEvent evt)//GEN-FI private javax.swing.JSplitPane jSplitPane1; private javax.swing.JTabbedPane jTabbedPane1; private javax.swing.JTextArea jTextAreaBaseCompear; - private javax.swing.JTextArea jTextAreaResponce; - private javax.swing.JTextArea jTextAreaResponceCompear; + private javax.swing.JTextArea jTextAreaResponse; + private javax.swing.JTextArea jTextAreaResponseCompear; private javax.swing.JTextPane jTextPaneDiff; // End of variables declaration//GEN-END:variables diff --git a/src/com/sittinglittleduck/DirBuster/gui/JPanelRunning.java b/src/com/sittinglittleduck/DirBuster/gui/JPanelRunning.java index 396b0e6..e181f6b 100644 --- a/src/com/sittinglittleduck/DirBuster/gui/JPanelRunning.java +++ b/src/com/sittinglittleduck/DirBuster/gui/JPanelRunning.java @@ -784,19 +784,19 @@ private void jMenuItemViewResponseActionPerformed(java.awt.event.ActionEvent evt Result item = node.getResult(); /* - new JDialogViewResponce(parent, true, - resultsTableModel.getRowResponce(select), + new JDialogViewResponse(parent, true, + resultsTableModel.getRowResponse(select), resultsTableModel.getSelectedURL(select), resultsTableModel.getBaseCase(select), - resultsTableModel.getRowRawResponce(select), + resultsTableModel.getRowRawResponse(select), resultsTableModel.getBaseCaseObj(select)).setVisible(true); */ /* new JDialogViewResponse(parent, true, item.getFullURL(), - item.getResponce(), + item.getResponse(), item.getBaseCase(), - item.getRawResponce(), + item.getRawResponse(), item.getBaseCaseObj()).setVisible(true); */ }//GEN-LAST:event_jMenuItemViewResponseActionPerformed diff --git a/src/com/sittinglittleduck/DirBuster/gui/tableModels/ResultsTableModel.java b/src/com/sittinglittleduck/DirBuster/gui/tableModels/ResultsTableModel.java index 2cfc7e8..d15a64c 100644 --- a/src/com/sittinglittleduck/DirBuster/gui/tableModels/ResultsTableModel.java +++ b/src/com/sittinglittleduck/DirBuster/gui/tableModels/ResultsTableModel.java @@ -178,7 +178,7 @@ else if (col==1) } else if (col==2) { - return data.get(row).getResponceCode(); + return data.get(row).getResponseCode(); } else if(col == 3) { @@ -202,7 +202,7 @@ public String getRowData(int row) return temp.getFieldType() + temp.getFieldFound(); } - public String getRowResponceCode(int row) + public String getRowResponseCode(int row) { if ( row < 0 || row >= data.size() ) return null; ResultsTableObject temp = (ResultsTableObject) data.get(row); @@ -213,17 +213,17 @@ public String getRowResponse(int row) { if ( row < 0 || row >= data.size() ) return null; ResultsTableObject temp = (ResultsTableObject) data.get(row); - //System.out.println("Getting Responce for row: " + row); - //System.out.println("Responce = " + temp.getResponce()); - return temp.getResponce(); + //System.out.println("Getting Response for row: " + row); + //System.out.println("Response = " + temp.getResponse()); + return temp.getResponse(); } public DirToCheck getDirToCheck(int row) { if ( row < 0 || row >= data.size() ) return null; ResultsTableObject temp = (ResultsTableObject) data.get(row); - //System.out.println("Getting Responce for row: " + row); - //System.out.println("Responce = " + temp.getResponce()); + //System.out.println("Getting Response for row: " + row); + //System.out.println("Response = " + temp.getResponse()); return temp.getDirToCheck(); } @@ -231,17 +231,17 @@ public String getRowRawResponse(int row) { if ( row < 0 || row >= data.size() ) return null; ResultsTableObject temp = (ResultsTableObject) data.get(row); - //System.out.println("Getting Responce for row: " + row); - //System.out.println("Responce = " + temp.getResponce()); - return temp.getRawResponce(); + //System.out.println("Getting Response for row: " + row); + //System.out.println("Response = " + temp.getResponse()); + return temp.getRawResponse(); } public String getBaseCase(int row) { if ( row < 0 || row >= data.size() ) return null; ResultsTableObject temp = (ResultsTableObject) data.get(row); - //System.out.println("Getting Responce for row: " + row); - //System.out.println("Responce = " + temp.getResponce()); + //System.out.println("Getting Response for row: " + row); + //System.out.println("Response = " + temp.getResponse()); return temp.getBaseCase(); } diff --git a/src/com/sittinglittleduck/DirBuster/gui/tree/ResultsNode.java b/src/com/sittinglittleduck/DirBuster/gui/tree/ResultsNode.java index 0cc6ffa..0e603e7 100644 --- a/src/com/sittinglittleduck/DirBuster/gui/tree/ResultsNode.java +++ b/src/com/sittinglittleduck/DirBuster/gui/tree/ResultsNode.java @@ -91,7 +91,7 @@ public String toString() { string = covertData(new URL(result.getItemFound().toString())); - //return result.getFieldFound() + " | " + result.getFieldResponceCode(); + //return result.getFieldFound() + " | " + result.getFieldResponseCode(); } catch (MalformedURLException ex) { diff --git a/src/com/sittinglittleduck/DirBuster/gui/tree/ResultsTableTreeModel.java b/src/com/sittinglittleduck/DirBuster/gui/tree/ResultsTableTreeModel.java index 2278df2..adaa0a5 100644 --- a/src/com/sittinglittleduck/DirBuster/gui/tree/ResultsTableTreeModel.java +++ b/src/com/sittinglittleduck/DirBuster/gui/tree/ResultsTableTreeModel.java @@ -116,7 +116,7 @@ public Object getValueAt(Object node, int col) } else { - return resultsNode.result.getResponceCode(); + return resultsNode.result.getResponseCode(); } } else diff --git a/src/com/sittinglittleduck/DirBuster/help/helpTOC.xml b/src/com/sittinglittleduck/DirBuster/help/helpTOC.xml index d7128fa..69c3d05 100644 --- a/src/com/sittinglittleduck/DirBuster/help/helpTOC.xml +++ b/src/com/sittinglittleduck/DirBuster/help/helpTOC.xml @@ -34,7 +34,7 @@ - + diff --git a/src/com/sittinglittleduck/DirBuster/report/ReportWriter.java b/src/com/sittinglittleduck/DirBuster/report/ReportWriter.java index 7f6ffd5..2e7e234 100644 --- a/src/com/sittinglittleduck/DirBuster/report/ReportWriter.java +++ b/src/com/sittinglittleduck/DirBuster/report/ReportWriter.java @@ -80,20 +80,20 @@ else if(data.elementAt(a).getType() == Result.DIR) } - //get responce codes for dirs + //get response codes for dirs for(int b = 0; b < dirs.size(); b ++) { - Integer code = new Integer(dirs.elementAt(b).getResponceCode()); + Integer code = new Integer(dirs.elementAt(b).getResponseCode()); if( ! dirCodes.contains(code)) { dirCodes.addElement(code); } } - //get responce codes for files + //get response codes for files for(int b = 0; b < files.size(); b ++) { - Integer code = new Integer(files.elementAt(b).getResponceCode()); + Integer code = new Integer(files.elementAt(b).getResponseCode()); if( ! fileCodes.contains(code)) { fileCodes.addElement(code); @@ -124,7 +124,7 @@ else if(data.elementAt(a).getType() == Result.DIR) out.newLine(); for(int b = 0; b < dirs.size(); b ++) { - if(code == dirs.elementAt(b).getResponceCode() ) + if(code == dirs.elementAt(b).getResponseCode() ) { out.write(dirs.elementAt(b).getItemFound().getPath()); out.newLine(); @@ -149,12 +149,12 @@ else if(data.elementAt(a).getType() == Result.DIR) for(int a = 0; a < fileCodes.size(); a ++) { int code = ((Integer) fileCodes.elementAt(a)).intValue(); - out.write("Files found with a " + code + " responce:"); + out.write("Files found with a " + code + " response:"); out.newLine(); out.newLine(); for(int b = 0; b < files.size(); b ++) { - if(code == files.elementAt(b).getResponceCode() ) + if(code == files.elementAt(b).getResponseCode() ) { out.write(files.elementAt(b).getItemFound().getPath()); out.newLine(); @@ -331,7 +331,7 @@ else if(data.elementAt(a).getType() == Result.FILE) type = "File"; } - out.write(""); + out.write(""); out.newLine(); } @@ -378,7 +378,7 @@ public void writeCSV() */ for(int a = 0; a < data.size(); a++) { - out.write("\"" + data.elementAt(a).getItemFound().getPath() + "\",\"" + data.elementAt(a).getResponceCode() + "\",\"" + (data.elementAt(a).getResponseHeader() + data.elementAt(a).getResponseBody()).length() + "\""); + out.write("\"" + data.elementAt(a).getItemFound().getPath() + "\",\"" + data.elementAt(a).getResponseCode() + "\",\"" + (data.elementAt(a).getResponseHeader() + data.elementAt(a).getResponseBody()).length() + "\""); out.newLine(); } } diff --git a/src/com/sittinglittleduck/DirBuster/utils/HeadRequestCheck.java b/src/com/sittinglittleduck/DirBuster/utils/HeadRequestCheck.java index 0182b77..34920fb 100644 --- a/src/com/sittinglittleduck/DirBuster/utils/HeadRequestCheck.java +++ b/src/com/sittinglittleduck/DirBuster/utils/HeadRequestCheck.java @@ -59,12 +59,12 @@ public static void test(String url) HTTPHeader httpHeader = (HTTPHeader) HTTPheaders.elementAt(a); httphead.setRequestHeader(httpHeader.getHeader(), httpHeader.getValue()); } - int responceCode = httpclient.executeMethod(httphead); + int responseCode = httpclient.executeMethod(httphead); /* - * if the responce code is method not implemented or fails + * if the response code is method not implemented or fails */ - if(responceCode == 501 || responceCode == 400) + if(responseCode == 501 || responseCode == 400) { //switch the mode to just GET requests manager.setAuto(false); diff --git a/src/com/sittinglittleduck/DirBuster/workGenerators/BruteForceWorkGenerator.java b/src/com/sittinglittleduck/DirBuster/workGenerators/BruteForceWorkGenerator.java index 9fd7418..02f7355 100644 --- a/src/com/sittinglittleduck/DirBuster/workGenerators/BruteForceWorkGenerator.java +++ b/src/com/sittinglittleduck/DirBuster/workGenerators/BruteForceWorkGenerator.java @@ -104,10 +104,10 @@ public void run() HTTPHeader httpHeader = (HTTPHeader) HTTPheaders.elementAt(a); httphead.setRequestHeader(httpHeader.getHeader(), httpHeader.getValue()); } - int responceCode = httpclient.executeMethod(httphead); + int responseCode = httpclient.executeMethod(httphead); - //if the responce code is method not implemented or fails - if(responceCode == 501 || responceCode == 400) + //if the response code is method not implemented or fails + if(responseCode == 501 || responseCode == 400) { //switch the mode to just GET requests manager.setAuto(false); @@ -156,7 +156,7 @@ public void run() try { manager.setStatus("Getting fail case for " + currentDir); - //get fail responce code for a dir test + //get fail response code for a dir test baseCaseObj = GenBaseCase.genBaseCase(firstPart + currentDir, true, null); diff --git a/src/com/sittinglittleduck/DirBuster/workGenerators/WorkerGenerator.java b/src/com/sittinglittleduck/DirBuster/workGenerators/WorkerGenerator.java index b31028a..1ba692b 100644 --- a/src/com/sittinglittleduck/DirBuster/workGenerators/WorkerGenerator.java +++ b/src/com/sittinglittleduck/DirBuster/workGenerators/WorkerGenerator.java @@ -142,15 +142,15 @@ public void run() } httphead.setFollowRedirects(Config.followRedirects); - int responceCode = httpclient.executeMethod(httphead); + int responseCode = httpclient.executeMethod(httphead); if(Config.debug) { - System.out.println("DEBUG WokerGen: responce code for head check = " + responceCode); + System.out.println("DEBUG WokerGen: response code for head check = " + responseCode); } - //if the responce code is method not implemented or if the head requests return 400! - if(responceCode == 501 || responceCode == 400 || responceCode == 405) + //if the response code is method not implemented or if the head requests return 400! + if(responseCode == 501 || responseCode == 400 || responseCode == 405) { if(Config.debug) { @@ -176,7 +176,7 @@ public void run() while((!dirQueue.isEmpty() || !workQueue.isEmpty() || !manager.areWorkersAlive()) && recursive) { //get the dir we are about to process - String baseResponce = null; + String baseResponse = null; recursive = manager.isRecursive(); BaseCase baseCaseObj = null; @@ -213,7 +213,7 @@ public void run() try { - baseResponce = null; + baseResponse = null; manager.setStatus("Getting fail case for " + currentDir); baseCaseObj = GenBaseCase.genBaseCase(firstPart + currentDir, true, null); @@ -318,7 +318,7 @@ public void run() } currentURL = new URL(firstPart + currentDir + line + "/"); - //BaseCase baseCaseObj = new BaseCase(currentURL, failcode, true, failurl, baseResponce); + //BaseCase baseCaseObj = new BaseCase(currentURL, failcode, true, failurl, baseResponse); //if the base case is null then we need to switch to content anylsis mode //System.out.println("Gen about to add to queue"); @@ -363,7 +363,7 @@ public void run() if(manager.getDoFiles()) { - baseResponce = null; + baseResponse = null; URL failurl = null; //loop for all the different file extentions @@ -441,7 +441,7 @@ public void run() } URL currentURL = new URL(firstPart + currentDir + line + fileExtention); - //BaseCase baseCaseObj = new BaseCase(currentURL, true, failurl, baseResponce); + //BaseCase baseCaseObj = new BaseCase(currentURL, true, failurl, baseResponse); workQueue.put(new WorkUnit(currentURL, false, method, baseCaseObj, line)); if(Config.debug) {