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

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4873 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 17 years ago
parent 08092b4cc5
commit 5f35ba6f05

@ -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

@ -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>

@ -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) {

@ -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
/**

Loading…
Cancel
Save