Commit 9f287dd2 authored by Felix Bilstein's avatar Felix Bilstein

added date class, added theoretically support for sleeping between

crawling
parent 9bbe7d3a
package Core.Utils;
import java.text.SimpleDateFormat;
import java.util.Date;
public class date {
public String getDateAndTime() {
String timeStamp = new SimpleDateFormat("yyyy-MM-dd_HH-mm-ss").format(new Date());
return timeStamp;
}
}
......@@ -133,6 +133,7 @@ public class Attack {
* cuttedDorks.length into the length for all.
*/
int n=0, bing=0, ixquick=0, startpage=0;
int SLEEP = 1;
for(int i=0;i<numberOfThreads;i++) {
if (a.Bing == true && bing != a.getBingThreads()) {
for(int j=0;j<cuttedDorkVectorBing.length;j++) {
......@@ -142,7 +143,7 @@ public class Attack {
cuttedDorkVectorBing[j%cuttedDorkVectorBing.length].add(dorkVectorBing.elementAt(j));
}
resultMemoryArray[i] = new Vector<String>();
threadVector.add(new Thread(new Bing(cuttedDorkVectorBing[n], i, progress, a.BingProxy, resultsPerDork, resultMemoryArray[i])));
threadVector.add(new Thread(new Bing(cuttedDorkVectorBing[n], i, progress, a.BingProxy, resultsPerDork, SLEEP, resultMemoryArray[i])));
threadVector.elementAt(i).start();
n++;
bing++;
......@@ -156,7 +157,7 @@ public class Attack {
cuttedDorkVectorIxquick[j%cuttedDorkVectorIxquick.length].add(dorkVectorIxquick.elementAt(j));
}
resultMemoryArray[i] = new Vector<String>();
threadVector.add(new Thread(new Ixquick(cuttedDorkVectorIxquick[n], i, progress, a.IxquickProxy, resultsPerDork, resultMemoryArray[i])));
threadVector.add(new Thread(new Ixquick(cuttedDorkVectorIxquick[n], i, progress, a.IxquickProxy, resultsPerDork, SLEEP, resultMemoryArray[i])));
threadVector.elementAt(i).start();
n++;
ixquick++;
......@@ -170,7 +171,7 @@ public class Attack {
cuttedDorkVectorStartpage[j%cuttedDorkVectorStartpage.length].add(dorkVectorStartpage.elementAt(j));
}
resultMemoryArray[i] = new Vector<String>();
threadVector.add(new Thread(new Startpage(cuttedDorkVectorStartpage[n], i, progress, a.StartpageProxy, resultsPerDork, resultMemoryArray[i])));
threadVector.add(new Thread(new Startpage(cuttedDorkVectorStartpage[n], i, progress, a.StartpageProxy, resultsPerDork, SLEEP, resultMemoryArray[i])));
threadVector.elementAt(i).start();
n++;
startpage++;
......
......@@ -53,7 +53,7 @@ public class MultiDork {
if (ENGINE.equalsIgnoreCase("B")) {
for(int i=0;i<NUMBER_OF_THREADS;i++) {
RESULT_MEMORY_ARRAY[i] = new Vector<String>();
T.add(new Thread(new Bing(cuttedDorks[i], i, PROGRESS, null, RESULTS_PER_DORK, RESULT_MEMORY_ARRAY[i])));
T.add(new Thread(new Bing(cuttedDorks[i], i, PROGRESS, null, RESULTS_PER_DORK, 1, RESULT_MEMORY_ARRAY[i])));
T.elementAt(i).start();
}
} else if (ENGINE.equalsIgnoreCase("G")) {
......@@ -63,19 +63,19 @@ public class MultiDork {
*/
for(int i=0;i<NUMBER_OF_THREADS;i++) {
RESULT_MEMORY_ARRAY[i] = new Vector<String>();
T.add(new Thread(new Google(cuttedDorks[i], i, PROGRESS, null, RESULTS_PER_DORK, RESULT_MEMORY_ARRAY[i])));
T.add(new Thread(new Google(cuttedDorks[i], i, PROGRESS, null, RESULTS_PER_DORK, 1, RESULT_MEMORY_ARRAY[i])));
T.elementAt(i).start();
}
} else if (ENGINE.equalsIgnoreCase("I")) {
for(int i=0;i<NUMBER_OF_THREADS;i++) {
RESULT_MEMORY_ARRAY[i] = new Vector<String>();
T.add(new Thread(new Ixquick(cuttedDorks[i], i, PROGRESS, null, RESULTS_PER_DORK, RESULT_MEMORY_ARRAY[i])));
T.add(new Thread(new Ixquick(cuttedDorks[i], i, PROGRESS, null, RESULTS_PER_DORK, 1, RESULT_MEMORY_ARRAY[i])));
T.elementAt(i).start();
}
} else if (ENGINE.equalsIgnoreCase("S")) {
for(int i=0;i<NUMBER_OF_THREADS;i++) {
RESULT_MEMORY_ARRAY[i] = new Vector<String>();
T.add(new Thread(new Startpage(cuttedDorks[i], i, PROGRESS, null, RESULTS_PER_DORK, RESULT_MEMORY_ARRAY[i])));
T.add(new Thread(new Startpage(cuttedDorks[i], i, PROGRESS, null, RESULTS_PER_DORK, 1, RESULT_MEMORY_ARRAY[i])));
T.elementAt(i).start();
}
} else {
......
......@@ -37,16 +37,16 @@ public class SingleDork {
Vector<String> input = new Vector<String>();
input.add(DORK);
if(ENGINE.equalsIgnoreCase("B")) {
T = new Thread(new Bing(input, 0, null, null, RESULTS, RESULT_MEMORY));
T = new Thread(new Bing(input, 0, null, null, RESULTS, 1, RESULT_MEMORY));
}
else if(ENGINE.equalsIgnoreCase("I")) {
T = new Thread(new Ixquick(input, 0, null, null, RESULTS, RESULT_MEMORY));
T = new Thread(new Ixquick(input, 0, null, null, RESULTS, 1, RESULT_MEMORY));
}
else if(ENGINE.equalsIgnoreCase("S")) {
T = new Thread(new Startpage(input, 0, null, null, RESULTS, RESULT_MEMORY));
T = new Thread(new Startpage(input, 0, null, null, RESULTS, 1, RESULT_MEMORY));
}
else if(ENGINE.equalsIgnoreCase("G")) {
T = new Thread(new Google(input, 0, null, null, RESULTS, RESULT_MEMORY));
T = new Thread(new Google(input, 0, null, null, RESULTS, 1, RESULT_MEMORY));
} else {
System.out.println("Wrong input..");
}
......
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