// ==UserScript== // @name IP Hunter by John2x2016 of VPN5 // @namespace http://www.symbianize.com/showthread.php?t=1397083 // @version 2.1 // @description This userscript automatically reconnects the mobile data for some HUAWEI modems until it connects to a matching IP address. // @author John2x2016 of VPN5 // @icon http://www.symbianize.com/images/symb_avatars/avatar456082_9.gif // @match http://192.168.8.1/html/home.html // @match http://192.168.1.1/html/home.html // @match http://192.168.254.254/html/home.html // @match http://192.168.22.1/html/home.html // @grant none // @downloadURL none // ==/UserScript== /* * IP Hunter of VPN5 * http://vpn5.net * * THIS WORK IS COPYRIGHT PROTECTED * http://www.copyrighted.com/copyrights/view/v6tm-qzys-ym79-9saw * * MODIFYING THE TOOL FOR YOUR PERSONAL USE IS PERMITTED * HOWEVER, RE-BRANDING OR REMOVING THIS COPYRIGHT NOTICE IS NOT ALLOWED. * * IF YOU HAVE ANY SUGGESTIONS TO IMPROVE THIS TOOL, * YOU CAN PM ME ON SYMBIANIZE OR ON FACEBOOK. */ ! function() { "use strict"; function t(t) { console.log(t), setTimeout(function() { var e = $("#ip_hunter_log")[0]; e.value += "\n" + t, e.scrollTop = e.scrollHeight }, 200) } function e() { t("Scanning..."), getAjaxData("api/monitoring/status", function(a) { var o = xml2object(a); if ("response" == o.type) { var i = o.response.WanIPAddress, r = !1; i && "" !== i ? (console.info("Current IP: ", i), t("Current IP: " + i), s.split(";").forEach(function(e, a) { !i.startsWith(e) || i.startsWith("10.116") && i.startsWith("100.116") || (r = !0, t("Matched with pattern: " + e)), a + 1 === s.split(";").length && (r ? (t("IP (" + i + ") is valid."), t("Edited by: John2x2016 of VPN5"), t("Hunting successful connect to VPN5 now!!")) : (t("Reconnecting..."), n())) })) : setTimeout(function() { e() }, 3e3) } }, { sync: !0 }) } function n() { g_network_action = { dataswitch: "0" }, saveAjaxData("api/dialup/mobile-dataswitch", object2xml("request", g_network_action), function(n) { var a = xml2object(n); "OK" == a.response && setTimeout(function() { g_network_action = { dataswitch: "1" }, saveAjaxData("api/dialup/mobile-dataswitch", object2xml("request", g_network_action), function(n) { xml2object(n); t("Connected!!!"), setTimeout(function() { e() }, 3e3) }) }, 3e3) }) } var a = []; "undefined" == typeof jQuery && a.push("jQuery"), "undefined" == typeof login && a.push("login"), "undefined" == typeof getAjaxData && a.push("getAjaxData"), "undefined" == typeof saveAjaxData && a.push("saveAjaxData"), "undefined" == typeof xml2object && a.push("xml2object"), "undefined" == typeof object2xml && a.push("object2xml"), a.length > 0 && prompt("SORRY, THIS TOOL CURRENTLY DOESN'T SUPPORT YOUR DASHBOARD.\n\nYOU CAN COPY THE ERROR LOG BELOW AND SEND IT TO THE DEVELOPER:", "undefined:" + a.join(";")); var o = localStorage.iphUsername || "admin", i = localStorage.iphPassword || "", s = localStorage.iphPatterns || "10.;100.11;100.12;100.13;100.14;100.15;100.16;100.17;100.18;100.19;100.2"; $('').val(o).appendTo("body"), $('').val(i).appendTo("body"); var r = $('
').html('