Commit 0f5c97c2 authored by fxb's avatar fxb

in and out should work now.

untested, commit for backup purposes only.
parent e6af93bb
......@@ -21,6 +21,13 @@ public class FileOperations {
return tmp;
}
public static String[] ReadInOutOrInFile(String txtfile) throws IOException {
Vector<String> tmp = ReadInDorkFile(txtfile);
String[] out = new String[tmp.size()];
tmp.copyInto(out);
return out;
}
public static void WriteResultsToFile(Vector<String> in, String file_location) throws IOException {
StringBuffer sb = new StringBuffer();
for(int i=0;i<in.size();i++) {
......
......@@ -3,6 +3,7 @@ package SelectModus.Automatik;
import static Core.Utils.FileOperations.ReadInDorkFile;
import static Core.Utils.StringEngine.betterYourResults;
import static Core.Utils.StringEngine.removeDuplicates;
import static Core.Utils.FileOperations.ReadInOutOrInFile;
import java.io.IOException;
import java.util.Vector;
......@@ -33,13 +34,19 @@ public class Attack {
private Vector<Thread> T = new Vector<Thread>();
private SearchProgress PROGRESS;
/*
String[] in = {"?", "="};
String[] out = {"google", "microsoft", "help", "youtube", "wikipedia", "blogspot.com",
"booking", "webcache", "tripadvisor", "yelp", "msn", "facebook", "amazon"};
*/
String[] in, out;
void attack(AutoConfig A) throws IOException {
//preConfig();
initThreads();
in = ReadInOutOrInFile(A.getInFile());
out = ReadInOutOrInFile(A.getOutFile());
boolean checkpoint = true;
int i=0;
......
......@@ -36,7 +36,7 @@ public class Install {
choice = readIn();
if(choice.equalsIgnoreCase("yes")) {
System.out.println("Bing was enabled - Now enter your dorklist file:");
System.out.println("Our current directory is " + System.getProperty("user.home") + System.getProperty("file.separator") + "search_and_destroy");
System.out.println("The config directory is: " + System.getProperty("user.home") + System.getProperty("file.separator") + "search_and_destroy");
A.setBingDorks(readIn());
A.setBing(true);
System.out.print("Enter the count of Threads for Bing: ");
......@@ -63,7 +63,7 @@ public class Install {
choice = readIn();
if(choice.equalsIgnoreCase("yes")) {
System.out.println("Ixquick was enabled - Now enter your dorklist file:");
System.out.println("Our current directory is " + System.getProperty("user.home") + System.getProperty("file.separator") + "search_and_destroy");
System.out.println("The config directory is: " + System.getProperty("user.home") + System.getProperty("file.separator") + "search_and_destroy");
A.setIxquickDorks(readIn());
A.setIxquick(true);
System.out.print("Enter the count of Threads for Ixquick: ");
......@@ -90,7 +90,7 @@ public class Install {
choice = readIn();
if(choice.equalsIgnoreCase("yes")) {
System.out.println("Startpage was enabled - Now enter your dorklist file:");
System.out.print("Our current directory is " + System.getProperty("user.home") + System.getProperty("file.separator") + "search_and_destroy: ");
System.out.println("The config directory is: " + System.getProperty("user.home") + System.getProperty("file.separator") + "search_and_destroy: ");
A.setStartpageDorks(readIn());
A.setStartpage(true);
System.out.print("Enter the count of Threads for Startpage: ");
......
......@@ -36,7 +36,7 @@ public class XML_Library {
A.setBingDorks(eElement.getElementsByTagName("Bing").item(0).getAttributes().item(0).getNodeValue());
//A.setBingInResults(eElement.getElementsByTagName("Bing").item(0).getAttributes().item(1).getNodeValue());
//A.setBingOutResults(eElement.getElementsByTagName("Bing").item(0).getAttributes().item(2).getNodeValue());
A.setBingThreads(Integer.parseInt(eElement.getElementsByTagName("Bing").item(0).getAttributes().item(3).getNodeValue()));
A.setBingThreads(Integer.parseInt(eElement.getElementsByTagName("Bing").item(0).getAttributes().item(1).getNodeValue()));
} else {
A.setBing(false);
A.setBingDorks(null);
......@@ -46,7 +46,7 @@ public class XML_Library {
A.setIxquickDorks(eElement.getElementsByTagName("Ixquick").item(0).getAttributes().item(0).getNodeValue());
//A.setIxquickInResults(eElement.getElementsByTagName("Ixquick").item(0).getAttributes().item(1).getNodeValue());
//A.setIxquickOutResults(eElement.getElementsByTagName("Ixquick").item(0).getAttributes().item(2).getNodeValue());
A.setIxquickThreads(Integer.parseInt(eElement.getElementsByTagName("Ixquick").item(0).getAttributes().item(3).getNodeValue()));
A.setIxquickThreads(Integer.parseInt(eElement.getElementsByTagName("Ixquick").item(0).getAttributes().item(1).getNodeValue()));
} else {
A.setIxquick(false);
A.setIxquickDorks(null);
......@@ -56,7 +56,7 @@ public class XML_Library {
A.setStartpageDorks(eElement.getElementsByTagName("Startpage").item(0).getAttributes().item(0).getNodeValue());
//A.setStartpageInResults(eElement.getElementsByTagName("Startpage").item(0).getAttributes().item(1).getNodeValue());
//A.setStartpageOutResults(eElement.getElementsByTagName("Startpage").item(0).getAttributes().item(2).getNodeValue());
A.setStartpageThreads(Integer.parseInt(eElement.getElementsByTagName("Startpage").item(0).getAttributes().item(3).getNodeValue()));
A.setStartpageThreads(Integer.parseInt(eElement.getElementsByTagName("Startpage").item(0).getAttributes().item(1).getNodeValue()));
} else {
A.setStartpage(false);
A.setStartpageDorks(null);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment