Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

added a list for content of the brute-force registration hashtable in access tracker the purpose of this list is not only to view attempts from read attacks, but also to show if the yacy-yacy protocol is working with respect to the bug that was fixed with SVN 4869

orbiter5f35ba6f05fa
diff --git a/defaults/yacy.network.freeworld.unit b/defaults/yacy.network.freeworld.unit
index 0c85027b5..3244ccf3e 100644
--- a/defaults/yacy.network.freeworld.unit
+++ b/defaults/yacy.network.freeworld.unit
@@ -18,7 +18,6 @@ network.unit.bootstrap.seedlist0 = http://www.yacy.net/seed.txt
network.unit.bootstrap.seedlist1 = http://home.arcor.de/hermens/yacy/seed.txt
network.unit.bootstrap.seedlist2 = http://low.audioattack.de/yacy/seed.txt
network.unit.bootstrap.seedlist3 = http://www.lulabad.de/seed.txt
-network.unit.bootstrap.seedlist4 = http://www.marcelhenseler.de/yacy/seed.txt
# each network may use different yacy distributions.
# the auto-updater can access network-specific update locations
diff --git a/htroot/AccessTracker_p.html b/htroot/AccessTracker_p.html
index 0f15e6f45..7c8517eea 100644
--- a/htroot/AccessTracker_p.html
+++ b/htroot/AccessTracker_p.html
@@ -9,8 +9,7 @@
#%env/templates/submenuAccessTracker.template%#
#(page)#
<h2>Server Access Overview</h2>
- <p>This is a list of requests to the local http server within the last hour.</p>
- <p>Showing #[num]# requests.</p>
+ <p>This is a list of #[num]# requests to the local http server within the last hour.</p>
<table border="0" cellpadding="2" cellspacing="1">
<tr class="TableHeader">
<td rowspan="2">Host</td>
@@ -32,6 +31,19 @@
</tr>
#{/list}#
</table>
+ <p>The following hosts are registered as source for brute-force requests to protected pages</p>
+ <table border="0" cellpadding="2" cellspacing="1">
+ <tr class="TableHeader">
+ <td>Host</td>
+ <td>Access Times</td>
+ </tr>
+ #{bflist}#
+ <tr class="TableCell#(dark)#Light::Dark#(/dark)#">
+ <td>#[host]#</td>
+ <td>#[accesstimes]#</td>
+ </tr>
+ #{/bflist}#
+ </table>
::
<h2>Server Access Details</h2>
<p>This is a list of requests to the local http server within the last hour.</p>
diff --git a/htroot/AccessTracker_p.java b/htroot/AccessTracker_p.java
index 0c43702c1..dace6959f 100644
--- a/htroot/AccessTracker_p.java
+++ b/htroot/AccessTracker_p.java
@@ -37,6 +37,7 @@ import de.anomic.http.httpHeader;
import de.anomic.net.natLib;
import de.anomic.plasma.plasmaSearchQuery;
import de.anomic.plasma.plasmaSwitchboard;
+import de.anomic.server.serverCore;
import de.anomic.server.serverDate;
import de.anomic.server.serverObjects;
import de.anomic.server.serverSwitch;
@@ -82,6 +83,17 @@ public class AccessTracker_p {
}
} catch (ConcurrentModificationException e) {} // we dont want to synchronize this
prop.put("page_list", entCount);
+
+ entCount = 0;
+ try {
+ for (Map.Entry<String, Integer> bfe: serverCore.bfHost.entrySet()) {
+ prop.putHTML("page_bflist_" + entCount + "_host", bfe.getKey());
+ prop.putNum("page_bflist_" + entCount + "_countSecond", bfe.getValue());
+ entCount++;
+ }
+ } catch (ConcurrentModificationException e) {} // we dont want to synchronize this
+ prop.put("page_vflist", entCount);
+
prop.put("page_num", entCount);
}
if (page == 1) {
diff --git a/source/de/anomic/server/serverCore.java b/source/de/anomic/server/serverCore.java
index 61f7d95ea..37f0395e2 100644
--- a/source/de/anomic/server/serverCore.java
+++ b/source/de/anomic/server/serverCore.java
@@ -123,7 +123,7 @@ public final class serverCore extends serverAbstractBusyThread implements server
/**
* for brute-force prevention
*/
- public static HashMap<String, Integer> bfHost = new HashMap<String, Integer>();
+ public static ConcurrentHashMap<String, Integer> bfHost = new ConcurrentHashMap<String, Integer>();
// class variables
/**