fortify license 破解

admin 2021年11月22日14:01:04安全工具fortify license 破解已关闭评论561 views2734字阅读9分6秒阅读模式

private static void doLoad(List lines, Map capmap, Properties metadata) throws InvalidLicenseFileException, NoSuchProviderException, NoSuchAlgorithmException, InvalidKeyException, InvalidKeySpecException, SignatureException {        Signature verifier = createVerifier();

      String key;

      do {

          if (lines.isEmpty()) {

              throw new InvalidLicenseFileException();

          }

          key = ((String)lines.remove(lines.size() - 1)).trim();

      } while(key.length() == 0);

      List tokens = new ArrayList();

      Iterator it = lines.iterator();

      while(true) {

          while(true) {

              String line;

              do {

                  do {

                      if (!it.hasNext()) {

                          if (key != null && key.length() == 64) {

                              byte[] sig = Base64.decode(key);

                              boolean verified = verifier.verify(sig);

                              if (!verified) {

                                  throw new InvalidLicenseFileException();

                              }

                              return;

                          }

                          throw new InvalidLicenseFileException();

                      }

                      line = (String)it.next();

                      verifier.update(getBytes(line));

                  } while(line.length() == 0);

              } while(line.charAt(0) == '#');

              if (line.startsWith("Metadata: ")) {

                  loadMetadataLine(metadata, line.substring("Metadata: ".length()));

              } else {

                  tokens.clear();

                  StringTokenizer stok = new StringTokenizer(line);

                  while(stok.hasMoreTokens()) {

                      tokens.add(stok.nextToken());

                  }

                  if (tokens.size() < 2) {

                      throw new InvalidLicenseFileException();

                  }

                  String capname = (String)tokens.get(0);

                  Date expdate = convertDate((String)tokens.get(1));

                  Properties params = new Properties();

                  ListIterator li = tokens.listIterator(2);

                  while(li.hasNext()) {

                      String token = (String)li.next();

                      int delim = token.indexOf(61);

                      if (delim != -1) {

                          params.setProperty(token.substring(0, delim), token.substring(delim + 1));

                      } else {

                          params.setProperty(token, "");

                      }

                  }

                  Config config = new Config(capname, expdate, params);

                  capmap.put(capname, config);

              }

          }

      }

  }

相关推荐: BrakTooth漏洞利用PoC发布

BrakTooth漏洞利用PoC发布,CISA督促厂商修复漏洞。BrakTooth漏洞概述9月,安全研究人员发现了商业BT栈中的多个安全漏洞——BrakTooth。研究人员对11个厂商的13个BT设备进行了测试,在其中发现了16个新的安全漏洞,获得20个CVE…

特别标注: 本站(CN-SEC.COM)所有文章仅供技术研究,若将其信息做其他用途,由用户承担全部法律及连带责任,本站不承担任何法律及连带责任,请遵守中华人民共和国安全法.
  • 我的微信
  • 微信扫一扫
  • weinxin
  • 我的微信公众号
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2021年11月22日14:01:04
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                  fortify license 破解 http://cn-sec.com/archives/643700.html