Browse Source

First commit

Steven Yan 3 years ago
commit
71639a7098
19 changed files with 1334 additions and 0 deletions
  1. BIN
      .DS_Store
  2. 2 0
      .gitignore
  3. 3 0
      .jshintrc
  4. 55 0
      404.html
  5. 57 0
      api/bing/index.php
  6. 75 0
      api/kp.php
  7. 34 0
      api/kp_info.php
  8. BIN
      api/pyqbot.png
  9. 3 0
      api/test.php
  10. 55 0
      click.js
  11. BIN
      favicon.ico
  12. BIN
      hahaha.ico
  13. BIN
      icon.png
  14. 527 0
      index.html
  15. 99 0
      pages/encode/index.html
  16. 189 0
      pages/encode/index.js
  17. 89 0
      pages/hash/index.html
  18. 98 0
      pages/hash/index.js
  19. 48 0
      redirectClock.js

BIN
.DS_Store


+ 2 - 0
.gitignore

@@ -0,0 +1,2 @@
+.vscode/
+*@deprecated

+ 3 - 0
.jshintrc

@@ -0,0 +1,3 @@
+{
+  "esversion": 10
+}

+ 55 - 0
404.html

@@ -0,0 +1,55 @@
+<!doctype html>
+<html>
+
+<head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
+    <title>404</title>
+    <style>
+        body {
+            background-color: #444;
+            font-size: 14px;
+        }
+
+        h3 {
+            font-size: 60px;
+            font-size: 3vw;
+            color: #eee;
+            text-align: center;
+            padding-top: 30px;
+            font-weight: normal;
+        }
+
+        div {
+            font-size: 30px;
+            font-size: 2vw;
+            color: #eee;
+            text-align: center;
+            padding-top: 30px;
+            font-weight: normal;
+        }
+    </style>
+</head>
+
+<body>
+    <h1>404,您请求的文件不存在!</h1>
+    <div id="text"></div>
+</body>
+<script type="text/javascript">
+    window.onload = function () {
+        redirect();
+    }
+    var i = 0;
+
+    function redirect() {
+        document.getElementById("text").innerHTML = (5 - i + " 秒后跳转回<a href=\"https://stevenapis.xyz\">主页</a>");
+        i++;
+        if (i > 5) {
+            window.location.href = "https://stevenapis.xyz/";
+        }
+        setTimeout(redirect, 1000);
+    }
+</script>
+
+</html>

+ 57 - 0
api/bing/index.php

@@ -0,0 +1,57 @@
+<?php
+// error_reporting(0);
+$path=date('Ym');
+if (!file_exists($path)) {
+    mkdir($path, 0777);
+}
+$last = strtotime("-1 month", time());
+$last_month = date("Ym", $last);//上个月
+if (file_exists($last_month)) {
+    deleteDir($last_month);
+}
+$pathurl = $path.'/'.date('d').'.jpg';
+if (!is_file($pathurl)) {  
+    $str=file_get_contents('http://cn.bing.com/HPImageArchive.aspx?idx=0&n=1');
+    if (preg_match("/<urlBase>(.+?)<\/urlBase>/ies", $str, $matches)) {
+        $imgurl='http://cn.bing.com'.$matches[1].'_1920x1080.jpg';
+        copy($imgurl, $pathurl);
+    } else {
+        copy('https://dl.ryzenx.com/files/win10pic1.jpg', $pathurl);
+    }
+}
+if ($pathurl) {
+    header('Content-Type: image/jpeg');
+    header("Cache-Control: no-store, no-cache, must-revalidate");//强制不缓存
+    header("Pragma: no-cache");//禁止本页被缓存
+    @ob_end_clean();
+    @readfile($pathurl);
+    @flush();
+    @ob_flush();
+    exit();
+} else {
+    exit('error');
+}
+function deleteDir($path_e) {
+    if (is_dir($path_e)) {
+        //扫描一个目录内的所有目录和文件并返回数组
+        $dirs = scandir($path_e);
+        foreach ($dirs as $dir) {
+            //排除目录中的当前目录(.)和上一级目录(..)
+            if ($dir != '.' && $dir != '..') {
+                //如果是目录则递归子目录,继续操作
+                $sonDir = $path_e.'/'.$dir;
+                if (is_dir($sonDir)) {
+                    //递归删除
+                    deleteDir($sonDir);
+                    //目录内的子目录和文件删除后删除空目录
+                    @rmdir($sonDir);
+                } else {
+                    //如果是文件直接删除
+                    @unlink($sonDir);
+                }
+            }
+        }
+        @rmdir($path_e);
+    }
+}
+?>

+ 75 - 0
api/kp.php

