Exemplo n.º 1
0
  /**
   * Setzt den Owner (Parameterdump jas wird gelesen
   *
   * @param owner
   */
  public void setOwner(JAntiCaptcha owner) {
    this.owner = owner;
    jas = owner.getJas();
    errorAWeight = jas.getDouble("errorAWeight");
    errorbWeight = jas.getDouble("errorBWeight");
    coverageFaktorAWeight = jas.getDouble("coverageFaktorAWeight");
    coverageFaktorBWeight = jas.getDouble("coverageFaktorBWeight");
    intersectionDimensionWeight = jas.getDouble("intersectionDimensionWeight");
    intersectionAHeightWeight = jas.getDouble("intersectionAHeightWeight");
    intersectionAWidthWeight = jas.getDouble("intersectionAWidthWeight");
    cleftFaktor = jas.getDouble("cleftFaktor");
    minCleftSize = jas.getInteger("minCleftSize");
    preScanFilter = jas.getInteger("preScanFilter");
    preScanFaktor = jas.getInteger("preScanFaktor");
    overlayNoiseSize = jas.getInteger("overlayNoiseSize");
    scanStepX = jas.getInteger("scanstepx");
    scanStepY = jas.getInteger("scanstepy");
    prescanDivider = jas.getDouble("prescandivider");
    divider = jas.getDouble("divider");
    extensionCodeArguments[0] = this;
    if (jas.getString("comparatorExtension").length() > 0) {
      String[] ref = jas.getString("comparatorExtension").split("\\.");
      if (ref.length != 2) {
        if (Utilities.isLoggerActive()) {
          logger.severe("comparatorExtension should have the format Class.Method");
        }
      }
      String cl = ref[0];
      String methodname = ref[1];
      Class<?> newClass;
      try {
        newClass = Class.forName("jd.captcha.specials." + cl);

        extensionCodeMethod = newClass.getMethod(methodname, extensionCodeParameterTypes);

      } catch (Exception e) {
        JDLogger.exception(e);
      }
    }
  }
Exemplo n.º 2
0
 /** @return the scanVarianceY */
 public int getScanVarianceY() {
   if (scanVarianceX >= 0) {
     return scanVarianceY;
   }
   return jas.getInteger("scanVarianceY");
 }