diff --git a/modules/generators/config_files/filezilla_config/secgen_local/local.rb b/modules/generators/config_files/filezilla_config/secgen_local/local.rb
index 97fd59825..b152ba8b4 100644
--- a/modules/generators/config_files/filezilla_config/secgen_local/local.rb
+++ b/modules/generators/config_files/filezilla_config/secgen_local/local.rb
@@ -3,43 +3,41 @@ require_relative '../../../../../lib/objects/local_string_generator.rb'
require 'erb'
require 'fileutils'
class FilezillaConfigFileGenerator < StringGenerator
- attr_accessor :ftp_user
- attr_accessor :ftp_pass
- attr_accessor :proxy_user
- attr_accessor :proxy_pass
+ attr_accessor :name
+ attr_accessor :host
+ attr_accessor :port
+ attr_accessor :password
LOCAL_DIR = File.expand_path('../../',__FILE__)
- TEMPLATE_PATH = "#{LOCAL_DIR}/templates/filezilla_config.md.erb"
+ TEMPLATE_PATH = "#{LOCAL_DIR}/templates/filezilla_config.xml.erb"
def initialize
super
- self.ftp_user = 'admin'
- self.ftp_pass = 'admin'
- self.proxy_user = ''
- self.proxy_pass = ''
+ self.name = ''
+ self.host = ''
+ self.port = ''
+ self.password = ''
end
def get_options_array
- super + [['--ftp_user', GetoptLong::REQUIRED_ARGUMENT],
- ['--ftp_pass', GetoptLong::REQUIRED_ARGUMENT],
- ['--proxy_user', GetoptLong::OPTIONAL_ARGUMENT],
- ['--proxy_pass', GetoptLong::OPTIONAL_ARGUMENT]]
+ super + [['--host', GetoptLong::REQUIRED_ARGUMENT],
+ ['--port', GetoptLong::OPTIONAL_ARGUMENT],
+ ['--password', GetoptLong::OPTIONAL_ARGUMENT]]
end
def process_options(opt, arg)
super
case opt
- when '--ftp_user'
- self.ftp_user << arg;
- when '--ftp_pass'
- self.ftp_pass << arg;
- when '--proxy_user'
- self.proxy_user << arg;
- when '--proxy_pass'
- self.proxy_pass << arg;
- end
+ when '--host'
+ self.host << arg;
+ when '--port'
+ self.port << arg;
+ when '--password'
+ self.password << arg;
+ end
end
def generate
+ self.name = "#{self.host}:#{self.port}"
template_out = ERB.new(File.read(TEMPLATE_PATH), 0, '<>-')
self.outputs << template_out.result(self.get_binding)
end
diff --git a/modules/generators/config_files/filezilla_config/templates/filezilla_config.xml.erb b/modules/generators/config_files/filezilla_config/templates/filezilla_config.xml.erb
index a7f4c5f56..151d4127c 100644
--- a/modules/generators/config_files/filezilla_config/templates/filezilla_config.xml.erb
+++ b/modules/generators/config_files/filezilla_config/templates/filezilla_config.xml.erb
@@ -1,149 +1,58 @@
-
-
-1
-0
-6000
-7000
-0
-0
-
-http://ip.filezilla-project.org/ip.php
-
-1
-0
-20
-0
-0
-1
-2
-5
-0
-1000
-100
-0
-0
-0
-0
-4194304
-262144
-0
-0
-
-<%= self.ftp_user %>
-<%= self.ftp_pass %>
-
-
-0
-0
-
-0
-<%= self.proxy_user %>
-<%= self.proxy_pass %>
-
-10
-0
-1
-1
-15
-600
-2
-0
-
-0
-0
-
-ac|am|asp|bat|c|cfm|cgi|conf|cpp|css|dhtml|diff|diz|h|hpp|htm|html|in|inc|java|js|jsp|lua|m4|mak|md5|nfo|nsh|nsi|pas|patch|pem|php|phtml|pl|po|pot|py|qmail|sh|sha1|sha256|sha512|shtml|sql|svg|tcl|tpl|txt|vbs|xhtml|xml|xrc
-
-1
-1
-1
-
-2
-
-0
-0
-0
-0
-0
-0
-
-
-1
-1
-0
-0
-0
-1
-0
-
-
-1
-1
-
-0
-
-1
-
-default
-125
-0
-
-1
-0
-1
-0
-0
-0
-0
-
-
-
-
-0
-
-1
-1
-
-1
-_
-0
-
-0
-0
-0
-0
-0
-1
-
-0
-0
-0
-3.60.2
-1
-180 60 180 80 60 150
-170 80 120 120
-150 75 80 100 80 85
-0 680 262 1190 825
-97 -130 500000000 233 233 500000000
-1111
-111111
-0,1,2,3
-0,1,2,3,4,5
-
-
-
-
-21
--1
-0
-0
-
-
-/home/jack/
-
-
-
-0 0
-0 0
-
-
+
+
+
+
+ <%= self.name %>
+ <%= self.host %>
+ <%= self.port %>
+ <%= self.password %>
+ 39:82:b8:b9:de:11:50:7c:bf:ba:cd:88:90:9d:a0:56:f1:19:cf:11:23:61:aa:aa:6c:cf:a3:4f:7f:32:9b:9a
+
+
+ <%= self.name %>
+
+
+
+
+
+ 0
+
+ 9223372036854775807
+
+ 4294967311
+
+ 0
+
+ true
+
+ false
+
+
+
+
+ false
+
+ 1
+
+
+
+
+
+ 960x540+3040+450
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -2147483648
+
+