@@ -0,0 +1,75 @@
+<?php
+ini_set('display_errors', true);
+ini_set("include_path", '/home/stevenos/php:' . ini_get("include_path") );
+error_reporting(E_ALL);
+date_default_timezone_set('Asia/Shanghai');
+global $user_online;
+
+function load_data() {
+    global $user_online;
+    $data = file_get_contents($user_online);
+    $data = json_decode($data, true);
+    $json = array();
+    if (sizeof($data) > 0) {
+        foreach ((array) $data as $single_data) {
+            if (date('mdHis') - date('mdHis',strtotime(date('Y-').$single_data["time"])) < 60) {
+                if (strpos(json_encode($json),$single_data['ip'])) {
+                    continue;
+                }
+                $json[] = array(
+                    "ip" => $single_data["ip"],
+                    "ua" => $single_data["ua"],
+                    "time" => $single_data["time"]
+                );
+            }
+        }
+    }
+    $data = array_unique($json, SORT_REGULAR);
+    return $data;
+}
+
+function save_data($data) {
+    global $user_online;
+    $old_data = load_data();
+    if (!strpos(json_encode($old_data),$data['ip'])) {
+        array_push($old_data, $data);
+        $old_data = array_unique($old_data, SORT_REGULAR);
+    }
+    file_put_contents($user_online, json_encode($old_data, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT));
+}
+
+
+preg_match('/(\d+)\-.*/',$_GET['g'],$matches);
+$user_online = $matches[1];
+$user_online = $user_online.".txt";
+if ($user_online == '.txt') {
+    exit();
+}
+
+$action = isset($_GET['action'])?$_GET['action']:'s';
+if ($action == "s") {
+    $json = array(
+        "ip" => getenv('REMOTE_ADDR'),
+        "ua" => getenv('HTTP_USER_AGENT'),
+        "time" => date('m-d H:i:s')
+    );
+    if (file_exists($user_online)) {
+        save_data($json);
+    } else {
+        file_put_contents($user_online,'[]');
+        save_data($json);
+    }
+    header('Content-Type: image/png');
+    @ob_end_clean();
+    @readfile('pyqbot.png');
+    @flush();
+    @ob_flush();
+    exit();
+} elseif ($action == "p") {
+    echo json_encode(load_data());
+    exit();
+} else {
+    exit("error!");
+}
+
+?>

+ 34 - 0
api/kp_info.php

@@ -0,0 +1,34 @@
+<?php
+error_reporting(E_ALL);
+date_default_timezone_set('Asia/Shanghai');
+ini_set('user_agent', 'Spirit');
+
+require_once 'vendor/autoload.php';
+use UAParser\Parser;
+
+$user_online = $_GET['g'];
+$or = file_get_contents("https://stevenapis.xyz/api/kp.php?action=p&g=".$user_online ."-dsssss");
+$data = json_decode($or,true);
+file_put_contents("kp/" .date('mdHis')."-".$user_online.".txt", json_encode($data, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT));
+$json = array();
+foreach ((array)$data as $user) {
+    $ip = $user["ip"];
+    $ua = $user["ua"];
+    $time = $user["time"];
+    $parser = Parser::create();
+    $result = $parser->parse($ua);
+    $ua = $result->device->brand ." ".$result->device->model . "/" . $result->os->toString();;
+    // $ua = $result->originalUserAgent;
+    $file_contents = file_get_contents('http://ip.taobao.com/outGetIpInfo?accessKey=alibaba-inc&ip='.$ip);
+    $result = json_decode($file_contents,true)["data"];
+    $ip = preg_replace('~(.*?):(.*?):.*~',"$1:$2:**:****",$ip);
+    $ip = preg_replace('~(\d+)\.(\d+)\.(\d+)\.(\d+)~',"$1.$2.*.*",$ip);
+    $addr = $result["country"] != "中国" ? $result["country"]:$result["region"]. ' ' .  $result["city"] . ' ' . $result["isp"];
+    $json[] = array(
+        "ip" => $ip,
+        "addr" => $addr,
+        "ua" => $ua,
+        "time" => $time
+    );
+}
+echo json_encode($json, JSON_PRETTY_PRINT);

BIN
api/pyqbot.png


+ 3 - 0
api/test.php

@@ -0,0 +1,3 @@
+<?php
+phpinfo();
+?>

+ 55 - 0
click.js

@@ -0,0 +1,55 @@
+// var a_idx = 0;
+// jQuery(document).ready(function($) {
+//     $("body").click(function(e) {
+//         // var a = new Array("富强", "民主", "文明", "和谐", "自由", "平等", "公正", "法治", "爱国", "敬业", "诚信", "友善");
+//         var $i = $("<span/>").text(a[a_idx]);
+//         a_idx = (a_idx + 1) % a.length;
+//         var x = e.pageX,
+//             y = e.pageY;
+//         $i.css({
+//             "z-index": 999999999999999999999999999999999999999999999999999999999999,
+//             "top": y - 20,
+//             "left": x,
+//             "position": "absolute",
+//             "color": "#ff0000",
+//             "font-size": "20px",
+//             "text-shadow": "0px 0px 5px #555"
+//         });
+//         $("body").append($i);
+//         $i.animate({
+//                 "top": y - 300,
+//                 "opacity": 0
+//             },
+//             1500,
+//             function() {
+//                 $i.remove();
+//             });
+//     });
+// });
+
+$("html,body").click(function (e) {
+  var gcd = new Array("♥", "♥", "♥");
+  var n = Math.floor(Math.random() * gcd.length);
+  var $i = $("<b/>").text(gcd[n]);
+  var x = e.pageX,
+    y = e.pageY;
+  $i.css({
+    "z-index": 99999,
+    top: y - 20,
+    left: x - 8,
+    position: "absolute",
+    color: "#FF706C",
+    animation: "heartbeat .25s infinite .15s",
+  });
+  $("body").append($i);
+  $i.animate(
+    {
+      opacity: 0,
+    },
+    1500,
+    function () {
+      $i.remove();
+    }
+  );
+  e.stopPropagation();
+});

BIN
favicon.ico


BIN
hahaha.ico


BIN
icon.png


+ 527 - 0
index.html

@@ -0,0 +1,527 @@
+<!DOCTYPE html>
+
+<head>
+  <title>Steven的启动页</title>
+  <meta charset="utf-8" />
+  <meta name="keywords" content="Steven的启动页">
+  <meta name="description" content="Steven的启动页">
+  <link rel="Shortcut Icon" type="image/x-icon" href="./favicon.ico">
+  <meta name="author" content="me@stevenos.com">
+  <META NAME="COPYRIGHT" CONTENT="StevenYan">
+  <meta http-equiv="Window-target" content="_top" />
+  <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
+  <meta http-equiv="Pragma" content="no-cache" />
+  <meta http-equiv="Expires" content="0" />
+  <meta name="theme-color" content="#6699ff">
+  <link rel="apple-touch-icon-precomposed" href="favicon.ico">
+  <meta name="apple-mobile-web-app-title" content="GMS.icu">
+  <meta name="apple-mobile-web-app-capable" content="yes">
+  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
+  <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
+</head>
+
+<style>
+  * {
+    padding: 0;
+    margin: 0;
+  }
+
+  body {
+    text-align: center;
+    background-color: #ffffff;
+    cursor: url("https://ryzenx.oss-accelerate.aliyuncs.com/cur/Diamond_Sword.cur"), auto;
+  }
+
+  input {
+    cursor: url("https://ryzenx.oss-accelerate.aliyuncs.com/cur/Bow.cur"), auto;
+  }
+
+  img.smaller {
+    width: 192px;
+    height: 108px;
+    max-width: 250px;
+    animation: flipInX 4s;
+    -webkit-animation: flipInX 4s
+  }
+
+  .logo {
+    font-size: 3em;
+    white-space: normal;
+    word-wrap: break-word;
+    text-decoration: none;
+    color: #232323
+  }
+
+  #search_input_bd {
+    width: 90%;
+    height: 40px;
+    background-color: transparent;
+    border: none;
+    outline: 0;
+    font-size: 15px;
+    color: #ee0000;
+    padding: 0 20px;
+    border-radius: 50px
+  }
+
+  #search_input_go {
+    width: 90%;
+    height: 40px;
+    background-color: transparent;
+    border: none;
+    outline: 0;
+    font-size: 15px;
+    color: #0000ee;
+    padding: 0 20px;
+    border-radius: 50px
+  }
+
+  .search_part {
+    margin-bottom: 30px;
+    margin-top: 20px;
+  }
+
+  span {
+    display: block;
+    overflow: hidden;
+    padding-left: 5px;
+
+  }
+
+  .search_bar {
+    box-shadow: 0 0 18px rgba(70, 70, 40, .100);
+    -webkit-animation: fadeIn 2.5s;
+    animation: fadeIn 2.5s;
+    background-color: rgba(255, 255, 255, 0.8);
+    border-radius: 20px;
+    display: table;
+    vertical-align: middle;
+    width: 80%;
+    height: 40px;
+    max-width: 400px;
+    margin: 10px auto;
+  }
+
+  #search_submit_bd {
+    outline: 0;
+    height: 40px;
+    float: right;
+    color: #0000ff;
+    font-size: 18px;
+    font-weight: 700;
+    border: none;
+    background-color: transparent;
+    padding: 0 13px 0 13px
+  }
+
+  #search_submit_go {
+    outline: 0;
+    height: 40px;
+    float: right;
+    color: #ff0000;
+    font-size: 18px;
+    font-weight: 700;
+    border: none;
+    background-color: transparent;
+    padding: 0 13px 0 13px
+  }
+
+  #content {
+    position: absolute;
+    top: 50%;
+    left: 50%;
+    transform: translate(-50%, -60%);
+  }
+
+  .box {
+    -webkit-animation: fadeInDown 1s;
+    animation: fadeInDown 1s;
+    position: relative;
+    display: inline-block;
+    width: 75px;
+    border: 0;
+    margin-left: auto;
+    margin-right: auto;
+  }
+
+  .box a {
+    width: 100%;
+    height: 100%;
+    position: absolute;
+    left: 0;
+    top: 0;
+    cursor: url("https://ryzenx.oss-accelerate.aliyuncs.com/cur/Redstonelink.cur"), auto;
+  }
+
+  .url {
+    color: #ffff00;
+    text-shadow: 1px 1px 5px #111;
+    height: 1.5em;
+    line-height: 1.5em;
+    width: 75px;
+    font-size: 0.8em;
+    white-space: nowrap;
+    overflow: hidden;
+    margin: auto;
+
+    text-overflow: ellipsis;
+    -o-text-overflow: ellipsis;
+    -ms-text-overflow: ellipsis;
+    margin-left: auto;
+    margin-right: auto;
+    padding-top: 5px;
+    padding-bottom: 5px;
+  }
+
+  .icon {
+    width: 3em;
+    height: 3em;
+    max-width: 75px;
+  }
+
+  .GMSICU {
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    justify-content: center;
+  }
+
+  .GMSICU .top {
+    background-image: url("https://ryzenx.oss-accelerate.aliyuncs.com/img/bg.png");
+    overflow: auto;
+    background-repeat: repeat;
+    background-size: cover;
+    color: #000;
+    text-shadow: 1px 1px 10px #eee;
+    font-size: 40px;
+    font-size: 4vw;
+    text-decoration: none;
+    border-radius: 20px;
+    border-radius: 1vw;
+    padding: 10px;
+    padding: 0.5vw;
+  }
+
+  .redirectTime {
+    width: fit-content;
+    height: fit-content;
+    background-image: url("https://ryzenx.oss-accelerate.aliyuncs.com/img/bg.png");
+    overflow: auto;
+    background-repeat: repeat;
+    background-size: cover;
+    color: #111;
+    text-shadow: 0px 0px 5px #fff;
+    font-size: 1.5rem;
+    border-radius: 1vw;
+    padding: 0.5vw;
+  }
+
+  @-webkit-keyframes flipInX {
+    0% {
+      -webkit-transform: perspective(400px) rotateX(90deg);
+      transform: perspective(400px) rotateX(90deg);
+      opacity: 0
+    }
+
+    40% {
+      -webkit-transform: perspective(400px) rotateX(-10deg);
+      transform: perspective(400px) rotateX(-10deg)
+    }
+
+    70% {
+      -webkit-transform: perspective(400px) rotateX(10deg);
+      transform: perspective(400px) rotateX(10deg)
+    }
+
+    100% {
+      -webkit-transform: perspective(400px) rotateX(0);
+      transform: perspective(400px) rotateX(0);
+      opacity: 1
+    }
+  }
+
+  @keyframes flipInX {
+    0% {
+      -webkit-transform: perspective(400px) rotateX(90deg);
+      -ms-transform: perspective(400px) rotateX(90deg);
+      transform: perspective(400px) rotateX(90deg);
+      opacity: 0
+    }
+
+    40% {
+      -webkit-transform: perspective(400px) rotateX(-10deg);
+      -ms-transform: perspective(400px) rotateX(-10deg);
+      transform: perspective(400px) rotateX(-10deg)
+    }
+
+    70% {
+      -webkit-transform: perspective(400px) rotateX(10deg);
+      -ms-transform: perspective(400px) rotateX(10deg);
+      transform: perspective(400px) rotateX(10deg)
+    }
+
+    100% {
+      -webkit-transform: perspective(400px) rotateX(0);
+      -ms-transform: perspective(400px) rotateX(0);
+      transform: perspective(400px) rotateX(0);
+      opacity: 1
+    }
+  }
+
+  @-webkit-keyframes fadeIn {
+    0% {
+      opacity: 0
+    }
+
+    100% {
+      opacity: 1
+    }
+  }
+
+  @keyframes fadeIn {
+    0% {
+      opacity: 0
+    }
+
+    100% {
+      opacity: 1
+    }
+  }
+
+  @-webkit-keyframes fadeInDown {
+    0% {
+      opacity: 0;
+      -webkit-transform: translateY(-20px);
+      transform: translateY(-20px)
+    }
+
+    100% {
+      opacity: 1;
+      -webkit-transform: translateY(0);
+      transform: translateY(0)
+    }
+  }
+
+  @keyframes fadeInDown {
+    0% {
+      opacity: 0;
+      -webkit-transform: translateY(-20px);
+      -ms-transform: translateY(-20px);
+      transform: translateY(-20px)
+    }
+
+    100% {
+      opacity: 1;
+      -webkit-transform: translateY(0);
+      -ms-transform: translateY(0);
+      transform: translateY(0)
+    }
+  }
+</style>
+<style type="text/css">
+  .cover {
+    position: relative;
+    padding: 0;
+    text-align: center;
+  }
+
+  @media only screen and (max-width: 1080px) {
+    .cover {
+      margin-bottom: 0;
+      height: 100%;
+    }
+
+    #content {
+      width: 100%;
+      margin-top: 5rem;
+    }
+  }
+
+  .cover-frame {
+    position: relative;
+    min-width: 100%;
+    height: 100vh;
+  }
+
+  .cover-frame .bg-box {
+    width: 100%;
+    height: 100%;
+  }
+
+  .cover-frame .bg-box>img {
+    display: block;
+    width: 100vw;
+    height: 100vh;
+    object-fit: cover;
+    object-position: center center;
+  }
+
+  #textarea {
+    position: absolute;
+    top: 0;
+    left: 0;
+    opacity: 0;
+    z-index: -10;
+  }
+</style>
+<script type="text/javascript">
+  function killDevTool() {
+    let text = '<h1>本页面禁止使用开发者工具<br />DevTools are forbidden on this Page.</h1>';
+    let obj = new Image();
+    Object.defineProperty(obj, 'id', { get: function () { document.write(text) } });
+    console.log(obj);
+  }
+  function loadBG() {
+    document.getElementById('bg-img').src = "https://stevenapis.xyz/api/bing";
+    console.log("BG img set.");
+  }
+  window.onload = function () {
+    console.log("onLoad");
+    console.log('%c' + '地址: http://stevenapis.xyz', "color:yellow;background-color:blue;");
+    // startTimer();
+    // clock();
+    loadBG();
+    killDevTool();
+  }
+</script>
+
+<body>
+  <section class="cover">
+    <div class="cover-frame">
+      <div class="bg-box">
+        <img id="bg-img" src="" alt="Loading...Background Image">
+      </div>
+    </div>
+    <div id="content">
+
+      <div class="search_part">
+        <a class="logo" href="https://www.google.com">
+          <img class="smaller" src="https://ryzenx.oss-accelerate.aliyuncs.com/img/GoogleLogo.gif">
+        </a>
+        <div class="search_part">
+          <h1>Steven的启动页</h1>
+        </div>
+        <form onsubmit="search1()" class="search_bar">
+          <input type="submit" id="search_submit_bd" value="Baidu">
+          <span><input class="search" type="text" value="" autocomplete="off" id="search_input_bd"></span>
+        </form>
+        <form onsubmit="search2()" class="search_bar">
+          <input type="submit" id="search_submit_go" value="Google">
+          <span><input class="search" type="text" value="" autocomplete="off" id="search_input_go"></span>
+        </form>
+      </div>
+      <div class="GMSICU">
+        <div class="redirectTime">
+          <p id="nowTime"></p>
+          <p id="redirectTime"></p>
+          <input id="btn_copy" type="button" onclick="toClipboard()" value="Copy" />
+          <textarea id="textarea"></textarea>
+        </div>
+      </div>
+      <br />
+
+      <div class="box">
+        <a href="https://www.google.com"></a>
+        <p><img class="icon" src="https://ryzenx.oss-accelerate.aliyuncs.com/img/Google.png"></p>
+        <p class="url">Google</p>
+      </div>
+
+      <div class="box">
+        <a href="https://m.youtube.com"></a>
+        <p><img class="icon" src="https://ryzenx.oss-accelerate.aliyuncs.com/img/youtube.png"></p>
+        <p class="url">Youtube</p>
+      </div>
+
+      <div class="box">
+        <a href="http://www.bilibili.com"></a>
+        <p><img class="icon" src="https://ryzenx.oss-accelerate.aliyuncs.com/img/bilibili.png"></p>
+        <p class="url">哔哩哔哩</p>
+      </div>
+
+
+      <div class="box">
+        <a href="https://translate.google.cn"></a>
+        <p><img class="icon" src="https://ryzenx.oss-accelerate.aliyuncs.com/img/Translate.png"></p>
+        <p class="url">翻译</p>
+      </div>
+
+      <div class="box">
+        <a href="https://www.gmail.com"></a>
+        <p><img class="icon" src="https://ryzenx.oss-accelerate.aliyuncs.com/img/Gmail.png"></p>
+        <p class="url">Gmail</p>
+      </div>
+
+      <div class="box">
+        <a href="https://mail.qq.com"></a>
+        <p><img class="icon" src="https://mail.qq.com/favicon.ico"></p>
+        <p class="url">QQ 邮箱</p>
+      </div>
+
+      <div class="box">
+        <a href="https://outlook.live.com"></a>
+        <p><img class="icon" src="https://outlook.live.com/favicon.ico"></p>
+        <p class="url">Outlook</p>
+      </div>
+
+      <div class="box">
+        <a href="https://mail.163.com"></a>
+        <p><img class="icon" src="https://mail.163.com/favicon.ico"></p>
+        <p class="url">163 邮箱</p>
+      </div>
+
+      <div class="box">
+        <a href="https://gms.icu"></a>
+        <p><img class="icon" src="https://gms.icu/logo.small.png"></p>
+        <p class="url">GMS.icu</p>
+      </div>
+
+      <div class="box">
+        <a href="https://ryzenx.com"></a>
+        <p><img class="icon" src="https://ryzenx.com/img/icon.png"></p>
+        <p class="url">RyzenX 博客</p>
+      </div>
+
+    </div>
+  </section>
+
+  <script src="redirectClock.js"></script>
+  <script type="text/javascript">
+    nowTime();
+    function search1() {
+      if (document.getElementById("search_input_bd").value != "") {
+        window.location.href = "https://www.baidu.com/s?word=" + document.getElementById("search_input_bd").value;
+        document.getElementById("search_input_bd").value = "";
+      }
+      return false;
+    }
+
+    function search2() {
+      if (document.getElementById("search_input_go").value != "") {
+        window.location.href = "https://www.google.com/search?q=" + document.getElementById("search_input_go").value;
+        document.getElementById("search_input_go").value = "";
+      }
+      return false;
+    }
+  </script>
+  <script type="text/javascript">
+    var OriginTitile = document.title;
+    var titleTime;
+    document.addEventListener('visibilitychange', function () {
+      if (document.hidden) {
+        $('[rel="shortcut icon"]').attr('href', "./hahaha.ico");
+        document.title = '(╯°Д°)╯喔唷~崩溃啦___' + OriginTitile;
+        clearTimeout(titleTime);
+      } else {
+        $('[rel="shortcut icon"]').attr('href', "./favicon.ico");
+        document.title = '(`・ω・´)又好了______' + OriginTitile;
+        titleTime = setTimeout(function () {
+          document.title = OriginTitile;
+        }, 2000);
+      }
+    });
+  </script>
+  <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
+  <script src="click.js"></script>
+</body>
+
+</html>

