SHARE
TWEET

Untitled

a guest Apr 26th, 2018 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const userInfo = "sanzhar"
  2. const passInfo = "unist"
  3.  
  4. const jsftp = require("jsftp");
  5. const Ftp = new jsftp({
  6.   host: "mico.knu.ac.kr",
  7.   port: 22, // defaults to 21
  8.   user: userInfo, // defaults to "anonymous"
  9.   pass: passInfo // defaults to "@anonymous"
  10.  
  11. });
  12.  
  13. Ftp.ls(".", (err, res) => {
  14.   res.forEach(file => console.log(file.name));
  15. });
  16.  
  17. Ftp.raw("quit", (err, data) => {
  18.   if (err) {
  19.     return console.error(err);
  20.   }
  21.  
  22.   console.log("Bye!");
  23. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top