diff options
author | bnewbold <bnewbold@robocracy.org> | 2016-05-30 16:32:21 -0400 |
---|---|---|
committer | bnewbold <bnewbold@robocracy.org> | 2016-05-30 16:32:21 -0400 |
commit | ccd871880d6a58a1b8decc3cd16951ee70ec2f57 (patch) | |
tree | 553d145663debde8816608ebfe2cb7bcd3f4e841 /src/main.rs | |
parent | 739816807c8b6a7c0e0be9c909f64d25dc0bf243 (diff) | |
download | ucp-ccd871880d6a58a1b8decc3cd16951ee70ec2f57.tar.gz ucp-ccd871880d6a58a1b8decc3cd16951ee70ec2f57.zip |
add --no-crypto in a crude way
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index a1002c2..8255547 100644 --- a/src/main.rs +++ b/src/main.rs @@ -41,6 +41,7 @@ fn main() { opts.optflag("h", "help", "print this help menu"); //opts.optflag("v", "verbose", "more debugging messages"); opts.optflag("r", "recursive", "whether to recursively transfer files (directory)"); + opts.optflag("", "no-crypto", "sends data in the clear (no crypto or verification)"); let matches = match opts.parse(&args[1..]) { Ok(m) => { m } @@ -49,6 +50,7 @@ fn main() { //let verbose: bool = matches.opt_present("v"); let recursive: bool = matches.opt_present("r"); + let no_crypto: bool = matches.opt_present("no-crypto"); if matches.opt_present("h") { usage(opts); @@ -82,7 +84,7 @@ fn main() { let spl: Vec<&str> = srcfile.split(":").collect(); let host = spl[0]; let remote_file = spl[1]; - client::run_client(host, local_file, remote_file, recursive, is_recv); + client::run_client(host, local_file, remote_file, recursive, is_recv, no_crypto); }, (false, true) => { let is_recv = false; @@ -90,7 +92,7 @@ fn main() { let spl: Vec<&str> = destfile.split(":").collect(); let host = spl[0]; let remote_file = spl[1]; - client::run_client(host, local_file, remote_file, recursive, is_recv); + client::run_client(host, local_file, remote_file, recursive, is_recv, no_crypto); }, } } |