Almost done with web backdoor functionality

This commit is contained in:
Bernardo Damele
2009-04-28 11:05:07 +00:00
parent 16b4530bbe
commit 1d7de719b9
4 changed files with 69 additions and 76 deletions

View File

@@ -225,6 +225,7 @@ def getHtmlErrorFp():
def getDocRoot():
docRoot = None
pagePath = os.path.dirname(conf.path)
if kb.os == "Windows":
defaultDocRoot = "C:\\Inetput\\wwwroot\\"
@@ -241,8 +242,8 @@ def getDocRoot():
absFilePath = os.path.normpath(absFilePath)
if os.path.dirname(conf.path) in absFilePath:
index = absFilePath.index(conf.path)
if pagePath in absFilePath:
index = absFilePath.index(pagePath)
docRoot = absFilePath[:index]
if absFilePathWin:

View File

@@ -24,6 +24,7 @@ Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
import os
import re
from lib.core.data import conf
@@ -79,4 +80,4 @@ def parseResponse(page, headers):
for absFilePath in absFilePaths:
if absFilePath not in kb.absFilePaths:
kb.absFilePaths.add(absFilePath)
kb.absFilePaths.add(os.path.dirname(absFilePath))

View File

@@ -160,9 +160,9 @@ class Connect:
logger.log(9, requestMsg)
# Get HTTP response
page = conn.read()
code = conn.code
status = conn.msg
page = conn.read()
code = conn.code
status = conn.msg
responseHeaders = conn.info()
except urllib2.HTTPError, e: