分类 默认分类 下的文章

CentOS6.x可用的rpmforge镜像源(清华大学镜像源)

https://mirrors.tuna.tsinghua.edu.cn/repoforge/redhat/el6/en/x86_64/rpmforge/RPMS/

Download the latest rpmforge-release rpm from
https://mirrors.tuna.tsinghua.edu.cn/repoforge/redhat/el6/en/x86_64/rpmforge/RPMS/
Install rpmforge-release rpm:
# rpm -Uvh rpmforge-release*rpm
Example:Then Install package rpm package:
# yum install xxxx

参考链接:
https://mirrors.tuna.tsinghua.edu.cn/help/repoforge/
https://centos.pkgs.org/6/repoforge-x86_64/aria2-1.14.1-1.el6.rf.x86_64.rpm.html
http://mirrorlist.repoforge.org/
http://mirror-status.repoforge.org/
http://ftp.tu-chemnitz.de/pub/linux/dag/redhat/el6/en/x86_64/rpmforge/RPMS/
https://mirrors.tuna.tsinghua.edu.cn/#


扫描二维码,在手机上阅读!

Bat自动获取管理员权限执行命令

在你的bat文件最顶部加入以下代码。

========================================

 @echo off

:: BatchGotAdmin
:-------------------------------------
REM  --> Check for permissions
    IF "%PROCESSOR_ARCHITECTURE%" EQU "amd64" (
>nul 2>&1 "%SYSTEMROOT%\SysWOW64\cacls.exe" "%SYSTEMROOT%\SysWOW64\config\system"
) ELSE (
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
)

REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
    echo Requesting administrative privileges...
    goto UACPrompt
) else ( goto gotAdmin )

:UACPrompt
    echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
    set params = %*:"=""
    echo UAC.ShellExecute "cmd.exe", "/c ""%~s0"" %params%", "", "runas", 1 >> "%temp%\getadmin.vbs"

    "%temp%\getadmin.vbs"
    del "%temp%\getadmin.vbs"
    exit /B

:gotAdmin
    pushd "%CD%"
    CD /D "%~dp0"
:--------------------------------------    

==============================================

另外一种选择,安装Windows下sudo可执行文件,用sudo调用命令和脚本文件。
该程序由go语言开发

go get github.com/mattn/sudo
Then

sudo Example1Server.exe

https://github.com/mattn/sudo


扫描二维码,在手机上阅读!

PHPCMSv9忘记后台用户名的解决办法。

首先进phpmyadmin查看 v9_admin(v9_为表前缀,替换成自己的)数据表的 要恢复的管理员用户名对应的encrypt数值。

QQ截图20170226151319.jpg

在Bash 终端下执行以下命令获取使用新密码加密后的Hash数值。这里新密码以123456示例。

echo -n 123456|md5sum|cut -d ' ' -f1|awk '{print $0"GrFE7Z"}'|xargs -i echo -n {}|md5sum

QQ截图20170226151708.jpg


扫描二维码,在手机上阅读!

批量检测关键词360收录的Shell脚本

开始之前准备关键词文本,一行一个:
例子:
20170210193225.png

