Changeset c391dac for apps


Ignore:
Timestamp:
Sep 27, 2018 2:07:38 PM (22 months ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
a69aa15
Parents:
69f380f
Message:

sybil tweaks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • apps/routerconsole/java/src/net/i2p/router/web/helpers/SybilRenderer.java

    r69f380f rc391dac  
    6666    private static final double POINTS_US24 = 25.0;
    6767    private static final double POINTS_US16 = 10.0;
    68     private static final double POINTS_FAMILY = -2.0;
     68    private static final double POINTS_FAMILY = -10.0;
    6969    private static final double POINTS_BAD_OUR_FAMILY = 100.0;
    7070    private static final double POINTS_OUR_FAMILY = -100.0;
     
    7272    private static final double PAIR_DISTANCE_FACTOR = 2.0;
    7373    private static final double OUR_KEY_FACTOR = 4.0;
    74     private static final double MIN_DISPLAY_POINTS = 5.0;
     74    private static final double MIN_DISPLAY_POINTS = 12.01;
    7575    private static final double VERSION_FACTOR = 1.0;
    7676    private static final double POINTS_BAD_VERSION = 50.0;
     
    561561            int i0 = i >> 8;
    562562            int i1 = i & 0xff;
    563             String sip = i0 + "." + i1 + ".0/16";
     563            String sip = i0 + "." + i1 + ".0.0/16";
    564564            buf.append("<p class=\"sybil_info\"><b>").append(count).append(" floodfills with IP <a href=\"/netdb?ip=")
    565565               .append(sip).append("&amp;sybil\">").append(sip)
     
    588588
    589589    private void renderIPGroupsFamily(Writer out, StringBuilder buf, List<RouterInfo> ris, Map<Hash, Points> points) throws IOException {
    590         buf.append("<h3 id=\"samefamily\" class=\"sybils\">Floodfills in the Same Declared Family</h3><div class=\"sybil_container\">");
     590        buf.append("<h3 id=\"samefamily\" class=\"sybils\">Floodfills in the same Family</h3><div class=\"sybil_container\">");
    591591        ObjectCounter<String> oc = new ObjectCounter<String>();
    592592        for (RouterInfo info : ris) {
     
    620620                if (fkc != null && s.equals(ourFamily)) {
    621621                    if (fkc.verifyOurFamily(info))
    622                         addPoints(points, info.getHash(), POINTS_OUR_FAMILY, "Our family \"" + DataHelper.escapeHTML(s) + "\" with " + (count - 1) + " other" + (( count > 2) ? "s" : ""));
     622                        addPoints(points, info.getHash(), POINTS_OUR_FAMILY, "Our family \"" + ss + "\" with " + (count - 1) + " other" + (( count > 2) ? "s" : ""));
    623623                    else
    624                         addPoints(points, info.getHash(), POINTS_BAD_OUR_FAMILY, "Spoofed our family \"" + DataHelper.escapeHTML(s) + "\" with " + (count - 1) + " other" + (( count > 2) ? "s" : ""));
     624                        addPoints(points, info.getHash(), POINTS_BAD_OUR_FAMILY, "Spoofed our family \"" + ss + "\" with " + (count - 1) + " other" + (( count > 2) ? "s" : ""));
    625625                } else if (count > 1) {
    626                     addPoints(points, info.getHash(), point, "Same declared family \"" + DataHelper.escapeHTML(s) + "\" with " + (count - 1) + " other" + (( count > 2) ? "s" : ""));
     626                    addPoints(points, info.getHash(), point, "In family \"" + ss + "\" with " + (count - 1) + " other" + (( count > 2) ? "s" : ""));
    627627                } else {
    628                     addPoints(points, info.getHash(), point, "Declared family \"" + DataHelper.escapeHTML(s) + '"');
     628                    addPoints(points, info.getHash(), point, "In family \"" + ss + '"');
    629629                }
    630630            }
Note: See TracChangeset for help on using the changeset viewer.