+ 99 - 0
pages/encode/index.html

@@ -0,0 +1,99 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+  <meta charset="utf-8">
+  <title>Elements Encode - By StevenOS</title>
+  <link rel="shortcut icon" href="https://ryzenx.com/img/favicon.ico" />
+  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.0/dist/css/bootstrap.min.css">
+  <script src="https://cdn.bootcdn.net/ajax/libs/crypto-js/4.0.0/crypto-js.js"></script>
+  <script src="index.js"></script>
+</head>
+<style type="text/css">
+  body {
+    width: 100%;
+    height: 100%;
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    align-items: center;
+    cursor: url("https://ryzenx.oss-accelerate.aliyuncs.com/cur/Diamond_Sword.cur"), auto;
+    background-image: url("https://stevenapis.xyz/api/bing");
+    font-family: "SF Pro Text", "SF Pro Icons", -apple-system, "Helvetica Neue", "Helvetica", "Arial", sans-serif;
+  }
+
+  .container {
+    height: auto;
+    width: 80%;
+    backdrop-filter: blur(4px);
+    background-color: rgba(25, 250, 250, 0.4);
+    opacity: 0.9;
+    border-radius: 15px;
+    margin: 10%;
+  }
+
+  .title {
+    margin-top: 10px;
+    font-size: 2rem;
+    font-family: "SF Pro Text", "SF Pro Icons", -apple-system, "Helvetica Neue", "Helvetica", "Arial", sans-serif;
+  }
+
+  .data {
+    width: auto;
+    height: auto;
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    align-items: flex-start;
+  }
+
+  .label {
+    width: auto;
+    height: auto;
+    margin: 8px 8px 8px 0;
+    font-family: 'Fira Code', 'Jetbrains Mono', 'Ubuntu Mono', Menlo, 'PT Mono', 'Source Han Mono';
+  }
+
+  .btns {
+    display: flex;
+    flex-direction: row;
+    justify-content: start;
+    align-items: center;
+    margin-top: 12px;
+    margin-bottom: 12px;
+  }
+
+  .form-control {
+    font-family: 'Fira Code', 'Jetbrains Mono', 'Ubuntu Mono', Menlo, 'PT Mono', 'Source Han Mono';
+  }
+</style>
+
+<body onload="onLoad()">
+  <div class="container">
+    <div class="title">
+      元素周期表 编解码器 - <a href="https://s.ryzenx.com" target="_blank">StevenOS</a>
+    </div>
+    <div id="updateTime" class="label" style="font-size: smaller;"></div>
+    <div class="data">
+      <div class="label">#1 </div>
+      <textarea id="data1" class="form-control" aria-label="With textarea" style="min-height: 150px;"></textarea>
+    </div>
+    <div class="btns">
+      <button id="encode" onclick="doEncode()" type="button" class="btn btn-primary">从 #1 编码</button>
+      <div style="width: 12px;"></div>
+      <button id="decode" onclick="doDecode()" type="button" class="btn btn-secondary">从 #1 解码</button>
+      <div style="width: 12px;"></div>
+      <button id="copy" onclick="copy()" type="button" class="btn btn-info">拷贝 #2 内容</button>
+      <div style="width: 12px;"></div>
+      <button id="clear" onclick="clearText()" type="button" class="btn btn-success">清空</button>
+    </div>
+    <div class="data">
+      <div class="label">#2 </div>
+      <textarea id="data2" class="form-control" aria-label="With textarea" style="min-height: 150px;"
+        contenteditable="false"></textarea>
+    </div>
+    <div style="height: 18px;"></div>
+  </div>
+</body>
+
+</html>