#!/bin/bash
allnum=0
findnum=0
#if [[ $1 == "" ]];
#then
#out="ok.txt"
#else
#out=$1
#fi
file=$1
cat $1|( while read line;
do
    let allnum+=1
    #echo $a
    #echo $line
    #url=`echo $line|awk -F '\t' '{print $1}'`
    #echo $url
    #line=`echo $line|awk -F '\t' '{print $2}'`
    line=`echo $line|sed 's/[\r\n\t]//g'`
    oldquery=$line
    line=${line// /%20}
    #echo $line
querynum=`curl -s "https://www.so.com/s?q=$line&src=srp&fr=360sou_newhome"|grep -c '抱歉,未找到'`
#echo $querynum
if [[ $querynum != 1 ]];then
  let findnum+=1
  echo -e "$oldquery   已收录\r" 
fi
done
echo -e "查询总数:$allnum,收录数量: $findnum" )

扫描二维码,在手机上阅读!

xbwSEO小霸王蜘蛛池system.js解码修改文件

将下面的代码替换 static/js/system.js 即可

修改后的JS文件下载:system.js

    $(function() {
    $("a").bind("focus",
    function() {
        this.blur && this.blur();
    });
    $("a.pageload,.left_link a").click(function() {
        page_loading();
    });
    $("#admin_sub_title a").click(function() {
        var a = $(this).attr("href").toLowerCase();
        top.$("#left ul.dis a").each(function(b) {
            $(this).attr("href").toLowerCase() == a && top.$(".left_link_over").attr("class", "left_link") && $(this).parent().attr("class", "left_link_over");
        });
    });
});
page_loading_close();
var cookiepre = "xbwseo_",
cookiedomain = "",
cookiepath = "/",
licencetip = true;
editoption = {
    resizeType: 1,
    allowPreviewEmoticons: false,
    allowImageUpload: true,
    imageSizeLimit: UPLOAD_MAX_FILESIZE,
    uploadJson: "?g=plus&m=editor&a=upload&PHPSID=" + PHPSESSID,
    fileManagerJson: "?g=plus&m=editor&a=fileManager",
    allowFileManager: true,
    langType: "zh_CN",
    items: "source preview | undo redo | fontname fontsize forecolor hilitecolor bold italic underline removeformat | justifyleft justifycenter justifyright | image multiimage baidumap | link unlink insertfile fullscreen page".split(" ")
};
function showimg(a, b, c) {
    c && (c = "?", -1 < a.indexOf("?") && (c = "&"), a += c + "_t=" + Math.random());
    top.art.dialog({
        id: "showimg",
        lock: 1,
        opacity: 0.1,
        title: b ? b: "查看图片",
        content: "<img src=\"" + a + "\" onload=\"top.art.dialog.list['showimg']._reset();\" id=\"showimg\" />"
    });
}
function classCutover(a, b, c) {
    c = isUndefined(c) ? 10 : c;
    for (i = 1; i <= c; i++) {
        $(a + "_" + i).hide();
    }
    $(a + "_" + b).show();
}
var showDialogST = null;
function showDialog(a, b, c, d, e, f, g, k, h, l, m) {
    clearTimeout(showDialogST);
    e = isUndefined(e) ? "info" == b ? false: true: e;
    g = isUndefined(g) ? "": g;
    b = in_array(b, ["confirm", "notice", "info", "success"]) ? b: "error";
    var n = $(".art_dialog");
    if (isUndefined(a)) {
        return art.dialog({
            id: "art_dialog"
        });
    }
    oktxtdefault = "确定";
    l = isUndefined(l) ? null: l;
    closefunc = function() {
        "function" == typeof d ? d() : eval(d);
    };
    l && (g = "<span id=\"closetime\">" + l + "</span> 秒后窗口关闭<script>lastNum(\"closetime\"," + l + ")</script>", showDialogST = setTimeout(closefunc, 1000 * l));
    if (m = isUndefined(m) ? "": m) {
        g = "<span id=\"locationtime\">" + m + "</span> 秒后页面跳转<script>lastNum(\"locationtime\"," + m + ")</script>",
        showDialogST = setTimeout(closefunc, 1000 * m);
    }
    k = k ? k: oktxtdefault;
    h = h ? h: "取消";
    n && art.dialog({
        id: "art_dialog"
    }).close();
    leftfunc = function() {
        g && $("<span style=\"color: #999999;float: left;line-height: 25px;\">" + g + "</span>").prependTo(".aui_dialog .aui_footer .aui_buttons");
    };
    art.dialog({
        id: "art_dialog",
        title: c ? c: "提示信息",
        time: l,
        opacity: 0.3,
        lock: e,
        content: a,
        icon: "info" == b ? "": b,
        init: leftfunc,
        okVal: k,
        ok: "info" == b ? false: function() {
            "function" == typeof d ? d() : eval(d);
        },
        cancelVal: h,
        cancel: "confirm" != b ? false: function() {
            "function" == typeof f ? f() : eval(f);
        }
    });
}
function lastNum(a, b) {
    document.getElementById(a).innerHTML = b;
    if (1 == b) {
        return false;
    }
    b--;
    setTimeout("lastNum('" + a + "'," + b + ")", 1000);
}
function showAlert(a, b, c, d) {
    b = b.replace(/<script[^\>]*?>([^\x00]*?)<\/script>/gi, "");
    d = d ? d: 2;
    "null" == d && (d = null);
    "" !== b && (c ? showDialog(b, a, null, "location.href=\"" + c + "\";", 1, null, null, null, null, 2, 1) : showDialog(b, a, null, true, true, null, null, null, null, d));
}
function description(a) {
    document.write("<a href=\"javasctipt:\" onclick=\"showDialog('" + a + "','confirm');\"><img src=\"static/images/description.png\" title=\"点击查看此选项说明\" /></a>");
}
function showWindow(a, b, c, d, e) {}
var lastCtrl = {};
function selemenu(a) {
    $(".left_link_over").attr("class", "left_link");
    a.className = "left_link_over";
    lastCtrl = a;
}
function selectTab(a, b) {
    var c = $("#admin_sub_title")[0].getElementsByTagName("li"),
    d = c.length;
    for (i = 0; i < d; i++) {
        c[i].className = "unsub";
    }
    b.parentNode.className = "sub";
    for (i = 0; j = $("#config" + i)[0]; i++) {
        j.style.display = "none";
    }
    $("#" + a)[0].style.display = "";
}
function checkselect(a, b) {
    for (var c = a.checked ? true: false, d = 0; d < b.length; d++) {
        b.all[d].selected = c;
    }
}
function isUndefined(a) {
    return "undefined" == typeof a ? true: false;
}
function in_array(a, b) {
    if ("string" == typeof a || "number" == typeof a) {
        for (var c in b) {
            if (b[c] == a) {
                return true;
            }
        }
    }
    return false;
}
function trim(a) {
    return (a + "").replace(/(\s+)$/g, "").replace(/^\s+/g, "");
}
function strlen(a) {
    return BROWSER.ie && -1 != a.indexOf("\n") ? a.replace(/\r?\n/g, "_").length: a.length;
}
function mb_strlen(a) {
    for (var b = 0,
    c = 0; c < a.length; c++) {
        b += 0 > a.charCodeAt(c) || 255 < a.charCodeAt(c) ? "utf-8" == charset ? 3 : 2 : 1;
    }
    return b;
}
function mb_cutstr(a, b, c) {
    var d = 0,
    e = "";
    c = c ? c: "...";
    b -= c.length;
    for (var f = 0; f < a.length; f++) {
        d += 0 > a.charCodeAt(f) || 255 < a.charCodeAt(f) ? "utf-8" == charset ? 3 : 2 : 1;
        if (d > b) {
            e += c;
            break;
        }
        e += a.substr(f, 1);
    }
    return e;
}
function preg_replace(a, b, c, d) {
    d = d ? d: "ig";
    for (var e = a.length,
    f = 0; f < e; f++) {
        re = new RegExp(a[f], d),
        c = c.replace(re, "string" == typeof b ? b: b[f] ? b[f] : b[0]);
    }
    return c;
}
function htmlspecialchars(a) {
    return preg_replace(["&", "<", ">", "\""], ["&", "<", ">", "\""], a);
}
function display(a) {
    a = $(a);
    a.style.visibility ? (a.style.visibility = "visible" == a.style.visibility ? "hidden": "visible") : (a.style.display = "" == a.style.display ? "none": "");
}
function checkall(a, b, c) {
    c = c ? c: "chkall";
    for (var d = count = 0; d < a.elements.length; d++) {
        var e = a.elements[d];
        e.name && e.name != c && !e.disabled && (!b || b && e.name.match(b)) && (e.checked = a.elements[c].checked, e.checked && count++);
    }
    return count;
}
function setcookie(a, b, c, d, e, f) {
    var g = new Date;
    if ("" == b || 0 > c) {
        b = "",
        c = -2592000;
    }
    g.setTime(g.getTime() + 1000 * c);
    e = e ? e: cookiedomain;
    d = d ? d: cookiepath;
    document.cookie = escape(cookiepre + a) + "=" + escape(b) + (g ? "; expires=" + g.toGMTString() : "") + (d ? "; path=" + d: "/") + (e ? "; domain=" + e: "") + (f ? "; secure": "");
}
function getcookie(a, b) {
    a = cookiepre + a;
    var c = document.cookie.indexOf(a),
    d = document.cookie.indexOf(";", c);
    if ( - 1 == c) {
        return "";
    }
    c = document.cookie.substring(c + a.length + 1, d > c ? d: document.cookie.length);
    return b ? c: unescape(c);
}
function urlencode(a) {
    var b, c, d = "";
    for (b = 0; b < a.length; b++) {
        c = a.charCodeAt(b).toString(16),
        d += "%" + c;
    }
    return d;
}
function urldecode(a) {
    var b, c = a.split("%");
    for (a = 1; a < c.length; a++) {
        b += String.fromCharCode(parseInt(c[a], 16));
    }
    return b;
}
function bytesToSize(a) {
    if (0 === a) {
        return "0 B";
    }
    var b = Math.floor(Math.log(a) / Math.log(1000));
    return (a / Math.pow(1000, b)).toPrecision(3) + " " + "B KB MB GB TB PB EB ZB YB".split(" ")[b];
}
function get_line_count(a, b) {}
function upload(a, b, c, d, e) {
    var f = $(a),
    g = $(".uploader-list", f),
    k = $(".uploadbtn", f),
    h;
    b = b ? b: "txt";
    "undefined" == d && (d = "");
    $accept = {
        txt: {
            title: "TXT文件",
            extensions: "txt",
            mimeTypes: "text/*"
        },
        image: {
            title: "图片文件",
            extensions: "jpg,jpeg,png,gif,bmp",
            mimeTypes: "image/*"
        }
    };
    a = {
        resize: false,
        auto: false,
        swf: "./static/js/webuploader/uploader.swf",
        formData: {
            PHPSID: PHPSESSID,
            filename: c ? c: "",
            filetype: b,
            dirname: d
        },
        server: "?admin-tools-webuptxt",
        accept: $accept[b],
        pick: {
            id: $(a + " .picker"),
            multiple: "" != d ? true: false
        }
    };
    h = WebUploader.create(a);
    k.on("click",
    function() {
        if ($(this).hasClass("disabled")) {
            return false;
        }
        if ("" == h.getFiles() || "undefined" == h.getFiles()) {
            return showAlert("error", "请先选择文件"),
            false;
        }
        k.removeClass("disabled").addClass("disabled");
        h.upload();
    });
    g.on("click", ".file-item-close",
    function() {
        $parent = $(this).parent();
        $file = h.getFile($parent.attr("id"));
        h.removeFile($file, true);
        $parent.remove();
    });
    h.on("fileQueued",
    function(a) {
        g.append("<div id=\"" + a.id + "\" class=\"file-item\"><span class=\"file-item-close\">x</span><span class=\"tt name\">" + a.name + "</span><span class=\"tt size\">" + bytesToSize(a.size) + "</span><span class=\"tt status\">等待上传...</span></div>");
    });
    h.on("uploadProgress",
    function(a, b) {
        var c = $("#" + a.id, f),
        d = c.find(".progress .progress-bar");
        d.length || (d = $("<div class=\"progress\"><div class=\"progress-bar\" style=\"width: 0%;\"></div></div>").appendTo(c).find(".progress-bar"));
        c.find("span.status").html("上传中<span class=\"progress-text\"></span>");
        c.find("span.progress-text").text(100 * b + "%");
        d.css("width", 100 * b + "%");
    });
    h.on("uploadSuccess",
    function(a) {
        $("#" + a.id, f).find("span.status").html("<font color=\"green\">上传成功</font>");
        $("#" + a.id, f).addClass("file-item-success");
        k.removeClass("retry");
        "function" == typeof e ? e() : e && eval(e);
    });
    h.on("uploadError",
    function(a) {
        $("#" + a.id, f).find("span.status").html("<font color=\"red\">上传失败</font>");
        $("#" + a.id, f).addClass("file-item-error");
        k.addClass("retry").text("重新上传");
        $("button.retry", f).on("click",
        function() {
            $("#" + a.id, f).removeClass("file-item-error");
            h.retry();
        });
    });
    h.on("uploadAccept",
    function(a, b) {
        if (b.status) {
            return true;
        }
        alert(b.info);
        return false;
    });
    h.on("uploadComplete",
    function(a) {
        k.removeClass("disabled");
    });
}
function page_loading(a) {
    a || (a = "数据加载中...");
    top.$(".page_loading").remove();
    top.$("#right").css({
        opacity: 0.8
    });
    top.$("body").append("<div class=\"page_loading\"><span onclick=\"page_loading_close();\" class=\"page_close\">\xD7</span><img src=\"./static/images/page_loading.gif\"/>  <span>" + a + "</span></div>");
}
function page_loading_close() {
    top.$(".page_loading").remove();
    top.$("#right").css({
        opacity: 1
    });
}
var thisurl = document.location.href,
hostname = encodeURIComponent(window.location.hostname);
/* 
if (thisurl.indexOf("txtdata") > -1 || thisurl.indexOf("robot") > -1 || thisurl.indexOf("config") > -1) {
    if (hostname != "zhizhuchi.cm") {
        $.getScript("http://www.xbwseo.com/update.php?ajax=1&m=check&a=licence&type=" + viptype + "&vs=" + vipver + "&code=" + vipcode + "&host=" + hostname);
    }
}
var updatetips;
function update_check() {
    $.ajax({
        url: "http://www.xbwseo.com/update.php?ajax=1&m=check&a=update&type=" + viptype + "&vs=" + vipver + "&code=" + vipcode + "&host=" + hostname,
        dataType: "jsonp",
        timeout: 5000,
        success: function(a) {
            1 == a.status && (updatetips = art.dialog.notice({
                title: "升级提示",
                width: 220,
                lock: true,
                content: "<div style=\"border-bottom: 1px solid #eee;border-top: 1px solid #eee;text-align: left;padding:10px;margin-bottom:10px;font-size:13px;max-width:300px;height:180px;overflow:auto;background:#f8f8f8;line-height:22px;\">" + a.msg + "</div><a class=\"button\" href=\"?admin-update-index\" target=\"main\">前往升级</a>   <a class=\"button button_grey\" href=\"javascript:\" onclick=\"setcookie('updatetips','0',(3600*24));updatetips.close();\">不再提示</a></p>",
                time: 0
            }));
        }
    });
} 
*/
jQuery.download = function(a, b, c) {
    if (b) {
        b = "string" == typeof b ? b: jQuery.param(b);
        var d = "";
        jQuery.each(b.split("&"),
        function() {
            var a = this.split("=");
            d += "<input type=\"hidden\" name=\"" + a[0] + "\" value=\"" + a[1] + "\" />";
        });
    } else {
        d = "<input type=\"hidden\" name=\"d\" value=\"" + (new Date).getMilliseconds() + "\" />";
    }
    jQuery("<form action=\"" + a + "\" method=\"" + (c || "post") + "\">" + d + "</form>").appendTo("body").submit().remove();
};
art.dialog.notice = function(a) {
    var b = a || {},
    c, d, e, f, g;
    a = {
        id: "Notice",
        left: "100%",
        top: "100%",
        fixed: true,
        drag: false,
        resize: false,
        follow: null,
        lock: false,
        init: function(a) {
            c = this;
            d = c.config;
            f = c.DOM.wrap;
            g = parseInt(f[0].style.top);
            e = g + f[0].offsetHeight;
            f.css("top", e + "px").animate({
                top: g + "px"
            },
            800,
            function() {
                b.init && b.init.call(c, a);
            });
        },
        close: function(a) {
            f.animate({
                top: e + "px"
            },
            800,
            function() {
                b.close && b.close.call(this, a);
                d.close = $.noop;
                c.close();
            });
            return false;
        }
    };
    for (var k in b) {
        a[k] = b[k];
    }
    return artDialog(a);
};
artDialog.fn.shake = function() {
    var a = this.DOM.wrap[0].style,
    b = [4, 8, 4, 0, -4, -8, -4, 0],
    b = b.concat(b.concat(b));
    timerId = setInterval(function() {
        a.marginLeft = b.shift() + "px";
        0 >= b.length && (a.marginLeft = 0, clearInterval(timerId));
    },
    13);
    return this;
};
function lock_page() {
    $("input").attr("disabled", "disabled");
    $("textarea").attr("disabled", "disabled");
}
function licence_die(a) {
    top.art.dialog({
        content: "<div id=\"licence-box\"><p>《<font color=\"green\">小霸王万能蜘蛛池</font>》为商业程序,需购买授权才能使用</p><p>请输入授权码:(<a href=\"http://www.xbwseo.com\" target=\"_blank\"><font color=\"red\">点击在线购买</font></a>)</p><p><textarea name=\"code\" class=\"inputs\" id=\"licence-code\"></textarea></p><p id=\"licence-msg\"></p></div>",
        fixed: true,
        esc: false,
        title: "请输入授权码",
        lock: true,
        id: "licencebox",
        okVal: "提交授权",
        init: function() {
            showAlert("error", "dsmsg", "", "null");
            1 > top.$("#dialog_foot").length && top.$("<span style=\"float: left;line-height: 25px;\" id=\"dialog_foot\">客服QQ:<a href=\"http://wpa.qq.com/msgrd?v=3&uin=996948519&site=qq&menu=yes\" target=\"_blank\"><font color=\"red\">996948519</font></a> 官网:<a href=\"http://www.xbwseo.com\" target=\"_blank\"><font color=\"red\">xbwseo.com</font></a></span>").prependTo(".aui_dialog .aui_footer .aui_buttons");
        },
        ok: function() {
            var a = $("#licence-code"),
            c = this;
            $.ajax({
                url: "?admin-index-licence",
                type: "post",
                data: "code=" + $.trim(a.val()),
                success: function(d) {
                    1 == d.status ? (alert("授权成功!"), top.location.reload()) : (c.shake && c.shake(), a.select(), a.focus(), $("#licence-msg").html(d.info).show().fadeOut(3000));
                }
            });
            return false;
        },
        cancel: false
    });
    return true;
}
function licence_lock(a) {
    licencetip = true;
    top.art.dialog({
        content: "<div id=\"licence-box\"><p>" + a + "</p></div>",
        fixed: true,
        esc: false,
        title: "提示信息",
        lock: true,
        id: "nolicencebox",
        okVal: "确定",
        icon: "face-sad",
        init: function() {
            1 > top.$("#dialog_foot").length && top.$("<span style=\"float: left;line-height: 25px;\" id=\"dialog_foot\">客服QQ:<a href=\"http://wpa.qq.com/msgrd?v=3&uin=996948519&site=qq&menu=yes\" target=\"_blank\"><font color=\"red\">996948519</font></a> 官网:<a href=\"http://www.xbwseo.com\" target=\"_blank\"><font color=\"red\">xbwseo.com</font></a></span>").prependTo(".aui_dialog .aui_footer .aui_buttons");
        },
        ok: function() {
            window.open("http://www.xbwseo.com/", "newwin");
            return false;
        },
        cancel: false
    });
    $.ajax({
        url: "?admin-index-licence"
    });
}

扫描二维码,在手机上阅读!
Title - Artist
0:00