Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PERE Alexandre
orchestra
Commits
f3c9ad13
Commit
f3c9ad13
authored
Nov 13, 2019
by
Alexandre Pere
Browse files
Removes Remote leak
parent
893ca573
Changes
2
Hide whitespace changes
Inline
Side-by-side
remote-leak/Cargo.toml
deleted
100644 → 0
View file @
893ca573
[package]
name
=
"remote-leak"
version
=
"0.2.0"
authors
=
[
"Alexandre Péré <alexandre.pere@protonmail.com>"
]
edition
=
"2018"
[dependencies]
futures-preview
=
"0.3.0-alpha.17"
liborchestra
=
{
path
=
"../liborchestra"
}
\ No newline at end of file
remote-leak/src/main.rs
deleted
100644 → 0
View file @
893ca573
#![feature(async_await,
futures_api)]
extern
crate
liborchestra
;
use
liborchestra
::
ssh
;
use
std
::
alloc
::
System
;
#[global_allocator]
static
GLOBAL
:
System
=
System
;
fn
main
(){
use
futures
::
executor
::
block_on
;
for
i
in
1
..
100
{
async
fn
connect_and_ls
()
{
let
profile
=
ssh
::
config
::
SshProfile
{
name
:
"test"
.to_owned
(),
hostname
:
Some
(
"127.0.0.1"
.to_owned
()),
user
:
Some
(
"apere"
.to_owned
()),
port
:
None
,
proxycommand
:
Some
(
"ssh -A -l apere localhost -W localhost:22"
.to_owned
()),
};
let
remote
=
ssh
::
RemoteHandle
::
spawn
(
profile
)
.unwrap
();
let
output
=
remote
.async_exec
(
"echo kikou"
.to_owned
())
.await
.unwrap
();
println!
(
"Executed and resulted in {:?}"
,
String
::
from_utf8
(
output
.stdout
)
.unwrap
());
}
println!
(
"{}"
,
i
);
block_on
(
connect_and_ls
());
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment