diff --git a/config_files/replace.cfg b/config_files/replace.cfg new file mode 100644 index 0000000..e69de29 diff --git a/plugins/FilePwn.py b/plugins/FilePwn.py index 54e4217..5453cff 100644 --- a/plugins/FilePwn.py +++ b/plugins/FilePwn.py @@ -22,7 +22,7 @@ class FilePwn(Plugin): name = "FilePwn" optname = "filepwn" implements = ["handleResponse"] - has_opts = False + has_opts = True desc = "Backdoor executables being sent over http using bdfactory" def convert_to_Bool(self, aString): @@ -36,6 +36,10 @@ class FilePwn(Plugin): def initialize(self,options): '''Called if plugin is enabled, passed the options namespace''' self.options = options + self.filepwncfg = options.filepwncfg + + if self.filepwncfg == None: + self.filepwncfg = "./config_files/filepwn.cfg" self.binaryMimeTypes = ["application/octet-stream", 'application/x-msdownload', 'application/x-msdos-program', 'binary/octet-stream'] @@ -45,7 +49,7 @@ class FilePwn(Plugin): #NOT USED NOW #self.supportedBins = ('MZ', '7f454c46'.decode('hex')) - self.userConfig = ConfigObj('./config_files/filepwn.cfg') + self.userConfig = ConfigObj(self.filepwncfg) self.FileSizeMax = self.userConfig['targets']['ALL']['FileSizeMax'] self.WindowsIntelx86 = self.userConfig['targets']['ALL']['WindowsIntelx86'] self.WindowsIntelx64 = self.userConfig['targets']['ALL']['WindowsIntelx64'] @@ -286,4 +290,7 @@ class FilePwn(Plugin): else: logging.debug("%s File is not of supported Content-Type: %s" % (request.client.getClientIP(), content_header)) - return {'request':request,'data':data} \ No newline at end of file + return {'request':request,'data':data} + + def add_options(self, options): + options.add_argument("--filepwncfg", type=file, help="Specify a config file") \ No newline at end of file