"use strict";(function(){"use strict";var e=require("ftpd");var t=require("fs");var r=require("events");var n=require("util");var i=0;function o(){r.EventEmitter.call(this);if(false===this instanceof o){return new o}}n.inherits(o,r.EventEmitter);o.prototype.start=function(t){var r=this;var n=t.debug!=undefined?t.debug:3;var i=t.port!=undefined?t.port:21;var o=t.root!=undefined?t.root:process.cwd();var s=t.host!=undefined?t.host:"0.0.0.0";r.ftp_server=new e.FtpServer(s,{getInitialCwd:function u(){return"/"},getRoot:function f(){return o},allowUnauthorizedTls:true,useWriteFile:false,useReadFile:false,uploadMaxSlurpSize:7e3});if(r.ftp_server!=undefined){r.ftp_server.on("client:connected",function(e){var t=null;console.log("client connected: "+e.remoteAddress);e.on("command:user",function(e,r,n){if(e){t=e;r()}else{n()}});e.on("command:pass",function(e,r,n){if(e){r(t)}else{n()}})});r.ftp_server.debugging=n;r.ftp_server.listen(i)}};o.prototype.close=function(){var e=this;if(e.ftp_server!=undefined&&e.ftp_server.close!=undefined){e.ftp_server.close()}};if(i){var s=new o;var u={root:"./",host:"172.24.128.253",port:21};s.start(u);setTimeout(function(){s.close()},5e3)}module.exports=o})();