+ 189 - 0
pages/encode/index.js

@@ -0,0 +1,189 @@
+var data1 = "";
+var data2 = "";
+var okData = "";
+var map = {
+  "A": "氢",
+  "B": "氦",
+  "C": "锂",
+  "D": "铍",
+  "E": "硼",
+  "F": "碳",
+  "G": "氮",
+  "H": "氧",
+  "I": "氟",
+  "J": "氖",
+  "K": "钠",
+  "L": "镁",
+  "M": "铝",
+  "N": "硅",
+  "O": "磷",
+  "P": "硫",
+  "Q": "氯",
+  "R": "氩",
+  "S": "钾",
+  "T": "钙",
+  "U": "钪",
+  "V": "钛",
+  "W": "钒",
+  "X": "铬",
+  "Y": "锰",
+  "Z": "铁",
+  "a": "钴",
+  "b": "镍",
+  "c": "铜",
+  "d": "锌",
+  "e": "镓",
+  "f": "锗",
+  "g": "砷",
+  "h": "硒",
+  "i": "溴",
+  "j": "氪",
+  "k": "铷",
+  "l": "锶",
+  "m": "钇",
+  "n": "锆",
+  "o": "铌",
+  "p": "钼",
+  "q": "锝",
+  "r": "钌",
+  "s": "铑",
+  "t": "钯",
+  "u": "银",
+  "v": "镉",
+  "w": "铟",
+  "x": "锡",
+  "y": "锑",
+  "z": "碲",
+  "0": "碘",
+  "1": "氙",
+  "2": "铯",
+  "3": "钡",
+  "4": "镧",
+  "5": "铈",
+  "6": "镨",
+  "7": "钕",
+  "8": "钷",
+  "9": "钐",
+  "+": "加",
+  "/": "杠",
+  "=": "等"
+};
+var rmap = {};
+
+function writeLocal() {
+  json = `{"data1": "${data1}", "data2": "${data2}"}`;
+  localStorage.emojidata1 = json;
+  document.getElementById('data1').value = data1;
+  document.getElementById('data2').value = data2;
+}
+
+function readLocal() {
+  json = localStorage.emojidata1;
+  if (json != null) {
+    json = JSON.parse(json);
+  } else {
+    json = null;
+  }
+  // console.log(json);
+  return json;
+}
+
+function onLoad() {
+  killDevTool();
+  document.getElementById('updateTime').innerText = "2021-04-18 更新";
+  localData = readLocal();
+  if (localData != null) {
+    data1 = localData.data1;
+    data2 = localData.data2;
+    document.getElementById('data1').value = data1;
+    document.getElementById('data2').value = data2;
+  } else {
+    writeLocal();
+  }
+}
+
+function doEncode() {
+  data1 = document.getElementById('data1').value;
+  data1 = data1.replace(/\r/g, ' ').replace('/\t/g', ' ');
+  let wordArray = CryptoJS.enc.Utf8.parse(data1);
+  let base64 = CryptoJS.enc.Base64.stringify(wordArray);
+  console.log(base64);
+  let list = base64.split("");
+  let new_list = [];
+  list.forEach(item => {
+    new_list.push(map[item]);
+  })
+  data2 = new_list.join("");
+  document.getElementById('data2').value = data2;
+  writeLocal();
+}
+
+function doDecode() {
+  let valid = [];
+  // 转换map
+  for (let key in map) {
+    let value = map[key];
+    [value, key] = [key, value];
+    rmap[key] = value;
+  }
+  // 检查输入字符是否合法
+  for (let key in map) {
+    valid.push(map[key]);
+  }
+  data1 = document.getElementById('data1').value;
+  let list = data1.split("");
+  let new_list = [];
+  for (i in list) {
+    if (valid.indexOf(list[i]) > -1) {
+      new_list.push(rmap[list[i]]);
+    } else {
+      alert("#1 中的 " + list[i] + " 不在周期表中");
+      break;
+    }
+  }
+  let str = new_list.join("");
+  console.log(str);
+  try {
+    str = CryptoJS.enc.Base64.parse(str);
+    data2 = CryptoJS.enc.Utf8.stringify(str);
+  } catch (err) {
+    alert(err.message + '\n检查 #1 解码数据');
+    data2 = "";
+  }
+  if (data2.length < 1) {
+    data1 = "";
+    data2 = "";
+    document.getElementById('data1').value = data1;
+    document.getElementById('data2').value = data2;
+  }
+  writeLocal();
+}
+
+function copy() {
+  document.getElementById('data2').select();
+  document.execCommand("copy");
+  var btn3 = document.getElementById('copy');
+  btn3.innerHTML = "复制成功...";
+  setTimeout(() => {
+    btn3.innerHTML = "拷贝 #2 内容";
+  }, 1500);
+}
+
+function clearText() {
+  data1 = "";
+  data2 = "";
+  document.getElementById('data1').value = data1;
+  document.getElementById('data2').value = data2;
+  writeLocal();
+}
+
+function killDevTool() {
+  let text = '<h1>本页面禁止使用开发者工具<br />DevTools are forbidden on this Page.</h1>';
+  let obj = new Image();
+  Object.defineProperty(obj, 'id', {
+    get: function() {
+      document.write(text)
+    }
+  });
+  console.log(obj);
+}

+ 89 - 0
pages/hash/index.html

@@ -0,0 +1,89 @@
+<html>
+  <head>
+    <title>Calculate Hash - By StevenOS</title>
+    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.0/dist/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk"
+      crossorigin="anonymous">
+    <script src="https://cdn.bootcdn.net/ajax/libs/crypto-js/4.0.0/crypto-js.js"></script>
+    <script src="index.js"></script>
+  </head>
+  <style type="text/css">
+    .container {
+      height: auto;
+      min-width: 420px;
+      background-color: rgba(226, 240, 220, 200);
+      margin-top: 4rem;
+      margin-bottom: 4rem;
+      border-radius: 5px;
+      display: flex;
+      flex-direction: column;
+      justify-content: flex-start;
+      align-items: center;
+    }
+
+    .line {
+      width: 95%;
+      display: flex;
+      flex-direction: row;
+      justify-content: center;
+      align-items: center;
+      margin-top: 15px;
+    }
+
+    .label {
+      width: 100px;
+      margin-right: 10px;
+      text-align: right;
+    }
+
+    .btn-area {
+      width: 90%;
+      display: flex;
+      flex-direction: row;
+      justify-content: left;
+      align-items: center;
+      margin-top: 15px;
+      margin-bottom: 20px;
+    }
+  </style>
+  <body onload="onLoad()">
+    <div class="container">
+      <div class="line">
+        <div class="label">区块: </div>
+        <div class="input-group">
+          <div class="input-group-prepend">
+            <span class="input-group-text" id="basic-addon1">#</span>
+          </div>
+          <input id="block" type="number" class="form-control" placeholder="block number" aria-label="block" value="1"
+            onchange="calc()">
+        </div>
+      </div>
+      <div class="line">
+        <div class="label">随机数: </div>
+        <div class="input-group">
+          <input id="random" type="number" class="form-control" placeholder="random number" aria-label="random" value="0"
+            onchange="calc()">
+        </div>
+      </div>
+      <div class="line" style="align-items: flex-start;">
+        <div class="label">数据: </div>
+        <textarea id="data" class="form-control" aria-label="With textarea" style="min-height: 150px;" onchange="calc()"></textarea>
+      </div>
+      <div class="line">
+        <div class="label">SHA256: </div>
+        <div class="input-group">
+          <textarea id="hash" type="text" class="form-control" placeholder="hash number" aria-label="hash" disabled="true"
+            style="word-break:break-all;word-wrap:break-all;resize:unset;"></textarea>
+        </div>
+      </div>
+      <div class="line">
+        <div class="label">前几位为0?</div>
+        <div class="input-group">
+          <input id="int" type="number" class="form-control" placeholder="int" aria-label="int" value="3">
+        </div>
+      </div>
+      <div class="btn-area">
+        <button id="btn" onclick="start()" type="button" class="btn btn-success">Start!</button>
+      </div>
+    </div>
+  </body>
+</html>

