好湿?好紧?好多水好爽自慰,久久久噜久噜久久综合,成人做爰A片免费看黄冈,机机对机机30分钟无遮挡

主頁 > 知識庫 > HTA編輯HOST文件的腳本

HTA編輯HOST文件的腳本

熱門標簽:汕頭外呼crm系統 湖州手機外呼系統 聯通400電話去哪里申請啊 DOTA地圖標注app 徐州客服外呼系統排名 綿陽外呼線路 軟通動力地圖標注專員 百度地圖標注地址有什么影響 五華銷售外呼管理系統電話
HTML>
HEAD>
TITLE>HOSTS 文件編輯器/TITLE>
meta http-equiv="Content-Type" content="text/html; charset=gb2312">
meta http-equiv="Content-Language" content="zh-CN">
HTA:APPLICATION ID="hostedit"
APPLICATIONNAME="hostedit"
BORDER="thick"
BORDERSTYLE="normal"
CAPTION="yes"
ICON="C:\WINDOWS\system32\rasphone.exe" 
MAXIMIZEBUTTON="yes"
MINIMIZEBUTTON="yes"
SHOWINTASKBAR="yes"
SINGLEINSTANCE="yes"
SYSMENU="yes"
VERSION="1.0"
WINDOWSTATE="normal" />
script language="JScript">
window.onerror = function ()
{
    window.alert("程序發生了未知錯誤,當前窗口將被關閉!");
    window.close();
    return true;
}
var windowW=450;    //窗體寬
var windowH=200;    //窗體高
var canresize=false;//是否可以改變大小
var windowW2=windowW;//編輯時窗體寬
var windowH2=200;//編輯時窗體高
window.resizeTo(windowW,windowH);
//window.moveTo((screen.width-windowW)/2,(screen.height-windowH)/2);
window.onresize=function(){if(!canresize)window.resizeTo(windowW,windowH);}
function init()
{
    var ui_table = document.getElementById('UI_TABLE');
    var bestHeight = 70+ui_table.scrollHeight;
    if(bestHeight > screen.height) bestHeight = screen.height;
    window.resizeTo(windowW, bestHeight);
    //window.moveTo((screen.width-windowW)/2,(screen.height-bestHeight)/2);
}
var hostfile = '\\drivers\\etc\\hosts';
function getlist(){
    var html='';
    var ids='';
    var i=1;
    FSO = new ActiveXObject("Scripting.FileSystemObject");
    var spath = FSO.GetSpecialFolder(1)+hostfile;
    host = FSO.OpenTextFile(spath, 1, false);
    while(!host.AtEndOfStream){
         tmp = host.ReadLine();
         if(/^#?\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\s+([a-zA-Z0-9\-]+\.[a-zA-Z0-9\-]+(\.(com|net|org|edu|info|biz|cc|tv|gov|mobi|name|cn|en|us|hk|tw))+)$/.test(tmp))
         {
        as=tmp.replace(/\s+/,'|:|').split('|:|');
        ids+='['+i+'],';
        if(/^\#/.test(as[0])){
            zt = '外網';
            ip = as[0].replace(/^\#/,'');
            co = '#eee!important';
            cz = 'a href="#" style="color:red;" onclick="zh('+i+',0);">切本地/a> | a href="#" style="color:red;" onclick="ed(this,'+i+');">編輯/a> | a href="#" style="color:red;" onclick="zh('+i+',2);">刪除/a>';

        }else{
            zt = '本地';
            ip = as[0];
            co = '#fff!important';
            cz = 'a href="#" onclick="zh('+i+',1);">切外網/a> | a href="#" style="color:red;" onclick="ed(this, '+i+');">編輯/a> | a href="#" style="color:red;" onclick="zh('+i+',2);">刪除/a>';    
        }

            html += 'tr>td style="background:'+co+';">'+zt+'/td>td style="background:'+co+';text-align:left;text-indent:6px;">'+as[1]+'/td>td style="text-align:left;text-indent:6px;background:'+co+';">'+ip+'/td>td style="background:'+co+';">'+cz+'/td>/tr>';
        }
        i++;
    }
    var o=document.getElementById('ids');
    o.value=ids;
    host.Close();
    return html;
}

function ed(eo, iId){    
    document.getElementById('editId').value=iId;
    document.getElementById('pIP').value=eo.parentElement.parentElement.children[2].innerText;
    document.getElementById('pURL').value=eo.parentElement.parentElement.children[1].innerText;
    document.getElementById('addButt').style.display='none';
    document.getElementById('editButt').style.display='inline';
    document.getElementById('HostList').style.display='none';
    document.getElementById('addHost').style.display='block';
    window.resizeTo(windowW2,windowH2);
}

function edits(sIp, sUrl){
    var oi=document.getElementById(sIp);
    var ou=document.getElementById(sUrl);
    if(oi.value=='' || /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(oi.value)==false) {
        alert('IP地址不能為空或你輸入的IP格式錯誤.');
        oi.focus();
        return;
    }
    if(ou.value=='' || /^[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-]+(\.(com|net|org|edu|info|biz|cc|tv|gov|mobi|name|cn|en|us|hk|tw))+$/.test(ou.value)==false) {
        alert('域名不能為空或你輸入的域名格式錯誤.');
        ou.focus();
        return;
    }
    var iId = document.getElementById('editId').value;
    var body='';
    var i=1;
    FSO = new ActiveXObject("Scripting.FileSystemObject");
    var spath = FSO.GetSpecialFolder(1)+hostfile;    
    host = FSO.OpenTextFile(spath, 1, false);
    while(!host.AtEndOfStream){
        tmp = host.ReadLine();
        if(i==iId)
        {
            body+=oi.value+"\t"+ou.value+"\n";
        }
        else{
            body+=tmp+"\n";
        }
        i++;
    }
    host.close();
    svf = FSO.OpenTextFile(spath, 2, false);
    svf.Write(body);
    svf.close();
    window.location.reload();
}

function zh(irs,stype)
{
    var body='';
    var i=1;
    FSO = new ActiveXObject("Scripting.FileSystemObject");
    var spath = FSO.GetSpecialFolder(1)+hostfile;    
    host = FSO.OpenTextFile(spath, 1, false);
    while(!host.AtEndOfStream){
        tmp = host.ReadLine();
        if(i==irs)
        {
            if(stype==0){
                body+=tmp.replace(/^\#/,'');
                body+="\n";
            }else if(stype==1){
                if(/^\#/.test(tmp)){
                    body+=tmp+"\n";
                }else{
                    body+='#'+tmp +"\n";
                }
            }else{

            }
        }
        else{
            body+=tmp+"\n";
        }
        i++;
    }
    host.close();
    svf = FSO.OpenTextFile(spath, 2, false);
    svf.Write(body);
    svf.close();
    window.location.reload();
}

function zhall(stype)
{
    var body='';
    var i=1;
    var ids1=document.getElementById("ids").value;
    if(ids1=='') return;
    FSO = new ActiveXObject("Scripting.FileSystemObject");
    var spath = FSO.GetSpecialFolder(1)+hostfile;    
    host = FSO.OpenTextFile(spath, 1, false);
    while(!host.AtEndOfStream){
        tmp = host.ReadLine();
        if(stype==0  ids1.indexOf('['+i+'],')!== -1){
            body+=tmp.replace(/^\#/,'');
            body+="\n";
        }else if(stype==1  ids1.indexOf('['+i+'],')!== -1){
            if(/^\#/.test(tmp)){
                body+=tmp+"\n";
            }else{
                body+='#'+tmp +"\n";
            }
        }else{
            body+=tmp+"\n";
        }
        i++;
    }
    host.close();
    svf = FSO.OpenTextFile(spath, 2, false);
    svf.Write(body);
    svf.close();
    window.location.reload();
}

function AddHosts(sIp, sUrl){
    var oi=document.getElementById(sIp);
    var ou=document.getElementById(sUrl);
    if(oi.value=='' || /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(oi.value)==false) {
        alert('IP地址不能為空或你輸入的IP格式錯誤.');
        oi.focus();
        return;
    }
    if(ou.value=='' || /^[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-]+\.((net)|(com)|(cn)|(org)|(cc)|(tv))$/.test(ou.value)==false) {
        alert('域名不能為空或你輸入的域名格式錯誤.');
        ou.focus();
        return;
    }

    FSO = new ActiveXObject("Scripting.FileSystemObject");
    var spath = FSO.GetSpecialFolder(1)+hostfile;    
    host = FSO.OpenTextFile(spath, 8, false);
    host.Write("\n"+oi.value+"\t"+ou.value+"\n");
    host.close();
    alert('增加域名成功!');
    window.location.reload();
}
/script>
style>
body{
 background-color:#99CCFF;
}
body *{
    font-size:12px;
    margin:0px;
    padding:0px;
}
.BUTT{
    BORDER: #2C59AA 1px solid;
    FONT-SIZE: 12px;
    COLOR: black;
    FILTER: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#ffffff, EndColorStr=#C3DAF5);
    height:22px;
    padding: 3px 5px 0px;
    text-decoration: none;
}
.edit{
   BORDER: #2C59AA 1px solid;
   padding:1px;
}
#UI_TABLE{
    width:99%;cell-spacing:0px; margin:1px; border-collapse:collapse; border:1px solid #7d7d7d;
}
#UI_TABLE tr.TopTitle{
    text-align:center;
}
#UI_TABLE tr.TopTitle td {
    background-color:#C8E2F7;
}
#UI_TABLE tr td{
    border:1px solid #7d7d7d;text-align:center;padding:1px;
}

