diff --git a/lib/core/common.py b/lib/core/common.py index 396a815ca..a7141dc41 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -453,36 +453,6 @@ def strToHex(inpStr): return hexStr -def fileToStr(fileName): - """ - @param fileName: file path to read the content and return as a no - NEWLINE string. - @type fileName: C{file.open} - - @return: the file content as a string without TAB and NEWLINE. - @rtype: C{str} - """ - - filePointer = codecs.open(fileName, "rb") - fileText = filePointer.read() - - return fileText.replace(" ", "").replace("\t", "").replace("\r", "").replace("\n", " ") - -def fileToHex(fileName): - """ - @param fileName: file path to read the content and return as an - hexadecimal string. - @type fileName: C{file.open} - - @return: the file content as an hexadecimal string. - @rtype: C{str} - """ - - fileText = fileToStr(fileName) - hexFile = strToHex(fileText) - - return hexFile - def readInput(message, default=None): """ @param message: message to display on terminal. diff --git a/lib/takeover/web.py b/lib/takeover/web.py index 8d3fd03e0..ae63c7e91 100644 --- a/lib/takeover/web.py +++ b/lib/takeover/web.py @@ -15,7 +15,6 @@ import re from extra.cloak.cloak import decloak from lib.core.agent import agent from lib.core.common import decloakToNamedTemporaryFile -from lib.core.common import fileToStr from lib.core.common import getDirs from lib.core.common import getDocRoot from lib.core.common import ntToPosixSlashes