+ 98 - 0
pages/hash/index.js

@@ -0,0 +1,98 @@
+var block = 1;
+var random = 0;
+var data = "Hello World";
+var int = 3;
+var hash = "NULL";
+
+function repeat(src, n) {
+  return new Array(n + 1).join(src);
+}
+
+function writeLocal() {
+  json = `{"block": "${block}", "random": "${random}", "data": "${data}", "int": "${int}", "hash": "${hash}"}`;
+  localStorage.calc_hash = json;
+  document.getElementById("block").value = block;
+  document.getElementById("random").value = random;
+  document.getElementById("data").value = data;
+  document.getElementById("int").value = int;
+  document.getElementById("hash").value = hash;
+}
+
+function readLocal() {
+  json = localStorage.calc_hash;
+  if (json != null) {
+    json = JSON.parse(json);
+  } else {
+    json = null;
+  }
+  console.log(json);
+  return json;
+}
+
+function calc() {
+  block = document.getElementById("block").value;
+  random = document.getElementById("random").value;
+  data = document.getElementById("data").value;
+  var input = `block=${block};random=${random};data=${data}`;
+  var output = CryptoJS.SHA256(input);
+  hash = output.toString(CryptoJS.enc.Hex).toUpperCase();
+  document.getElementById("block").value = block;
+  document.getElementById("random").value = random;
+  document.getElementById("data").value = data;
+  document.getElementById("hash").value = hash;
+}
+
+function start() {
+  block = document.getElementById("block").value;
+  random = document.getElementById("random").value;
+  data = document.getElementById("data").value;
+  int = Number(document.getElementById("int").value);
+  if (int < 2) {
+    alert("取0的个数太少了!");
+    int = 2;
+    document.getElementById("int").value = int;
+    return;
+  } else if (int > 9) {
+    alert("取0的个数太多了!\n你想让你的计算机燃烧吗??");
+    int = 4;
+    document.getElementById("int").value = int;
+    return;
+  }
+  random = 0;
+  var now, target, input, output;
+  target = repeat("0", int);
+  document.getElementById("random").value = "0";
+  document.getElementById("hash").value = "计算中...\n计算量过大页面会卡死...";
+  setTimeout(() => {
+    while (now != target) {
+      input = `block=${block};random=${random};data=${data}`;
+      output = CryptoJS.SHA256(input);
+      hash = output.toString(CryptoJS.enc.Hex);
+      now = hash.slice(0, int);
+      console.log(now);
+      random += 1;
+    }
+    random -= 1;
+    hash = hash.toUpperCase();
+    writeLocal();
+  }, 500);
+}
+
+function onLoad() {
+  localData = readLocal();
+  if (localData != null) {
+    block = localData.block;
+    random = localData.random;
+    data = localData.data;
+    int = localData.int;
+    hash = localData.hash;
+    document.getElementById("block").value = block;
+    document.getElementById("random").value = random;
+    document.getElementById("data").value = data;
+    document.getElementById("int").value = int;
+    document.getElementById("hash").value = hash;
+  } else {
+    writeLocal();
+    calc();
+  }
+}