/style>
/HEAD>
BODY  onLoad="init()" oncontextmenu="return false;" style="text-align:center; margin:0px;overflow-y:auto;overflow-x:hidden;border:none;background:menu;">
div id="HostList">
    input type="hidden" name="ids"/>
    table id="UI_TABLE" >
        tr class="TopTitle">
            td>狀態/td>
            td style="width:140px;">域名/td>
            td>IP地址/td>
            td style="width:140px;">操作/td>    
        /tr>
        script language="javascript" type="text/JavaScript">
               document.writeln(getlist());
        /script>
    /table>
    div style="margin:6px;text-align:center;">
        input type="button" value="全部切本地" name="b4" onclick="zhall(0);" class="BUTT" />nbsp;nbsp;nbsp;nbsp;
        input type="button" value="全部切外網" name="b5" onclick="zhall(1);" class="BUTT" />nbsp;nbsp;nbsp;nbsp;
        input type="button" value="增加域名" name="b6" onclick="document.getElementById('HostList').style.display='none';document.getElementById('addHost').style.display='block'; window.resizeTo(windowW2,windowH2);" class="BUTT" />
    /div>
/div>
div id="addHost" style="display:none;">
    input type="hidden" name="editId" name="editId" />
    div style="text-align:left;margin:30px auto 0px; width:300px;">IP地址:input type="text" name="pIP" id="pIP" class="edit" />nbsp;nbsp;input type="button" value="127.0.0.1" name="b2" onclick="document.getElementById('pIP').value='127.0.0.1';" class="BUTT" />/div>
    div style="text-align:left;margin:20px auto; width:300px;">域nbsp;nbsp;名:input type="text" name="pURL" id="pURL" class="edit" />/div>
    div style="margin:10px;text-align:center;">
        input type="button" value="提  交" name="b1" id="addButt" onclick="AddHosts('pIp','pURL');" class="BUTT" />nbsp;nbsp;nbsp;nbsp;
        input type="button" value="編  輯" name="b2" id="editButt" style="display:none;" onclick="edits('pIp','pURL');" class="BUTT" />nbsp;nbsp;nbsp;nbsp;
        input type="button" value="返  回" name="b3" onclick="window.location.reload();" class="BUTT" />
    /div>
