SH Tools

ip/bank account remover, filter IPs for easier copying

2017-01-10 या दिनांकाला. सर्वात नवीन आवृत्ती पाहा.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==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()
}