+ 48 - 0
redirectClock.js

@@ -0,0 +1,48 @@
+var stopTime;
+
+function startTimer() {
+  var today = new Date();
+  stopTime = today.getTime() + 120 * 1000;
+  console.log("Timer start.");
+}
+
+function nowTime() {
+  Date.prototype.Format = function (fmt) {
+    var o = {
+      "M+": this.getMonth() + 1, //月份
+      "d+": this.getDate(), //日
+      "h+": this.getHours(), //小时
+      "m+": this.getMinutes(), //分
+      "s+": this.getSeconds(), //秒
+      "q+": Math.floor((this.getMonth() + 3) / 3), //季度
+      S: this.getMilliseconds(), //毫秒
+    };
+    if (/(y+)/.test(fmt))
+      fmt = fmt.replace(
+        RegExp.$1,
+        (this.getFullYear() + "").substr(4 - RegExp.$1.length)
+      );
+    for (var k in o)
+      if (new RegExp("(" + k + ")").test(fmt))
+        fmt = fmt.replace(
+          RegExp.$1,
+          RegExp.$1.length == 1
+            ? o[k]
+            : ("00" + o[k]).substr(("" + o[k]).length)
+        );
+    return fmt;
+  };
+  var nowdate = new Date().Format("yyyyMM");
+  var nowtime = new Date().Format("yyyy-MM-dd  hh:mm:ss");
+  document.getElementById("nowTime").innerHTML = "" + nowtime;
+  setTimeout(nowTime, 500);
+}
+
+function toClipboard() {
+  var text = document.getElementById("nowTime").innerText;
+  var input = document.getElementById("textarea");
+  input.value = text;
+  input.select();
+  document.execCommand("copy");
+  alert("复制成功");
+}