Home
Test ASP file check
- Details
This is used to test that script can create and delete a file.
Pro-TIP: get another file on the server and copy it to retain the permissions. rename and past the code below then browse to it.
Keywords:
Check create delete permissions file system
create a file called test.asp and paste the below in it
<%@ Language=VBScript %>
<%
''Current Directory must have writeable permissions for this sample to work.
''It is suggested to NOT run this in the root directory
'' and NOT set writeable permissions to the root directory of your website.
vqs = request.querystring("Action")
response.write "" &_
"<a href='?action=cf'>Create File</a> " &_
"<a href='?action=cd'>Create Directory</a> " &_
"<a href='?action=df'>Delete File</a> " &_
"<a href='?action=dd'>Delete Directory</a> " &_
"<br><br>"
select case vqs
Case "cf"
call createfile
Case "cd"
call createdir
Case "df"
call delfile
Case "dd"
call deldir
End Select
sub createfile()
set fs=Server.CreateObject("Scripting.FileSystemObject")
if not fs.FileExists(server.mappath("test.txt")) then
set fname=fs.CreateTextFile(server.mappath("test.txt"),true)
fname.WriteLine("Hello World!")
fname.Close
response.write "File Created. " & server.mappath("test.txt")&"<br>"
else
response.write "File Exists Already. " & server.mappath("test.txt")
end if
set fs=nothing
set fname=nothing
end sub
sub createdir()
set fs=Server.CreateObject("Scripting.FileSystemObject")
if fs.FolderExists(server.mappath("test")) then
response.write "Directory Already Exists - must remove before creation. " & server.mappath("test")&"<br>"
else
set f=fs.CreateFolder (server.mappath("test"))
response.write "Directory Created. " & server.mappath("test")&"<br>"
end if
set f=nothing
set fs=nothing
end sub
sub delfile()
Set fs=Server.CreateObject("Scripting.FileSystemObject")
if fs.FileExists(server.mappath("test.txt")) then
fs.DeleteFile(server.mappath("test.txt"))
response.write "File Delete. " & server.mappath("test.txt")
else
response.write "File Does Not Exist. " & server.mappath("test.txt")
end if
set fs=nothing
end sub
sub deldir()
set fs=Server.CreateObject("Scripting.FileSystemObject")
if fs.FolderExists(server.mappath("test")) then
fs.DeleteFolder(server.mappath("test"))
response.write "Directory Delete. " & server.mappath("test")
end if
set fs=nothing
end sub
%>
newest js injection finder
- Details
From the command prompt go to the root director of the website or server then paste this in the command prompt. This works for the latest script kiddy version. you might need to change the *km to what ever prompted you to come here
findstr /S /m "\/\*km.*window" *.js index.php index.html index.php default.asp default.aspx home.asp home.aspx home.html home.php > c:\js-blackhole.txt
Restoring MS SQL Database
- Details
Login to Microsoft SQL Server 2008 R2 RTM - Management Studio Express and connect to your MS SQL server
"Microsoft SQL Server 2008 R2 RTM - Management Studio Express" click here Get Software From MS
Once you login you will see the below screen:
Now Restore the database. You will need to locate your .bak file
Just follow the screenshots and prompts within MSSQL Manager
send asp errors to browser
- Details
To enable client side error message for asp you need to open IIS and browse to the site.
Click ASP and change the following vars to true (see screenshot).
You might want to restart the application pool as well.
Also note asp uses the web.config file to store these changes.
Page 21 of 40