CyperHackedChecker

Checks if the user has been hacked

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         CyperHackedChecker
// @namespace    http://cypher.extremecast.com/
// @version      1.0
// @description  Checks if the user has been hacked
// @author       CobraAn
// @match        http://cypher.extremecast.com/main/main.php
// @require 	 http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js
// @grant    	 GM_addStyle
// ==/UserScript==

// ALFA VERSION

var myTimer = null;

$(document).ready(function() {
    $('body').append('<input type="button" value="Begin" id="CP">')
      $("#CP").css("position", "fixed").css("top", 0).css("left", 0);
      $('#CP').click(function(){ 
          myTimer = setInterval(function() {
            $.ajax ( {
                type:       'GET',
                url:        window.location.href,
                dataType:   'HTML',
                success:    function (apiJson) {
                    var resultObj = apiJson;
                    var str = apiJson.search("trace not completed");
                    if (str != -1 && readCookie('hackedstrcookie') == null) {
                        alert (
                           'HACKED!'
                        );
                        document.cookie = 'hackedstrcookie=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/'
                        document.cookie = 'hackedstrcookie='+str+'; expires=Thu, 2 Aug 2020 20:47:11 UTC; path=/'
                        
                    } 
                    
                }
            } );
        }, 5000);
      });
    $('body').append('<input type="button" value="Stop" id="CS">')
      $("#CS").css("position", "fixed").css("top", 20).css("left", 0);
      $('#CS').click(function(){ 
          clearInterval(myTimer);
      });
});

function readCookie(name) {
    var nameEQ = name + "=";
    var ca = document.cookie.split(';');
    for(var i=0;i < ca.length;i++) {
	var c = ca[i];
	while (c.charAt(0)==' ') c = c.substring(1,c.length);
	if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
    }
    return null;
};