/div>


script>
//屏蔽部分鍵盤操作,比如 F5
function document.onkeydown()
{wek=window.event.keyCode;
if((window.event.altKey)((wek==37)||(wek==39)))
{window.alert("Error:Invalid operation!");event.returnValue=false;}
if((wek==116)||(event.ctrlKeywek==82))
{window.event.keyCode=0;event.returnValue=false;}
if((event.ctrlKey)(wek==78))
event.returnValue=false;
if((event.shiftKey)(wek==121))
event.returnValue=false;
if(window.event.srcElement.tagName=="A"window.event.shiftKey)
window.event.returnValue=false;
if((window.event.altKey)(wek==115))
{window.showModelessDialog("about:blank","","dialogWidth:1px;dialogheight:1px");return false;}
if(wek==122){window.event.keyCode=0;window.alert("Error:Invalid operation!");return false;}
}
/script>
/BODY>
/HTML>
hostedit.rar

標簽:清遠 邯鄲 濟南 廣東 克拉瑪依 新余 內江 棗莊

巨人網絡通訊聲明:本文標題《HTA編輯HOST文件的腳本》,本文關鍵詞  HTA,編輯,HOST,文件,的,腳本,;如發現本文內容存在版權問題,煩請提供相關信息告之我們,我們將及時溝通與處理。本站內容系統采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《HTA編輯HOST文件的腳本》相關的同類信息!
  • 本頁收集關于HTA編輯HOST文件的腳本的相關信息資訊供網民參考!
  • 推薦文章
    主站蜘蛛池模板: 男人吸奶日进去视频| 中文一级片| 欧美丰满大屁股BBwHD| 日本va在线| 大香网伊人久久综合网eeww| 情迷艳色村妇| 日本一级婬片A片AAA毛片男男| 老人91久久无码99精品高潮久| 国产亚洲欧美日韩在线观看不卡| 顶级肉欲(高H、纯肉故事集| 巨爆乳无码大乳巨欧美| 越南女兵艳史k8电影| 成人久久久观看免费毛片| 国产在线综合视频| 全黄一级录像片| 亚洲AV欧美AV久久久爽色| 母子乱操| youjizz亚洲| 亚洲色婷婷综合久久一区二区三区 | 国精产品水蜜桃| 粗暴?交XXX| h成人动漫在线观看| 黄色一级大片网站| 日韩视频区| 女留学生与老外激情视频| 公用玩物NP双xing总受| 免费人成xvideoscom中文| 未成18年禁止观看的免费| 用力?哦?高潮?喷了公主| 被强壮的公的侵犯伦理| 一级黄色软件| 三上悠亚在线观看| awazliksikix小吃大全图片| 日本h视频在线观看| 青青草国产成人AV片免费| 免费的午夜毛片| 亚洲人成电影青青在线播放| 阳性睡过的被子要扔掉吗| mm131爽爽爽爱做视频| 九九精品国产| 无限资源第一页国语2018|