SH Tools

ip/bank account remover, filter IPs for easier copying

2017/01/10のページです。最新版はこちら

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

You will need to install an extension such as Tampermonkey to install this script.

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name           SH Tools
// @description    ip/bank account remover, filter IPs for easier copying
// @include        http://www.slavehack.com/index2.php*
// @version        1.0
// @grant		   none
// @namespace https://greasyfork.org/users/93760
// ==/UserScript==

// add ips or accounts you want to mask ["123.123.123.123","123665"]
var myip = ["1.1.1.1", "123665"];
//what to change the above to.
var mask = "localhost";

if (document.getElementById("editlog")){ // If log file on page
  for(x = 0; x < myip.length; x++){
    if (document.getElementById("editlog").innerHTML.match(myip[x])){ //Filtered list found in logs
        var logFile = document.getElementById("editlog");
        var events = logFile.innerHTML.split("\n");
        var replacement = "";
        for (i = 0; i < events.length; i++){
            events[i] = events[i].replace(myip[x], mask);
            replacement = replacement + events[i] + "\n";
        }
        logFile.innerHTML = replacement;
        document.getElementById("editlog").parentNode.submit()
    }  
  }
  
  //This removes all text and leaves IPs
  var listButton = document.createElement("input");
  listButton.setAttribute("type","button")
  listButton.setAttribute("class","form")
  listButton.setAttribute("value","List Address")
  listButton.setAttribute("id","listButton")
  document.getElementById("editlog").parentNode.appendChild(listButton, document.getElementById("editlog"));
  document.getElementById("listButton").addEventListener("click", list, true);
  
  //Empties log
  var listButton = document.createElement("input");
  listButton.setAttribute("type","button")
  listButton.setAttribute("class","form")
  listButton.setAttribute("value","Clear Log")
  listButton.setAttribute("id","clearButton")
  document.getElementById("editlog").parentNode.appendChild(listButton, document.getElementById("editlog"));
  document.getElementById("clearButton").addEventListener("click", clear, true);
}

function list(){
    var events = document.getElementById("editlog").innerHTML.split("\n");
    var replacement = "";
    for (i = 0; i < events.length; i++){
        ipaddr = events[i].match(/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/)
        if (ipaddr){
            replacement = replacement + ipaddr + "\n";
        }
        document.getElementById("editlog").innerHTML = replacement;
    }
}

function clear(){
  document.getElementById("editlog").innerHTML = "";
  document.getElementById("editlog").parentNode.submit()
}