-
Notifications
You must be signed in to change notification settings - Fork 18
command
陈焰 edited this page Apr 13, 2018
·
4 revisions
ask ws2s server to open a connection to target (host, port). only last opened connection will be effective, if you execute connect
more then one times.
{
command: "connect",
host: host,
port: port,
ssh_host: ssh_host,
ssh_port: ssh_port,
ssh_username: ssh_username,
ssh_password: ssh_password,
ssh_private_key: ssh_private_key,
ssh_private_key_password: ssh_private_key_password
}
-
host
andport
are required. - if
ssh_host
is provided, ws2s server will connect (host, port) via ssh tunnel.
ask ws2s server to send a string to target (host, port). should be executed after command: connect
.
{
command: "send",
data: "GET / HTTP/1.1\r\nHost: 127.0.0.1\r\nConnection: close\r\n\r\n"
}
similar to command: send
. but the data
field is an base64 string. useful when you want to send binary data. base64 string will be decode when sending to target (host, port).
{
command: "sendb",
data: "base64 string"
}
{
command: "close"
}